14 #ifndef CONFIGVARIABLECORE_H 15 #define CONFIGVARIABLECORE_H 41 INLINE
const std::string &get_name()
const;
42 INLINE
bool is_used()
const;
44 INLINE ValueType get_value_type()
const;
45 INLINE
const std::string &get_description()
const;
46 INLINE
int get_flags()
const;
47 INLINE
bool is_closed()
const;
48 INLINE
int get_trust_level()
const;
49 INLINE
bool is_dynamic()
const;
52 void set_value_type(ValueType value_type);
53 void set_flags(
int flags);
54 void set_description(
const std::string &description);
55 void set_default_value(
const std::string &default_value);
56 INLINE
void set_used();
59 bool clear_local_value();
60 INLINE
bool has_local_value()
const;
62 bool has_value()
const;
63 size_t get_num_declarations()
const;
65 MAKE_SEQ(get_declarations, get_num_declarations, get_declaration);
67 INLINE
size_t get_num_references()
const;
69 MAKE_SEQ(get_references, get_num_references, get_reference);
71 INLINE
size_t get_num_trusted_references()
const;
73 MAKE_SEQ(get_trusted_references, get_num_trusted_references, get_trusted_reference);
75 INLINE
size_t get_num_unique_references()
const;
77 MAKE_SEQ(get_unique_references, get_num_unique_references, get_unique_reference);
78 MAKE_SEQ_PROPERTY(declarations, get_num_declarations, get_declaration);
80 void output(std::ostream &out)
const;
81 void write(std::ostream &out)
const;
83 MAKE_PROPERTY(name, get_name);
84 MAKE_PROPERTY(used, is_used);
85 MAKE_PROPERTY(closed, is_closed);
86 MAKE_PROPERTY(trust_level, get_trust_level);
87 MAKE_PROPERTY(dynamic, is_dynamic);
89 MAKE_PROPERTY(value_type, get_value_type, set_value_type);
90 MAKE_PROPERTY(description, get_description, set_description);
91 MAKE_PROPERTY(default_value, get_default_value, set_default_value);
93 MAKE_SEQ_PROPERTY(references, get_num_references, get_reference);
94 MAKE_SEQ_PROPERTY(trusted_references, get_num_trusted_references, get_trusted_reference);
95 MAKE_SEQ_PROPERTY(unique_references, get_num_unique_references, get_unique_reference);
101 INLINE
void check_sort_declarations()
const;
102 void sort_declarations();
107 ValueType _value_type;
108 std::string _description;
113 typedef std::vector<const ConfigDeclaration *> Declarations;
114 Declarations _declarations;
115 Declarations _trusted_declarations;
116 Declarations _untrusted_declarations;
117 Declarations _unique_declarations;
118 bool _declarations_sorted;
125 INLINE std::ostream &operator << (std::ostream &out,
const ConfigVariableCore &variable);
The internal definition of a ConfigVariable.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class is the base class of both ConfigVariable and ConfigVariableCore.
A global object that maintains the set of ConfigVariables (actually, ConfigVariableCores) everywhere ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A single declaration of a config variable, typically defined as one line in a .prc file,...