Panda3D
|
This class is similar to ConfigVariable, but it reports its value as a list of strings. More...
#include "configVariableList.h"
Public Member Functions | |
ConfigVariableList (const string &name, const string &description=string(), int flags=0) | |
int | get_num_unique_values () const |
Returns the number of unique values in the variable. | |
int | get_num_values () const |
Returns the number of values in the variable. | |
string | get_string_value (int n) const |
Returns the nth value of the variable. | |
string | get_unique_value (int n) const |
Returns the nth unique value of the variable. | |
string | operator[] (int n) const |
Returns the nth unique value of the variable. | |
void | output (ostream &out) const |
int | size () const |
Returns the number of unique values of the variable. | |
void | write (ostream &out) const |
This class is similar to ConfigVariable, but it reports its value as a list of strings.
In this special case, all of the declarations of the variable are returned as the elements of this list, in order.
Note that this is different from a normal ConfigVariableString, which just returns its topmost value, which can optionally be treated as a number of discrete words by dividing it at the spaces.
A ConfigVariableList cannot be modified locally.
Definition at line 35 of file configVariableList.h.
int ConfigVariableList::get_num_unique_values | ( | ) | const [inline] |
Returns the number of unique values in the variable.
Definition at line 80 of file configVariableList.I.
References ConfigVariableCore::get_num_unique_references().
Referenced by Texture::adjust_size(), VirtualFileSystem::get_global_ptr(), and size().
int ConfigVariableList::get_num_values | ( | ) | const [inline] |
Returns the number of values in the variable.
Definition at line 54 of file configVariableList.I.
References ConfigVariableCore::get_num_trusted_references().
string ConfigVariableList::get_string_value | ( | int | n | ) | const [inline] |
Returns the nth value of the variable.
Definition at line 65 of file configVariableList.I.
References ConfigDeclaration::get_string_value(), and ConfigVariableCore::get_trusted_reference().
string ConfigVariableList::get_unique_value | ( | int | n | ) | const [inline] |
Returns the nth unique value of the variable.
Definition at line 91 of file configVariableList.I.
References ConfigDeclaration::get_string_value(), and ConfigVariableCore::get_unique_reference().
Referenced by Texture::adjust_size(), VirtualFileSystem::get_global_ptr(), and operator[]().
string ConfigVariableList::operator[] | ( | int | n | ) | const [inline] |
Returns the nth unique value of the variable.
Note that the indexing operator returns the list of unique values, and so the maximum range is get_num_unique_values().
Definition at line 119 of file configVariableList.I.
References get_unique_value().
int ConfigVariableList::size | ( | ) | const [inline] |
Returns the number of unique values of the variable.
Definition at line 106 of file configVariableList.I.
References get_num_unique_values().