17 INLINE ConfigVariableDouble::
18 ConfigVariableDouble(
const std::string &name) :
20 _local_modified(initial_invalid_cache())
28 INLINE ConfigVariableDouble::
29 ConfigVariableDouble(
const std::string &name,
double 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 ConfigVariableDouble::
46 ConfigVariableDouble(
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 ConfigVariableDouble::
71 operator double ()
const {
97 set_double_word(0, value);
103 INLINE
double ConfigVariableDouble::
105 TAU_PROFILE(
"double ConfigVariableDouble::get_value() const",
" ", TAU_USER);
106 if (!is_cache_valid(_local_modified)) {
116 INLINE
double ConfigVariableDouble::
117 get_default_value()
const {
119 if (decl !=
nullptr) {
130 return get_double_word(n);
139 set_double_word(n, value);
double get_double_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.
The internal definition of a ConfigVariable.
void operator=(double value)
Reassigns the variable's local value.
void set_string_value(const std::string &value)
Changes the value assigned to this variable.
size_t get_num_words() const
Returns the number of words in the variable's value.
This is a convenience class to specialize ConfigVariable as a floating- point type.
size_t size() const
Returns the number of unique words in the variable.
This is a generic, untyped ConfigVariable.
void set_word(size_t n, double value)
Reassigns the variable's nth value.
double get_word(size_t n) const
Returns the variable's nth value.
double operator [](size_t n) const
Returns the value of the variable's nth word.
set_value
Reassigns the variable's local value.
A single declaration of a config variable, typically defined as one line in a .prc file,...