ConfigPage
from panda3d.core import ConfigPage
- class ConfigPage
- Bases: - DTOOL_SUPER_BASE- A page of ConfigDeclarations that may be loaded or unloaded. Typically this represents a single .prc file that is read from disk at runtime, but it may also represent a list of declarations built up by application code and explicitly loaded. - Inheritance diagram - __init__(*args, **kwargs)
 - clear()
- C++ Interface: clear(const ConfigPage self) - /**
- Removes all of the declarations from the page. 
 - */ 
 
 - declarations
 - deleteDeclaration()
- C++ Interface: delete_declaration(const ConfigPage self, ConfigDeclaration decl) - /**
- Removes the indicated declaration from the page and deletes it. Returns 
- true if the declaration is successfully removed, false if it was not on the 
- page. 
 - */ 
 
 - delete_declaration()
- C++ Interface: delete_declaration(const ConfigPage self, ConfigDeclaration decl) - /**
- Removes the indicated declaration from the page and deletes it. Returns 
- true if the declaration is successfully removed, false if it was not on the 
- page. 
 - */ 
 
 - getDeclaration()
- C++ Interface: get_declaration(ConfigPage self, int n) - /**
- Returns the nth declaration on the page. 
 - */ 
 
 - getDefaultPage()
- C++ Interface: get_default_page() - /**
- Returns a pointer to the global “default page”. This is the ConfigPage 
- that lists all variables’ original default values. 
 - */ 
 
 - getLocalPage()
- C++ Interface: get_local_page() - /**
- Returns a pointer to the global “local page”. This is the ConfigPage that 
- lists the locally-assigned values for any variables in the world that have 
- such a local assignment. 
 - */ 
 
 - getName()
- C++ Interface: get_name(ConfigPage self) - /**
- Returns the name of the page. If the page was loaded from a .prc file, 
- this is usually the filename. 
 - */ 
 
 - getNumDeclarations()
- C++ Interface: get_num_declarations(ConfigPage self) - /**
- Returns the number of declarations on the page. 
 - */ 
 
 - getPageSeq()
- C++ Interface: get_page_seq(ConfigPage self) - /**
- Returns the sequence number of the page. 
- Sequence numbers for a particular class (implicit vs. explicit) of pages 
- are assigned as each page is loaded; each page is given a higher sequence 
- number than all the pages loaded before it. 
- The implicit_load pages, which are discovered in the file system 
- automatically, have a different set of sequence numbers than the explicit 
- pages. 
 - */ 
 
 - getSignature()
- C++ Interface: get_signature(ConfigPage self) - /**
- Returns the raw binary signature that was found in the prc file, if any. 
- This method is probably not terribly useful for most applications. 
 - */ 
 
 - getSort()
- C++ Interface: get_sort(ConfigPage self) - /**
- Returns the explicit sort order of this particular ConfigPage. See 
- set_sort(). 
 - */ 
 
 - getStringValue()
- C++ Interface: get_string_value(ConfigPage self, int n) - /**
- Returns the value assigned by the nth declaration on the page. 
 - */ 
 
 - getTrustLevel()
- C++ Interface: get_trust_level(ConfigPage self) - /**
- Returns the trust level associated with this page. An untrusted page is 
- trust level 0; if the page was loaded from a signed .prc file, its trust 
- level is the index number of the certificate that signed it. Generally, a 
- higher trust level value represents a greater level of trust. 
 - */ 
 
 - getVariableName()
- C++ Interface: get_variable_name(ConfigPage self, int n) - /**
- Returns the variable named by the nth declaration on the page. 
 - */ 
 
 - get_declaration()
- C++ Interface: get_declaration(ConfigPage self, int n) - /**
- Returns the nth declaration on the page. 
 - */ 
 
 - get_default_page()
- C++ Interface: get_default_page() - /**
- Returns a pointer to the global “default page”. This is the ConfigPage 
- that lists all variables’ original default values. 
 - */ 
 
 - get_local_page()
- C++ Interface: get_local_page() - /**
- Returns a pointer to the global “local page”. This is the ConfigPage that 
- lists the locally-assigned values for any variables in the world that have 
- such a local assignment. 
 - */ 
 
 - get_name()
- C++ Interface: get_name(ConfigPage self) - /**
- Returns the name of the page. If the page was loaded from a .prc file, 
- this is usually the filename. 
 - */ 
 
 - get_num_declarations()
- C++ Interface: get_num_declarations(ConfigPage self) - /**
- Returns the number of declarations on the page. 
 - */ 
 
 - get_page_seq()
- C++ Interface: get_page_seq(ConfigPage self) - /**
- Returns the sequence number of the page. 
- Sequence numbers for a particular class (implicit vs. explicit) of pages 
- are assigned as each page is loaded; each page is given a higher sequence 
- number than all the pages loaded before it. 
- The implicit_load pages, which are discovered in the file system 
- automatically, have a different set of sequence numbers than the explicit 
- pages. 
 - */ 
 
 - get_signature()
- C++ Interface: get_signature(ConfigPage self) - /**
- Returns the raw binary signature that was found in the prc file, if any. 
- This method is probably not terribly useful for most applications. 
 - */ 
 
 - get_sort()
- C++ Interface: get_sort(ConfigPage self) - /**
- Returns the explicit sort order of this particular ConfigPage. See 
- set_sort(). 
 - */ 
 
 - get_string_value()
- C++ Interface: get_string_value(ConfigPage self, int n) - /**
- Returns the value assigned by the nth declaration on the page. 
 - */ 
 
 - get_trust_level()
- C++ Interface: get_trust_level(ConfigPage self) - /**
- Returns the trust level associated with this page. An untrusted page is 
- trust level 0; if the page was loaded from a signed .prc file, its trust 
- level is the index number of the certificate that signed it. Generally, a 
- higher trust level value represents a greater level of trust. 
 - */ 
 
 - get_variable_name()
- C++ Interface: get_variable_name(ConfigPage self, int n) - /**
- Returns the variable named by the nth declaration on the page. 
 - */ 
 
 - implicit
 - isImplicit()
- C++ Interface: is_implicit(ConfigPage self) - /**
- Returns true if the page was loaded by implicitly searching the config path 
- on startup, or false if it was explicitly loaded by dynamic code after 
- initial startup. 
 - */ 
 
 - isSpecial()
- C++ Interface: is_special(ConfigPage self) - /**
- Returns true if this is the special “default” or “local” page, or false if 
- it is an ordinary page, e.g. an implicit page loaded from a prc file at 
- startup, or an explicit page created by 
- ConfigPageManager::make_explicit_page(). 
 - */ 
 
 - isVariableUsed()
- C++ Interface: is_variable_used(ConfigPage self, int n) - /**
- Returns true if the nth active variable on the page has been used by code, 
- false otherwise. 
 - */ 
 
 - is_implicit()
- C++ Interface: is_implicit(ConfigPage self) - /**
- Returns true if the page was loaded by implicitly searching the config path 
- on startup, or false if it was explicitly loaded by dynamic code after 
- initial startup. 
 - */ 
 
 - is_special()
- C++ Interface: is_special(ConfigPage self) - /**
- Returns true if this is the special “default” or “local” page, or false if 
- it is an ordinary page, e.g. an implicit page loaded from a prc file at 
- startup, or an explicit page created by 
- ConfigPageManager::make_explicit_page(). 
 - */ 
 
 - is_variable_used()
- C++ Interface: is_variable_used(ConfigPage self, int n) - /**
- Returns true if the nth active variable on the page has been used by code, 
- false otherwise. 
 - */ 
 
 - makeDeclaration()
- C++ Interface: make_declaration(const ConfigPage self, ConfigVariableCore variable, str value) make_declaration(const ConfigPage self, str variable, str value) 
 - make_declaration()
- C++ Interface: make_declaration(const ConfigPage self, ConfigVariableCore variable, str value) make_declaration(const ConfigPage self, str variable, str value) 
 - modifyDeclaration()
- C++ Interface: modify_declaration(const ConfigPage self, int n) - /**
- Returns a modifiable pointer to the nth declaration on the page. Any 
- modifications will appear in the output, if the page is written out with 
- ConfigPage::write(). 
 - */ 
 
 - modify_declaration()
- C++ Interface: modify_declaration(const ConfigPage self, int n) - /**
- Returns a modifiable pointer to the nth declaration on the page. Any 
- modifications will appear in the output, if the page is written out with 
- ConfigPage::write(). 
 - */ 
 
 - name
 - outputBriefSignature()
- C++ Interface: output_brief_signature(ConfigPage self, ostream out) - /**
- Outputs the first few hex digits of the signature. 
 - */ 
 
 - output_brief_signature()
- C++ Interface: output_brief_signature(ConfigPage self, ostream out) - /**
- Outputs the first few hex digits of the signature. 
 - */ 
 
 - page_seq
 - readEncryptedPrc()
- C++ Interface: read_encrypted_prc(const ConfigPage self, istream in, str password) - /**
- Automatically decrypts and reads the stream, given the indicated password. 
- Note that if the password is incorrect, the result may be garbage. 
 - */ 
 
 - readPrc()
- C++ Interface: read_prc(const ConfigPage self, istream in) - /**
- Reads the contents of a complete prc file, as returned by the indicated 
- istream, into the current page file. Returns true on success, or false on 
- some I/O error. 
- This is a low-level interface. Normally you do not need to call it 
- directly. See the global functions load_prc_file() and unload_prc_file(), 
- defined in panda/src/putil, for a higher-level interface. 
 - */ 
 
 - read_encrypted_prc()
- C++ Interface: read_encrypted_prc(const ConfigPage self, istream in, str password) - /**
- Automatically decrypts and reads the stream, given the indicated password. 
- Note that if the password is incorrect, the result may be garbage. 
 - */ 
 
 - read_prc()
- C++ Interface: read_prc(const ConfigPage self, istream in) - /**
- Reads the contents of a complete prc file, as returned by the indicated 
- istream, into the current page file. Returns true on success, or false on 
- some I/O error. 
- This is a low-level interface. Normally you do not need to call it 
- directly. See the global functions load_prc_file() and unload_prc_file(), 
- defined in panda/src/putil, for a higher-level interface. 
 - */ 
 
 - setSort()
- C++ Interface: set_sort(const ConfigPage self, int sort) - /**
- Changes the explicit sort order of this particular ConfigPage. Lower- 
- numbered pages supercede higher-numbered pages. Initially, all explicitly- 
- loaded pages have sort value 0, and implicitly-loaded pages (found on disk) 
- have sort value 10; you may set an individual page higher or lower to 
- influence its priority relative to other pages. 
 - */ 
 
 - setTrustLevel()
- C++ Interface: set_trust_level(const ConfigPage self, int trust_level) - /**
- Explicitly sets the trust level on this particular page. Note that any 
- subsequent changes to the page, or to any variable declarations on it, will 
- reset the trust level to zero. 
 - */ 
 
 - set_sort()
- C++ Interface: set_sort(const ConfigPage self, int sort) - /**
- Changes the explicit sort order of this particular ConfigPage. Lower- 
- numbered pages supercede higher-numbered pages. Initially, all explicitly- 
- loaded pages have sort value 0, and implicitly-loaded pages (found on disk) 
- have sort value 10; you may set an individual page higher or lower to 
- influence its priority relative to other pages. 
 - */ 
 
 - set_trust_level()
- C++ Interface: set_trust_level(const ConfigPage self, int trust_level) - /**
- Explicitly sets the trust level on this particular page. Note that any 
- subsequent changes to the page, or to any variable declarations on it, will 
- reset the trust level to zero. 
 - */ 
 
 - signature
 - sort
 - special
 - trust_level
 
