17 INLINE ConfigVariableInt::
18 ConfigVariableInt(
const std::string &name) :
20 _local_modified(initial_invalid_cache())
28 INLINE ConfigVariableInt::
29 ConfigVariableInt(
const std::string &name,
int default_value,
30 const std::string &description,
int flags) :
31 #ifdef PRC_SAVE_DESCRIPTIONS
36 _local_modified(initial_invalid_cache())
38 set_default_value(default_value);
45 INLINE ConfigVariableInt::
46 ConfigVariableInt(
const std::string &name,
const std::string &default_value,
47 const std::string &description,
int flags) :
48 #ifdef PRC_SAVE_DESCRIPTIONS
53 _local_modified(initial_invalid_cache())
55 _core->set_default_value(default_value);
70 INLINE ConfigVariableInt::
71 operator int ()
const {
97 set_int_word(0, value);
103 INLINE
int ConfigVariableInt::
105 TAU_PROFILE(
"int ConfigVariableInt::get_value() const",
" ", TAU_USER);
106 if (!is_cache_valid(_local_modified)) {
116 INLINE
int ConfigVariableInt::
117 get_default_value()
const {
119 if (decl !=
nullptr) {
130 return get_int_word(n);
139 set_int_word(n, value);
void set_word(size_t n, int value)
Reassigns the variable's nth value.
The internal definition of a ConfigVariable.
set_value
Reassigns the variable's local value.
void set_string_value(const std::string &value)
Changes the value assigned to this variable.
size_t size() const
Returns the number of unique words in the variable.
int operator [](size_t n) const
Returns the value of the variable's nth word.
size_t get_num_words() const
Returns the number of words in the variable's value.
This is a generic, untyped ConfigVariable.
int get_int_word(size_t n) const
Returns the integer value of the nth word of the declaration's value, or 0 if there is no nth value.
int get_word(size_t n) const
Returns the variable's nth value.
This is a convenience class to specialize ConfigVariable as an integer type.
A single declaration of a config variable, typically defined as one line in a .prc file,...
void operator=(int value)
Reassigns the variable's local value.