Panda3D
|
This class specializes ConfigVariable as an enumerated type. More...
#include "configVariableEnum.h"
Public Member Functions | |
ConfigVariableEnum (const string &name, EnumType default_value, const string &description=string(), int flags=0) | |
ConfigVariableEnum (const string &name, const string &default_value, const string &description=string(), int flags=0) | |
EnumType | get_default_value () const |
Returns the variable's default value. | |
EnumType | get_value () const |
Returns the variable's value. | |
EnumType | get_word (int n) const |
Returns the variable's nth value. | |
operator EnumType () const | |
Returns the variable's value. | |
void | operator= (EnumType value) |
Reassigns the variable's local value. | |
EnumType | operator[] (int n) const |
Returns the value of the variable's nth word. | |
void | set_value (EnumType value) |
Reassigns the variable's local value. | |
void | set_word (int n, EnumType value) |
Reassigns the variable's nth value. | |
int | size () const |
Returns the number of unique words in the variable. |
This class specializes ConfigVariable as an enumerated type.
It is a template class, so it cannot be easily published; it's not really necessary outside of C++ anyway.
This variable assumes that the enumerated type in question has input and output stream operators defined that do the right thing (outputting a sensible string for the type, and converting a string to the correct value).
Definition at line 35 of file configVariableEnum.h.
EnumType ConfigVariableEnum< EnumType >::get_default_value | ( | ) | const [inline] |
Returns the variable's default value.
Reimplemented from ConfigVariable.
Definition at line 148 of file configVariableEnum.I.
References ConfigVariable::get_default_value(), and ConfigDeclaration::get_string_value().
EnumType ConfigVariableEnum< EnumType >::get_value | ( | ) | const [inline] |
Returns the variable's value.
Definition at line 132 of file configVariableEnum.I.
EnumType ConfigVariableEnum< EnumType >::get_word | ( | int | n | ) | const [inline] |
Returns the variable's nth value.
Definition at line 166 of file configVariableEnum.I.
ConfigVariableEnum< EnumType >::operator EnumType | ( | ) | const [inline] |
Returns the variable's value.
Definition at line 88 of file configVariableEnum.I.
void ConfigVariableEnum< EnumType >::operator= | ( | EnumType | value | ) | [inline] |
Reassigns the variable's local value.
Definition at line 77 of file configVariableEnum.I.
EnumType ConfigVariableEnum< EnumType >::operator[] | ( | int | n | ) | const [inline] |
Returns the value of the variable's nth word.
Definition at line 110 of file configVariableEnum.I.
void ConfigVariableEnum< EnumType >::set_value | ( | EnumType | value | ) | [inline] |
Reassigns the variable's local value.
Definition at line 121 of file configVariableEnum.I.
void ConfigVariableEnum< EnumType >::set_word | ( | int | n, |
EnumType | value | ||
) | [inline] |
Reassigns the variable's nth value.
This makes a local copy of the variable's overall value.
Definition at line 178 of file configVariableEnum.I.
int ConfigVariableEnum< EnumType >::size | ( | ) | const [inline] |
Returns the number of unique words in the variable.
Definition at line 99 of file configVariableEnum.I.