Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Member Functions
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

List of all members.

Public Member Functions

 ConfigVariableList (string name, string description, int flags)
 ConfigVariableList (string name, string description)
 ConfigVariableList (string name)
int getNumUniqueValues ()
 Returns the number of unique values in the variable.
int getNumValues ()
 Returns the number of values in the variable.
string getStringValue (int n)
 Returns the nth value of the variable.
string getUniqueValue (int n)
 Returns the nth unique value of the variable.
string operator[] (int n)
 Returns the nth unique value of the variable.
 output (ostream out)
int size ()
 Returns the number of unique values of the variable.
 write (ostream out)

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.


Constructor & Destructor Documentation

ConfigVariableList ( string  name,
string  description,
int  flags 
)
ConfigVariableList ( string  name,
string  description 
)
ConfigVariableList ( string  name)

Member Function Documentation

Returns the number of unique values in the variable.

Returns the number of values in the variable.

string getStringValue ( int  n)

Returns the nth value of the variable.

string getUniqueValue ( int  n)

Returns the nth unique value of the variable.

string operator[] ( int  n)

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().

output ( ostream  out)

Reimplemented from ConfigVariableBase.

int size ( )

Returns the number of unique values of the variable.

write ( ostream  out)

Reimplemented from ConfigVariableBase.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties