18 INLINE ConfigVariableBase::
19 ConfigVariableBase(
const std::string &name,
20 ConfigVariableBase::ValueType value_type) :
23 if (value_type != VT_undefined) {
24 _core->set_value_type(value_type);
31 INLINE ConfigVariableBase::
32 ~ConfigVariableBase() {
40 nassertr(_core !=
nullptr, *
new std::string());
50 nassertr(_core !=
nullptr, VT_undefined);
59 nassertr(_core !=
nullptr, *
new std::string());
71 nassertr(_core !=
nullptr, 0);
86 nassertr(_core !=
nullptr,
false);
102 nassertr(_core !=
nullptr, 0);
113 nassertr(_core !=
nullptr,
false);
126 nassertr(_core !=
nullptr,
false);
136 nassertr(_core !=
nullptr,
false);
146 nassertr(_core !=
nullptr,
false);
153 INLINE
void ConfigVariableBase::
154 output(std::ostream &out)
const {
155 nassertv(_core !=
nullptr);
162 INLINE
void ConfigVariableBase::
163 write(std::ostream &out)
const {
164 nassertv(_core !=
nullptr);
168 INLINE std::ostream &
170 variable.output(out);
This class is the base class for both ConfigVariableList and ConfigVariable (and hence for all of the...
get_name
Returns the name of the variable.
bool has_local_value() const
Returns true if this variable's value has been shadowed by a local assignment (as created via make_lo...
bool has_value() const
Returns true if this variable has an explicit value, either from a prc file or locally set,...
get_trust_level
Returns the minimum trust_level a prc file must demonstrate in order to redefine the value for this v...
int get_flags() const
Returns the flags value as set by set_flags().
is_dynamic
Returns true if the variable was indicated as "dynamic" by its constructor, indicating that its name ...
get_description
Returns the brief description of this variable, if it has been defined.
get_value_type
Returns the stated type of this variable.
is_closed
Returns true if the variable is not trusted by any prc file (and hence cannot be modified from its co...
bool clear_local_value()
Removes the local value defined for this variable, and allows its value to be once again retrieved fr...
bool has_local_value() const
Returns true if this variable's value has been shadowed by a local assignment (as created via make_lo...
get_value_type
Returns the stated type of this variable.
bool has_value() const
Returns true if this variable has an explicit value, either from a prc file or locally set,...
is_dynamic
Returns true if the variable was indicated as "dynamic" by its constructor, indicating that its name ...
bool clear_local_value()
Removes the local value defined for this variable, and allows its value to be once again retrieved fr...
int get_flags() const
Returns the flags value as set by set_flags().
is_closed
Returns true if the variable is not trusted by any prc file (and hence cannot be modified from its co...
get_description
Returns the brief description of this variable, if it has been defined.
get_name
Returns the name of the variable.
get_trust_level
Returns the minimum trust_level a prc file must demonstrate in order to redefine the value for this v...
A global object that maintains the set of ConfigVariables (actually, ConfigVariableCores) everywhere ...