17INLINE ConfigVariableBool::
18ConfigVariableBool(
const std::string &name) :
20 _local_modified(initial_invalid_cache())
28INLINE ConfigVariableBool::
29ConfigVariableBool(
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");
45INLINE ConfigVariableBool::
46ConfigVariableBool(
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);
70ALWAYS_INLINE ConfigVariableBool::
71operator bool ()
const {
97 set_bool_word(0, value);
105 TAU_PROFILE(
"bool ConfigVariableBool::get_value() const",
" ", TAU_USER);
106 if (!is_cache_valid(_local_modified)) {
118 if (decl !=
nullptr) {
129 return get_bool_word(n);
138 set_bool_word(n, value);
A single declaration of a config variable, typically defined as one line in a .prc file,...
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...
get_value
Returns the variable's value.
size_t size() const
Returns the number of unique words in the variable.
set_value
Reassigns the variable's local value.
get_default_value
Returns the variable's default value.
void set_word(size_t n, bool value)
Reassigns the variable's nth value.
bool get_word(size_t n) const
Returns the variable's nth value.
void operator=(bool value)
Reassigns the variable's local value.
bool operator[](size_t n) const
Returns the value of the variable's nth word.
This is a generic, untyped ConfigVariable.
size_t get_num_words() const
Returns the number of words in the variable's value.
void set_string_value(const std::string &value)
Changes the value assigned to this variable.