90 return (_flags & F_closed) != 0;
110 return (_flags & F_trust_level_mask);
124 return (_flags & F_dynamic) != 0;
136 return _default_value;
171 check_sort_declarations();
172 return _declarations.size();
188 check_sort_declarations();
190 return _declarations[n];
202 check_sort_declarations();
203 return _trusted_declarations.size();
222 check_sort_declarations();
223 nassertr(n >= 0 && n < (
int)_trusted_declarations.size(), (
ConfigDeclaration *)NULL);
224 return _trusted_declarations[n];
235 check_sort_declarations();
236 return _unique_declarations.size();
249 check_sort_declarations();
250 nassertr(n >= 0 && n < (
int)_unique_declarations.size(), (
ConfigDeclaration *)NULL);
251 return _unique_declarations[n];
260 INLINE
void ConfigVariableCore::
261 check_sort_declarations()
const {
268 if (!_declarations_sorted) {
275 variable.output(out);
const ConfigDeclaration * get_unique_reference(int n) const
Returns the nth trusted, unique value for this 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...
The internal definition of a ConfigVariable.
const ConfigDeclaration * get_default_value() const
Returns the default variable specified for this variable.
const string & get_name() const
Returns the name of the variable.
int get_num_unique_references() const
Returns the number of trusted, unique (by string value) values there exist for this variable...
void load_implicit_pages()
Searches the PRC_DIR and/or PRC_PATH directories for .prc files and loads them in as pages...
const ConfigDeclaration * get_reference(int n) const
Returns the nth declaration in a prc file that references this variable.
int get_flags() const
Returns the flags value as set by set_flags().
const ConfigDeclaration * get_trusted_reference(int n) const
Returns the nth declaration in a trusted prc file that references this variable.
int get_num_trusted_references() const
Returns the number of trusted prc files that reference this variable.
void set_used()
Marks that the variable has been "declared" by a ConfigVariable.
bool is_closed() const
Returns true if the variable is not trusted by any prc file (and hence cannot be modified from its co...
bool is_used() const
Returns true if the variable has been referenced by a ConfigVariable somewhere in code...
int get_num_references() const
Returns the number of prc files that reference this variable.
int get_trust_level() const
Returns the minimum trust_level a prc file must demonstrate in order to redefine the value for this v...
const string & get_description() const
Returns the brief description of this variable, if it has been defined.
A single declaration of a config variable, typically defined as one line in a .prc file...
ValueType get_value_type() const
Returns the stated type of this variable.
bool is_dynamic() const
Returns true if the variable was indicated as "dynamic" by its constructor, indicating that its name ...