17 INLINE ConfigVariableList::
18 ~ConfigVariableList() {
24 INLINE ConfigVariableList::
25 ConfigVariableList(
const std::string &name,
26 const std::string &description,
int flags) :
27 #ifdef PRC_SAVE_DESCRIPTIONS
36 if (_core->get_default_value() ==
nullptr) {
37 _core->set_default_value(
"");
47 nassertr(_core !=
nullptr, 0);
48 return _core->get_num_trusted_references();
56 nassertr(_core !=
nullptr, std::string());
58 if (decl !=
nullptr) {
69 nassertr(_core !=
nullptr, 0);
70 return _core->get_num_unique_references();
78 nassertr(_core !=
nullptr, std::string());
80 if (decl !=
nullptr) {
104 INLINE std::ostream &
106 variable.output(out);
const std::string & get_string_value() const
Returns the value assigned to this variable.
size_t get_num_unique_values() const
Returns the number of unique values in the variable.
size_t get_num_values() const
Returns the number of values in the variable.
This class is similar to ConfigVariable, but it reports its value as a list of strings.
std::string operator [](size_t n) const
Returns the nth unique value of the variable.
size_t size() const
Returns the number of unique values of the variable.
std::string get_string_value(size_t n) const
Returns the nth value of the variable.
std::string get_unique_value(size_t n) const
Returns the nth unique value of the variable.
This class is the base class for both ConfigVariableList and ConfigVariable (and hence for all of the...
A single declaration of a config variable, typically defined as one line in a .prc file,...