ConfigDeclaration

from panda3d.core import ConfigDeclaration
class ConfigDeclaration

Bases: ConfigFlags

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.

Inheritance diagram

Inheritance diagram of ConfigDeclaration

__init__(*args, **kwargs)
getBoolWord()

C++ Interface: get_bool_word(ConfigDeclaration self, 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().

*/

getDeclSeq()

C++ Interface: get_decl_seq(ConfigDeclaration self)

/**
  • 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.

*/

getDoubleWord()

C++ Interface: get_double_word(ConfigDeclaration self, 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().

*/

getFilenameValue()

C++ Interface: get_filename_value(ConfigDeclaration self)

/**
  • Interprets the string value as a filename and returns it, with any

  • variables expanded.

*/

getInt64Word()

C++ Interface: get_int64_word(ConfigDeclaration self, 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().

*/

getIntWord()

C++ Interface: get_int_word(ConfigDeclaration self, 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().

*/

getNumWords()

C++ Interface: get_num_words(ConfigDeclaration self)

/**
  • Returns the number of words in the declaration’s value. A word is defined

  • as a sequence of non-whitespace characters delimited by whitespace.

*/

getPage()

C++ Interface: get_page(ConfigDeclaration self)

/**
  • Returns the page on which this declaration can be found.

*/

getStringValue()

C++ Interface: get_string_value(ConfigDeclaration self)

/**
  • 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()).

*/

getStringWord()

C++ Interface: get_string_word(ConfigDeclaration self, 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().

*/

getVariable()

C++ Interface: get_variable(ConfigDeclaration self)

/**
  • Returns the variable that this declaration names. This variable may or may

  • not have been defined by the time the declaration is read.

*/

get_bool_word()

C++ Interface: get_bool_word(ConfigDeclaration self, 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().

*/

get_decl_seq()

C++ Interface: get_decl_seq(ConfigDeclaration self)

/**
  • 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.

*/

get_double_word()

C++ Interface: get_double_word(ConfigDeclaration self, 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().

*/

get_filename_value()

C++ Interface: get_filename_value(ConfigDeclaration self)

/**
  • Interprets the string value as a filename and returns it, with any

  • variables expanded.

*/

get_int64_word()

C++ Interface: get_int64_word(ConfigDeclaration self, 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().

*/

get_int_word()

C++ Interface: get_int_word(ConfigDeclaration self, 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().

*/

get_num_words()

C++ Interface: get_num_words(ConfigDeclaration self)

/**
  • Returns the number of words in the declaration’s value. A word is defined

  • as a sequence of non-whitespace characters delimited by whitespace.

*/

get_page()

C++ Interface: get_page(ConfigDeclaration self)

/**
  • Returns the page on which this declaration can be found.

*/

get_string_value()

C++ Interface: get_string_value(ConfigDeclaration self)

/**
  • 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()).

*/

get_string_word()

C++ Interface: get_string_word(ConfigDeclaration self, 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().

*/

get_variable()

C++ Interface: get_variable(ConfigDeclaration self)

/**
  • Returns the variable that this declaration names. This variable may or may

  • not have been defined by the time the declaration is read.

*/

hasBoolWord()

C++ Interface: has_bool_word(ConfigDeclaration self, int n)

/**
  • Returns true if the declaration’s value has a valid boolean value for the

  • nth word.

*/

hasDoubleWord()

C++ Interface: has_double_word(ConfigDeclaration self, int n)

/**
  • Returns true if the declaration’s value has a valid integer value for the

  • nth word.

*/

hasInt64Word()

C++ Interface: has_int64_word(ConfigDeclaration self, int n)

/**
  • Returns true if the declaration’s value has a valid int64 value for the nth

  • word.

*/

hasIntWord()

C++ Interface: has_int_word(ConfigDeclaration self, int n)

/**
  • Returns true if the declaration’s value has a valid integer value for the

  • nth word.

*/

hasStringWord()

C++ Interface: has_string_word(ConfigDeclaration self, 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.

*/

has_bool_word()

C++ Interface: has_bool_word(ConfigDeclaration self, int n)

/**
  • Returns true if the declaration’s value has a valid boolean value for the

  • nth word.

*/

has_double_word()

C++ Interface: has_double_word(ConfigDeclaration self, int n)

/**
  • Returns true if the declaration’s value has a valid integer value for the

  • nth word.

*/

has_int64_word()

C++ Interface: has_int64_word(ConfigDeclaration self, int n)

/**
  • Returns true if the declaration’s value has a valid int64 value for the nth

  • word.

*/

has_int_word()

C++ Interface: has_int_word(ConfigDeclaration self, int n)

/**
  • Returns true if the declaration’s value has a valid integer value for the

  • nth word.

*/

has_string_word()

C++ Interface: has_string_word(ConfigDeclaration self, 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()

C++ Interface: output(ConfigDeclaration self, ostream out)

/**

*/

page
setBoolWord()

C++ Interface: set_bool_word(const ConfigDeclaration self, int n, bool value)

/**
  • Changes the nth word to the indicated value without affecting the other

  • words.

*/

setDoubleWord()

C++ Interface: set_double_word(const ConfigDeclaration self, int n, double value)

/**
  • Changes the nth word to the indicated value without affecting the other

  • words.

*/

setInt64Word()

C++ Interface: set_int64_word(const ConfigDeclaration self, int n, long value)

/**
  • Changes the nth word to the indicated value without affecting the other

  • words.

*/

setIntWord()

C++ Interface: set_int_word(const ConfigDeclaration self, int n, int value)

/**
  • Changes the nth word to the indicated value without affecting the other

  • words.

*/

setStringValue()

C++ Interface: set_string_value(const ConfigDeclaration self, str value)

/**
  • Changes the value assigned to this variable.

*/

setStringWord()

C++ Interface: set_string_word(const ConfigDeclaration self, int n, str value)

/**
  • Changes the nth word to the indicated value without affecting the other

  • words.

*/

set_bool_word()

C++ Interface: set_bool_word(const ConfigDeclaration self, int n, bool value)

/**
  • Changes the nth word to the indicated value without affecting the other

  • words.

*/

set_double_word()

C++ Interface: set_double_word(const ConfigDeclaration self, int n, double value)

/**
  • Changes the nth word to the indicated value without affecting the other

  • words.

*/

set_int64_word()

C++ Interface: set_int64_word(const ConfigDeclaration self, int n, long value)

/**
  • Changes the nth word to the indicated value without affecting the other

  • words.

*/

set_int_word()

C++ Interface: set_int_word(const ConfigDeclaration self, int n, int value)

/**
  • Changes the nth word to the indicated value without affecting the other

  • words.

*/

set_string_value()

C++ Interface: set_string_value(const ConfigDeclaration self, str value)

/**
  • Changes the value assigned to this variable.

*/

set_string_word()

C++ Interface: set_string_word(const ConfigDeclaration self, int n, str value)

/**
  • Changes the nth word to the indicated value without affecting the other

  • words.

*/

variable
write()

C++ Interface: write(ConfigDeclaration self, ostream out)

/**

*/