Panda3D
Public Member Functions | List of all members
ConfigVariableList Class Reference

This class is similar to ConfigVariable, but it reports its value as a list of strings. More...

Inheritance diagram for ConfigVariableList:
ConfigVariableBase ConfigFlags

Public Member Functions

 __init__ (const ConfigVariableList)
 
 __init__ (str name, str description, int flags)
 
int getNumUniqueValues ()
 Returns the number of unique values in the variable. More...
 
int getNumValues ()
 Returns the number of values in the variable. More...
 
str getStringValue (int n)
 Returns the nth value of the variable. More...
 
str getUniqueValue (int n)
 Returns the nth unique value of the variable. More...
 
str operator [] (int n)
 
 output (Ostream out)
 
int size ()
 Returns the number of unique values of the variable. More...
 
 write (Ostream out)
 
- Public Member Functions inherited from ConfigVariableBase
bool clearLocalValue ()
 Removes the local value defined for this variable, and allows its value to be once again retrieved from the .prc files. More...
 
str getDescription ()
 Returns the brief description of this variable, if it has been defined. More...
 
int getFlags ()
 Returns the flags value as set by set_flags(). More...
 
str getName ()
 Returns the name of the variable. More...
 
int getTrustLevel ()
 Returns the minimum trust_level a prc file must demonstrate in order to redefine the value for this variable. More...
 
ConfigFlags::ValueType getValueType ()
 Returns the stated type of this variable. More...
 
bool hasLocalValue ()
 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 hasValue ()
 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 isClosed ()
 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 isDynamic ()
 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...
 
 output (Ostream out)
 
 write (Ostream out)
 
- Public Member Functions inherited from ConfigFlags
 __init__ ()
 
 __init__ (const ConfigFlags)
 

Additional Inherited Members

- Public Types inherited from ConfigFlags
enum  ValueType {
  VT_undefined = 0, VT_list = 1, VT_string = 2, VT_filename = 3,
  VT_bool = 4, VT_int = 5, VT_double = 6, VT_enum = 7,
  VT_search_path = 8, VT_int64 = 9, VT_color = 10
}
 
enum  VariableFlags {
  F_trust_level_mask = 4095, F_open = 4096, F_closed = 8192, F_dynamic = 16384,
  F_dconfig = 32768
}
 
- Public Attributes inherited from ConfigVariableBase
bool closed
 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...
 
const String description
 Returns the brief description of this variable, if it has been defined. More...
 
bool dynamic
 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...
 
const String name
 Returns the name of the variable. More...
 
int trust_level
 Returns the minimum trust_level a prc file must demonstrate in order to redefine the value for this variable. More...
 
ConfigFlags::ValueType value_type
 Returns the stated type of this variable. More...
 

Detailed Description

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.

Member Function Documentation

◆ __init__() [1/2]

__init__ ( const  ConfigVariableList)

◆ __init__() [2/2]

__init__ ( str  name,
str  description,
int  flags 
)

◆ getNumUniqueValues()

int getNumUniqueValues ( )

Returns the number of unique values in the variable.

◆ getNumValues()

int getNumValues ( )

Returns the number of values in the variable.

◆ getStringValue()

str getStringValue ( int  n)

Returns the nth value of the variable.

◆ getUniqueValue()

str getUniqueValue ( int  n)

Returns the nth unique value of the variable.

◆ operator []()

str operator [] ( int  n)

◆ output()

output ( Ostream  out)

◆ size()

int size ( )

Returns the number of unique values of the variable.

◆ write()

write ( Ostream  out)