Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions

# ConfigDeclaration Class Reference

A single declaration of a config variable, typically defined as one line in a .prc file, e.g. More...

Inheritance diagram for ConfigDeclaration:

List of all members.

## 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.
int | getDeclSeq ()
| Returns the sequence number of the declaration within the page.
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.
long long int | getInt64Word (int n)
| Returns the int64 value of the nth word of the declaration's value, or 0 if there is no nth value.
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.
int | getNumWords ()
| Returns the number of words in the declaration's value.
ConfigPage | getPage ()
| Returns the page on which this declaration can be found.
string | getStringValue ()
| Returns the value assigned to this variable.
string | 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.
ConfigVariableCore | getVariable ()
| Returns the variable that this declaration names.
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.
| output (ostream out)
| setBoolWord (int n, bool value)
| setDoubleWord (int n, double value)
| setInt64Word (int n, long long int value)
| setIntWord (int n, int value)
| setStringValue (string value)
| Changes the value assigned to this variable.
| setStringWord (int n, string value)
| write (ostream out)

## Detailed Description

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.

## Member Function Documentation

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

long long int 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.

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

string 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
| ) |  |

setDoubleWord | ( | int | n,
|  | double | value
| ) |  |

setInt64Word | ( | int | n,
|  | long long int | value
| ) |  |

setIntWord | ( | int | n,
|  | int | value
| ) |  |

setStringValue | ( | string | value | ) |

Changes the value assigned to this variable.

setStringWord | ( | int | n,
|  | string | value
| ) |  |

write | ( | ostream | out | ) |

All Classes Namespaces Functions Variables Enumerations Enumerator Properties