21 INLINE ConfigVariableColor::
22 ConfigVariableColor(
const string &name) :
24 _local_modified(initial_invalid_cache()),
35 INLINE ConfigVariableColor::
36 ConfigVariableColor(
const string &name,
const LColor &default_value,
37 const string &description,
int flags) :
38 #ifdef PRC_SAVE_DESCRIPTIONS
43 _local_modified(initial_invalid_cache()),
46 set_default_value(default_value);
55 INLINE ConfigVariableColor::
56 ConfigVariableColor(
const string &name,
const string &default_value,
57 const string &description,
int flags) :
58 #ifdef PRC_SAVE_DESCRIPTIONS
63 _local_modified(initial_invalid_cache()),
66 _core->set_default_value(default_value);
85 INLINE ConfigVariableColor::
123 TAU_PROFILE(
"const LColor &ConfigVariableColor::get_value() const",
" ", TAU_USER);
124 if (!is_cache_valid(_local_modified)) {
125 mark_cache_valid(_local_modified);
150 <<
"Invalid color value for ConfigVariable "
181 <<
"Invalid default color value for ConfigVariable "
185 return LColor(0, 0, 0, 1);
The internal definition of a ConfigVariable.
void set_value(const LColor &value)
Reassigns the variable's local value.
int get_num_words() const
Returns the number of words in the variable's value.
void operator=(const LColor &value)
Reassigns the variable's local value.
const string & get_string_value() const
Returns the value assigned to this variable.
LColor get_default_value() const
Returns the variable's default value.
void set_double_word(int n, double value)
Changes the nth word to the indicated value without affecting the other words.
const string & get_string_value() const
Returns the toplevel value of the variable, formatted as a string.
int get_num_words() const
Returns the number of words in the declaration's value.
double get_double_word(int n) const
Returns the integer value of the nth word of the declaration's value, or 0 if there is no nth value...
const ConfigDeclaration * get_default_value() const
Returns the default variable specified for this variable.
double get_double_word(int n) const
Returns the integer value of the nth word of the variable's value, or 0 if there is no nth value...
This is a generic, untyped ConfigVariable.
const LColor & get_value() const
Returns the variable's value.
const string & get_name() const
Returns the name of the variable.
This is the base class for all three-component vectors and points.
void set_string_value(const string &value)
Changes the value assigned to this variable.
A single declaration of a config variable, typically defined as one line in a .prc file...
PN_stdfloat operator[](int n) const
Returns the value of the color's nth component (which is not necessarily the same thing as the variab...