15 #include "configVariableBase.h" 16 #include "config_prc.h" 27 ConfigVariableBase(
const string &name,
28 ConfigVariableBase::ValueType value_type,
29 const string &description,
int flags) :
33 if (was_unconstructed()) {
35 <<
"Late constructing " <<
this <<
": " << name <<
"\n";
39 if (value_type != VT_undefined) {
40 _core->set_value_type(value_type);
42 #ifdef PRC_SAVE_DESCRIPTIONS 43 if (!description.empty()) {
44 _core->set_description(description);
46 #endif // PRC_SAVE_DESCRIPTIONS 48 _core->set_flags(flags);
62 void ConfigVariableBase::
63 record_unconstructed()
const {
65 if (_unconstructed == (Unconstructed *)NULL) {
66 _unconstructed =
new Unconstructed;
68 _unconstructed->insert(
this);
78 bool ConfigVariableBase::
79 was_unconstructed()
const {
81 if (_unconstructed != (Unconstructed *)NULL) {
82 Unconstructed::const_iterator ui = _unconstructed->find(
this);
83 if (ui != _unconstructed->end()) {
A global object that maintains the set of ConfigVariables (actually, ConfigVariableCores) everywhere ...
This is our own Panda specialization on the default STL set.