14#ifndef CONFIGVARIABLEBASE_H
15#define CONFIGVARIABLEBASE_H
29#ifdef PRC_SAVE_DESCRIPTIONS
30#define PRC_DESC(description) description
32#define PRC_DESC(description) ""
45class EXPCL_DTOOL_PRC ConfigVariableBase :
public ConfigFlags {
47 INLINE ConfigVariableBase(
const std::string &name, ValueType type);
48 ConfigVariableBase(
const std::string &name, ValueType type,
49 const std::string &description,
int flags);
50 INLINE ~ConfigVariableBase();
53 INLINE
const std::string &
get_name()
const;
73 INLINE
void output(std::ostream &out)
const;
74 INLINE
void write(std::ostream &out)
const;
77 void record_unconstructed()
const;
78 bool was_unconstructed()
const;
82 typedef pset<const ConfigVariableBase *> Unconstructed;
83 static Unconstructed *_unconstructed;
86INLINE std::ostream &operator << (std::ostream &out,
const ConfigVariableBase &variable);
This class is the base class of both ConfigVariable and ConfigVariableCore.
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...
The internal definition of a ConfigVariable.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.