Panda3D
|
A single declaration of a config variable, typically defined as one line in a .prc file, e.g. More...
Public Member Functions | |
bool | getBoolWord (int n) |
Returns the boolean value of the nth word of the declaration's value, or false if there is no nth value. More... | |
int | getDeclSeq () |
Returns the sequence number of the declaration within the page. More... | |
double | getDoubleWord (int n) |
Returns the integer value of the nth word of the declaration's value, or 0 if there is no nth value. More... | |
Filename | getFilenameValue () |
Interprets the string value as a filename and returns it, with any variables expanded. More... | |
int64_t | getInt64Word (int n) |
Returns the int64 value of the nth word of the declaration's value, or 0 if there is no nth value. More... | |
int | getIntWord (int n) |
Returns the integer value of the nth word of the declaration's value, or 0 if there is no nth value. More... | |
int | getNumWords () |
Returns the number of words in the declaration's value. More... | |
ConfigPage | getPage () |
Returns the page on which this declaration can be found. More... | |
str | getStringValue () |
Returns the value assigned to this variable. More... | |
str | getStringWord (int n) |
Returns the string value of the nth word of the declaration's value, or empty string if there is no nth value. More... | |
ConfigVariableCore | getVariable () |
Returns the variable that this declaration names. More... | |
bool | hasBoolWord (int n) |
Returns true if the declaration's value has a valid boolean value for the nth word. More... | |
bool | hasDoubleWord (int n) |
Returns true if the declaration's value has a valid integer value for the nth word. More... | |
bool | hasInt64Word (int n) |
Returns true if the declaration's value has a valid int64 value for the nth word. More... | |
bool | hasIntWord (int n) |
Returns true if the declaration's value has a valid integer value for the nth word. More... | |
bool | hasStringWord (int n) |
Returns true if the declaration's value has a valid string value for the nth word. More... | |
output (Ostream out) | |
setBoolWord (int n, bool value) | |
Changes the nth word to the indicated value without affecting the other words. More... | |
setDoubleWord (int n, double value) | |
Changes the nth word to the indicated value without affecting the other words. More... | |
setInt64Word (int n, int64_t value) | |
Changes the nth word to the indicated value without affecting the other words. More... | |
setIntWord (int n, int value) | |
Changes the nth word to the indicated value without affecting the other words. More... | |
setStringValue (str value) | |
Changes the value assigned to this variable. More... | |
setStringWord (int n, str value) | |
Changes the nth word to the indicated value without affecting the other words. More... | |
write (Ostream out) | |
![]() | |
__init__ () | |
__init__ (const ConfigFlags) | |
Public Attributes | |
ConfigPage | page |
Returns the page on which this declaration can be found. More... | |
ConfigVariableCore | variable |
Returns the variable that this declaration names. More... | |
Additional Inherited Members | |
![]() | |
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 } |
A single declaration of a config variable, typically defined as one line in a .prc file, e.g.
"show-frame-rate-meter 1". This is really just a pairing of a string name (actually, a ConfigVariableCore pointer) to a string value.
bool getBoolWord | ( | int | n | ) |
Returns the boolean value of the nth word of the declaration's value, or false if there is no nth value.
See also has_bool_word().
int getDeclSeq | ( | ) |
Returns the sequence number of the declaration within the page.
Sequence numbers are assigned as each declaration is created; each declaration is given a higher sequence number than all the declarations created in the page before it.
double getDoubleWord | ( | int | n | ) |
Returns the integer value of the nth word of the declaration's value, or 0 if there is no nth value.
See also has_double_word().
Filename getFilenameValue | ( | ) |
Interprets the string value as a filename and returns it, with any variables expanded.
int64_t getInt64Word | ( | int | n | ) |
Returns the int64 value of the nth word of the declaration's value, or 0 if there is no nth value.
See also has_int64_word().
int getIntWord | ( | int | n | ) |
Returns the integer value of the nth word of the declaration's value, or 0 if there is no nth value.
See also has_int_word().
int getNumWords | ( | ) |
Returns the number of words in the declaration's value.
A word is defined as a sequence of non-whitespace characters delimited by whitespace.
ConfigPage getPage | ( | ) |
Returns the page on which this declaration can be found.
str getStringValue | ( | ) |
Returns the value assigned to this variable.
This is the original one-line text defined for the variable in the .prc file (or passed to ConfigPage::make_declaration()).
str getStringWord | ( | int | n | ) |
Returns the string value of the nth word of the declaration's value, or empty string if there is no nth value.
See also has_string_word().
ConfigVariableCore getVariable | ( | ) |
Returns the variable that this declaration names.
This variable may or may not have been defined by the time the declaration is read.
bool hasBoolWord | ( | int | n | ) |
Returns true if the declaration's value has a valid boolean value for the nth word.
bool hasDoubleWord | ( | int | n | ) |
Returns true if the declaration's value has a valid integer value for the nth word.
bool hasInt64Word | ( | int | n | ) |
Returns true if the declaration's value has a valid int64 value for the nth word.
bool hasIntWord | ( | int | n | ) |
Returns true if the declaration's value has a valid integer value for the nth word.
bool hasStringWord | ( | int | n | ) |
Returns true if the declaration's value has a valid string value for the nth word.
This is really the same thing as asking if there are at least n words in the value.
output | ( | Ostream | out | ) |
setBoolWord | ( | int | n, |
bool | value | ||
) |
Changes the nth word to the indicated value without affecting the other words.
setDoubleWord | ( | int | n, |
double | value | ||
) |
Changes the nth word to the indicated value without affecting the other words.
setInt64Word | ( | int | n, |
int64_t | value | ||
) |
Changes the nth word to the indicated value without affecting the other words.
setIntWord | ( | int | n, |
int | value | ||
) |
Changes the nth word to the indicated value without affecting the other words.
setStringValue | ( | str | value | ) |
Changes the value assigned to this variable.
setStringWord | ( | int | n, |
str | value | ||
) |
Changes the nth word to the indicated value without affecting the other words.
write | ( | Ostream | out | ) |
ConfigPage page |
Returns the page on which this declaration can be found.
ConfigVariableCore variable |
Returns the variable that this declaration names.
This variable may or may not have been defined by the time the declaration is read.