18 INLINE ConfigVariableBase::
19 ConfigVariableBase(
const std::string &name,
20 ConfigVariableBase::ValueType value_type) :
23 if (value_type != VT_undefined) {
31 INLINE ConfigVariableBase::
32 ~ConfigVariableBase() {
38 INLINE
const std::string &ConfigVariableBase::
40 nassertr(_core !=
nullptr, *
new std::string());
48 INLINE ConfigVariableBase::ValueType ConfigVariableBase::
49 get_value_type()
const {
50 nassertr(_core !=
nullptr, VT_undefined);
57 INLINE
const std::string &ConfigVariableBase::
58 get_description()
const {
59 nassertr(_core !=
nullptr, *
new std::string());
71 nassertr(_core !=
nullptr, 0);
84 INLINE
bool ConfigVariableBase::
86 nassertr(_core !=
nullptr,
false);
100 INLINE
int ConfigVariableBase::
101 get_trust_level()
const {
102 nassertr(_core !=
nullptr, 0);
111 INLINE
bool ConfigVariableBase::
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);
bool has_local_value() const
Returns true if this variable's value has been shadowed by a local assignment (as created via make_lo...
int get_flags() const
Returns the flags value as set by set_flags().
bool has_value() const
Returns true if this variable has an explicit value, either from a prc file or locally set,...
get_value_type
Returns the stated type of this variable.
get_trust_level
Returns the minimum trust_level a prc file must demonstrate in order to redefine the value for this v...
bool has_local_value() const
Returns true if this variable's value has been shadowed by a local assignment (as created via make_lo...
A global object that maintains the set of ConfigVariables (actually, ConfigVariableCores) everywhere ...
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.
bool clear_local_value()
Removes the local value defined for this variable, and allows its value to be once again retrieved fr...
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...
bool has_value() const
Returns true if this variable has an explicit value, either from a prc file or locally set,...
int get_flags() const
Returns the flags value as set by set_flags().
get_name
Returns the name of the variable.
This class is the base class for both ConfigVariableList and ConfigVariable (and hence for all of the...
set_value_type
Specifies the type of this variable.