17 INLINE ConfigVariableBool::
18 ConfigVariableBool(
const std::string &name) :
20 _local_modified(initial_invalid_cache())
28 INLINE ConfigVariableBool::
29 ConfigVariableBool(
const std::string &name,
bool default_value,
30 const std::string &description,
int flags) :
31 #ifdef PRC_SAVE_DESCRIPTIONS
36 _local_modified(initial_invalid_cache())
38 _core->set_default_value(default_value ?
"1" :
"0");
45 INLINE ConfigVariableBool::
46 ConfigVariableBool(
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 ALWAYS_INLINE ConfigVariableBool::
71 operator bool ()
const {
97 set_bool_word(0, value);
103 ALWAYS_INLINE
bool ConfigVariableBool::
105 TAU_PROFILE(
"bool ConfigVariableBool::get_value() const",
" ", TAU_USER);
106 if (!is_cache_valid(_local_modified)) {
115 INLINE
bool ConfigVariableBool::
116 get_default_value()
const {
118 if (decl !=
nullptr) {
129 return get_bool_word(n);
138 set_bool_word(n, value);
set_value
Reassigns the variable's local value.
void set_word(size_t n, bool value)
Reassigns the variable's nth value.
bool operator [](size_t n) const
Returns the value of the variable's nth word.
bool get_word(size_t n) const
Returns the variable's nth 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.
bool get_bool_word(size_t n) const
Returns the boolean value of the nth word of the declaration's value, or false if there is no nth val...
void operator=(bool value)
Reassigns the variable's local value.
size_t get_num_words() const
Returns the number of words in the variable's value.
This is a generic, untyped ConfigVariable.
A single declaration of a config variable, typically defined as one line in a .prc file,...