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. More... | |
int | get_num_values () const |
Returns the number of values in the variable. More... | |
string | get_string_value (int n) const |
Returns the nth value of the variable. More... | |
string | get_unique_value (int n) const |
Returns the nth unique value of the variable. More... | |
string | operator[] (int n) const |
Returns the nth unique value of the variable. More... | |
void | output (ostream &out) const |
int | size () const |
Returns the number of unique values of the variable. More... | |
void | write (ostream &out) const |
![]() | |
bool | clear_local_value () |
Removes the local value defined for this variable, and allows its value to be once again retrieved from the .prc files. More... | |
const string & | get_description () const |
Returns the brief description of this variable, if it has been defined. More... | |
int | get_flags () const |
Returns the flags value as set by set_flags(). More... | |
const string & | get_name () const |
Returns the name of the variable. More... | |
int | get_trust_level () const |
Returns the minimum trust_level a prc file must demonstrate in order to redefine the value for this variable. More... | |
ValueType | get_value_type () const |
Returns the stated type of this variable. More... | |
bool | has_local_value () const |
Returns true if this variable's value has been shadowed by a local assignment (as created via make_local_value()), or false otherwise. More... | |
bool | has_value () const |
Returns true if this variable has an explicit value, either from a prc file or locally set, or false if variable has its default value. More... | |
bool | is_closed () const |
Returns true if the variable is not trusted by any prc file (and hence cannot be modified from its compiled-in default value), or false for the normal case, in which the variable can be modified by any prc file at or above its trust level (see get_trust_level()). More... | |
bool | is_dynamic () const |
Returns true if the variable was indicated as "dynamic" by its constructor, indicating that its name was dynamically generated, possibly from a large pool, and it should not be listed along with the other variables. More... | |
void | output (ostream &out) const |
void | write (ostream &out) const |
Additional Inherited Members | |
![]() | |
enum | ValueType { VT_undefined, VT_list, VT_string, VT_filename, VT_bool, VT_int, VT_double, VT_enum, VT_search_path, VT_int64, VT_color } |
enum | VariableFlags { F_trust_level_mask = 0x00000fff, F_open = 0x00001000, F_closed = 0x00002000, F_dynamic = 0x00004000, F_dconfig = 0x00008000 } |
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.
|
inline |
Returns the number of unique values in the variable.
Definition at line 80 of file configVariableList.I.
References get_unique_value().
Referenced by Texture::adjust_size(), TexturePool::get_global_ptr(), VirtualFileSystem::get_global_ptr(), get_string_value(), MovieTypeRegistry::load_audio_types(), MovieTypeRegistry::load_video_types(), CullBinManager::register_bin_type(), and size().
|
inline |
Returns the number of values in the variable.
Definition at line 54 of file configVariableList.I.
References get_string_value().
|
inline |
Returns the nth value of the variable.
Definition at line 65 of file configVariableList.I.
References get_num_unique_values(), and ConfigDeclaration::get_string_value().
Referenced by get_num_values().
|
inline |
Returns the nth unique value of the variable.
Definition at line 91 of file configVariableList.I.
References ConfigDeclaration::get_string_value(), and size().
Referenced by Texture::adjust_size(), TexturePool::get_global_ptr(), VirtualFileSystem::get_global_ptr(), get_num_unique_values(), MovieTypeRegistry::load_audio_types(), MovieTypeRegistry::load_video_types(), operator[](), and CullBinManager::register_bin_type().
|
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().
Referenced by size().
|
inline |
Returns the number of unique values of the variable.
Definition at line 106 of file configVariableList.I.
References get_num_unique_values(), and operator[]().
Referenced by DCFile::clear(), and get_unique_value().