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

digraph inheritance3bed75182e { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "ConfigDeclaration" [URL="acron.core.ConfigDeclaration.html#acron.core.ConfigDeclaration",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "ConfigFlags" -> "ConfigDeclaration" [arrowsize=0.75,style=""]; "ConfigFlags" [URL="acron.core.ConfigFlags.html#acron.core.ConfigFlags",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ConfigFlags" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; }
ConfigDeclaration.get_bool_word()

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

ConfigDeclaration.get_decl_seq()

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.

ConfigDeclaration.get_double_word()

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

ConfigDeclaration.get_filename_value()

Interprets the string value as a filename and returns it, with any variables expanded.

ConfigDeclaration.get_int64_word()

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

ConfigDeclaration.get_int_word()

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

ConfigDeclaration.get_num_words()

Returns the number of words in the declaration’s value. A word is defined as a sequence of non-whitespace characters delimited by whitespace.

ConfigDeclaration.get_page()

Returns the page on which this declaration can be found.

ConfigDeclaration.get_string_value()

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

ConfigDeclaration.get_string_word()

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

ConfigDeclaration.get_variable()

Returns the variable that this declaration names. This variable may or may not have been defined by the time the declaration is read.

ConfigDeclaration.has_bool_word()

Returns true if the declaration’s value has a valid boolean value for the nth word.

ConfigDeclaration.has_double_word()

Returns true if the declaration’s value has a valid integer value for the nth word.

ConfigDeclaration.has_int64_word()

Returns true if the declaration’s value has a valid int64 value for the nth word.

ConfigDeclaration.has_int_word()

Returns true if the declaration’s value has a valid integer value for the nth word.

ConfigDeclaration.has_string_word()

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.

ConfigDeclaration.output()
ConfigDeclaration.set_bool_word()

Changes the nth word to the indicated value without affecting the other words.

ConfigDeclaration.set_double_word()

Changes the nth word to the indicated value without affecting the other words.

ConfigDeclaration.set_int64_word()

Changes the nth word to the indicated value without affecting the other words.

ConfigDeclaration.set_int_word()

Changes the nth word to the indicated value without affecting the other words.

ConfigDeclaration.set_string_value()

Changes the value assigned to this variable.

ConfigDeclaration.set_string_word()

Changes the nth word to the indicated value without affecting the other words.

ConfigDeclaration.write()