14 #ifndef CONFIGVARIABLEENUM_H 15 #define CONFIGVARIABLEENUM_H 30 template<
class EnumType>
34 const std::string &description = std::string(),
37 const std::string &description = std::string(),
42 INLINE
operator EnumType ()
const;
44 INLINE
size_t size()
const;
51 MAKE_PROPERTY(default_value, get_default_value);
53 INLINE EnumType
get_word(
size_t n)
const;
54 INLINE
void set_word(
size_t n, EnumType value);
57 INLINE EnumType parse_string(
const std::string &value)
const;
58 INLINE std::string format_enum(EnumType value)
const;
61 bool _got_default_value;
62 EnumType _default_value;
64 AtomicAdjust::Integer _local_modified;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
size_t size() const
Returns the number of unique words in the variable.
get_value
Returns the variable's value.
void operator=(EnumType value)
Reassigns the variable's local value.
get_default_value
Returns the variable's default value.
This is a generic, untyped ConfigVariable.
This class specializes ConfigVariable as an enumerated type.
void set_word(size_t n, EnumType value)
Reassigns the variable's nth value.
EnumType operator [](size_t n) const
Returns the value of the variable's nth word.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
EnumType get_word(size_t n) const
Returns the variable's nth value.
set_value
Reassigns the variable's local value.