21 template<
class EnumType>
24 const string &description,
int flags) :
25 #ifdef PRC_SAVE_DESCRIPTIONS
30 _got_default_value(true),
31 _default_value(default_value),
32 _local_modified(initial_invalid_cache())
34 _core->set_default_value(format_enum(default_value));
43 template<
class EnumType>
46 const string &description,
int flags) :
47 #ifdef PRC_SAVE_DESCRIPTIONS
52 _got_default_value(true),
53 _default_value(parse_string(default_value)),
54 _local_modified(initial_invalid_cache())
56 _core->set_default_value(default_value);
65 template<
class EnumType>
75 template<
class EnumType>
86 template<
class EnumType>
88 operator EnumType ()
const {
97 template<
class EnumType>
108 template<
class EnumType>
119 template<
class EnumType>
130 template<
class EnumType>
133 TAU_PROFILE(
"EnumType ConfigVariableEnum<EnumType>::get_value() const",
" ", TAU_USER);
134 if (!is_cache_valid(_local_modified)) {
146 template<
class EnumType>
149 if (!_got_default_value) {
156 return _default_value;
164 template<
class EnumType>
176 template<
class EnumType>
189 template<
class EnumType>
205 template<
class EnumType>
EnumType operator[](int n) const
Returns the value of the variable's nth word.
The internal definition of a ConfigVariable.
string get_string_word(int n) const
Returns the string value of the nth word of the variable's value, or empty string if there is no nth ...
const ConfigDeclaration * get_default_value() const
Returns the default variable specified for this variable.
void operator=(EnumType value)
Reassigns the variable's local value.
EnumType get_default_value() const
Returns the variable's default value.
void set_word(int n, EnumType value)
Reassigns the variable's nth value.
EnumType get_word(int n) const
Returns the variable's nth value.
void set_value(EnumType value)
Reassigns the variable's local value.
This is a generic, untyped ConfigVariable.
This class specializes ConfigVariable as an enumerated type.
EnumType get_value() const
Returns the variable's value.
int get_num_words() const
Returns the number of words in the variable's value.
void set_string_value(const string &value)
Changes the value assigned to this variable.
const string & get_string_value() const
Returns the toplevel value of the variable, formatted as a string.
int size() const
Returns the number of unique words in the variable.
A single declaration of a config variable, typically defined as one line in a .prc file...
void set_string_word(int n, const string &value)
Changes the nth word to the indicated value without affecting the other words.
const string & get_string_value() const
Returns the value assigned to this variable.