# ConfigVariableBool

from pandac.PandaModules import ConfigVariableBool

Class : ConfigVariableBool
Description : This is a convenience class to specialize ConfigVariable as a boolean type.

## Inheritance:

ConfigVariableBool: ConfigVariable
ConfigVariable: ConfigVariableBase
ConfigVariableBase: ConfigFlags
ConfigFlags:

## Methods of ConfigVariableBool:

ConfigVariableBool (Constructor)
getDefaultValue
getValue
getWord
operator =
operator []
setValue
setWord
size

## Methods of ConfigVariable:

ConfigVariable (Constructor)
clearValue
getBoolWord
getDefaultValue
getDoubleWord
getInt64Word
getIntWord
getNumWords
getStringValue
getStringWord
hasBoolWord
hasDoubleWord
hasInt64Word
hasIntWord
hasStringWord
setBoolWord
setDoubleWord
setInt64Word
setIntWord
setStringValue
setStringWord

## Methods of ConfigVariableBase:

clearLocalValue
getDescription
getFlags
getName
getTrustLevel
getValueType
hasLocalValue
hasValue
isClosed
isDynamic
output
write

## Constants in ConfigFlags:

VTUndefined | (ValueType)
VTList | (ValueType)
VTString | (ValueType)
VTFilename | (ValueType)
VTBool | (ValueType)
VTInt | (ValueType)
VTDouble | (ValueType)
VTEnum | (ValueType)
VTSearchPath | (ValueType)
VTInt64 | (ValueType)
FTrustLevelMask | (VariableFlags)
FOpen | (VariableFlags)
FClosed | (VariableFlags)
FDynamic | (VariableFlags)
FDconfig | (VariableFlags)

ConfigVariableBool ConfigVariableBool::ConfigVariableBool(string const &name); Description:

getDefaultValue bool ConfigVariableBool::get_default_value(void) const; Description: Returns the variable's default value.

getValue bool ConfigVariableBool::get_value(void) const; Description: Returns the variable's value.

getWord bool ConfigVariableBool::get_word(int n) const; Description: Returns the variable's nth value.

operator = void ConfigVariableBool::operator =(bool value); Description: Reassigns the variable's local value.

operator [] bool ConfigVariableBool::operator [](int n) const; Description: Returns the value of the variable's nth word.

setValue void ConfigVariableBool::set_value(bool value); Description: Reassigns the variable's local value.

setWord void ConfigVariableBool::set_word(int n, bool value); Description: Reassigns the variable's nth value. This makes a local copy of the variable's overall value.

size int ConfigVariableBool::size(void) const; Description: Returns the number of unique words in the variable.

ConfigVariable ConfigVariable::ConfigVariable(string const &name); Description: This constructor is only intended to be called from a specialized ConfigVariableFoo derived class. Description: Use this constructor to make a ConfigVariable of an unspecified type. Usually you'd want to do this just to reference a previously-defined ConfigVariable of a specific type, without having to know what type it is.

clearValue void ConfigVariable::clear_value(void); Description: Removes the value assigned to this variable, and lets its original value (as read from the prc files) show through.

getBoolWord bool ConfigVariable::get_bool_word(int n) const; Description: Returns the boolean value of the nth word of the variable's value, or false if there is no nth value. See also has_bool_word().

getDefaultValue ConfigDeclaration const *ConfigVariable::get_default_value(void) const; Description: Returns the default variable specified for this variable. If the variable has not yet been defined, this will return NULL.

getDoubleWord double ConfigVariable::get_double_word(int n) const; Description: Returns the integer value of the nth word of the variable's value, or 0 if there is no nth value. See also has_double_word().

getInt64Word long int ConfigVariable::get_int64_word(int n) const; Description: Returns the int64 value of the nth word of the variable's value, or 0 if there is no nth value. See also has_int_word().

getIntWord int ConfigVariable::get_int_word(int n) const; Description: Returns the integer value of the nth word of the variable's value, or 0 if there is no nth value. See also has_int_word().

getNumWords int ConfigVariable::get_num_words(void) const; Description: Returns the number of words in the variable's value. A word is defined as a sequence of non-whitespace characters delimited by whitespace.

getStringValue string const &ConfigVariable::get_string_value(void) const; Description: Returns the toplevel value of the variable, formatted as a string.

getStringWord string ConfigVariable::get_string_word(int n) const; Description: Returns the string value of the nth word of the variable's value, or empty string if there is no nth value. See also has_string_word().

hasBoolWord bool ConfigVariable::has_bool_word(int n) const; Description: Returns true if the variable's value has a valid boolean value for the nth word.

hasDoubleWord bool ConfigVariable::has_double_word(int n) const; Description: Returns true if the variable's value has a valid integer value for the nth word.

hasInt64Word bool ConfigVariable::has_int64_word(int n) const; Description: Returns true if the variable's value has a valid 64-bit integer value for the nth word.

hasIntWord bool ConfigVariable::has_int_word(int n) const; Description: Returns true if the variable's value has a valid integer value for the nth word.

hasStringWord bool ConfigVariable::has_string_word(int n) const; Description: Returns true if the variable'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.

setBoolWord void ConfigVariable::set_bool_word(int n, bool value); Description: Changes the nth word to the indicated value without affecting the other words.

setDoubleWord void ConfigVariable::set_double_word(int n, double value); Description: Changes the nth word to the indicated value without affecting the other words.

setInt64Word void ConfigVariable::set_int64_word(int n, long int value); Description: Changes the nth word to the indicated value without affecting the other words.

setIntWord void ConfigVariable::set_int_word(int n, int value); Description: Changes the nth word to the indicated value without affecting the other words.

setStringValue void ConfigVariable::set_string_value(string const &value); Description: Changes the value assigned to this variable. This creates a local value that shadows any values defined in the .prc files, until clear_local_value() is called.

setStringWord void ConfigVariable::set_string_word(int n, string const &value); Description: Changes the nth word to the indicated value without affecting the other words.

clearLocalValue bool ConfigVariableBase::clear_local_value(void); Description: Removes the local value defined for this variable, and allows its value to be once again retrieved from the .prc files. Returns true if the value was successfully removed, false if it did not exist in the first place.

getDescription string const &ConfigVariableBase::get_description(void) const; Description: Returns the brief description of this variable, if it has been defined.

getFlags int ConfigVariableBase::get_flags(void) const; Description: Returns the flags value as set by set_flags(). This includes the trust level and some other settings. See the individual methods is_closed(), get_trust_level(), etc. to pull out the semantic meaning of these flags individually.

getName string const &ConfigVariableBase::get_name(void) const; Description: Returns the name of the variable.

getTrustLevel int ConfigVariableBase::get_trust_level(void) const; Description: Returns the minimum trust_level a prc file must demonstrate in order to redefine the value for this variable. Arguably, this should be called the "mistrust level", since the larger the value, the more suspicious we are of prc files. This value is not used if is_closed() returns true, which indicates no file may be trusted. This value only has effect in a release build (specifically, when PRC_RESPECT_TRUST_LEVEL is defined true in Config.pp).

getValueType ConfigFlags::ValueType ConfigVariableBase::get_value_type(void) const; Description: Returns the stated type of this variable. This should be VT_list, unless a later variable declaration has changed it.

hasLocalValue bool ConfigVariableBase::has_local_value(void) const; Description: Returns true if this variable's value has been shadowed by a local assignment (as created via make_local_value()), or false otherwise.

hasValue bool ConfigVariableBase::has_value(void) const; Description: Returns true if this variable has an explicit value, either from a prc file or locally set, or false if variable has its default value.

isClosed bool ConfigVariableBase::is_closed(void) const; Description: Returns true if the variable is not trusted by any prc file (and hence cannot be modified from its compiled-in default value), or false for the normal case, in which the variable can be modified by any prc file at or above its trust level (see get_trust_level()). This value only has effect in a release build (specifically, when PRC_RESPECT_TRUST_LEVEL is defined true in Config.pp).

isDynamic bool ConfigVariableBase::is_dynamic(void) const; Description: Returns true if the variable was indicated as "dynamic" by its constructor, indicating that its name was dynamically generated, possibly from a large pool, and it should not be listed along with the other variables.

output void ConfigVariableBase::output(ostream &out) const; Description:

write void ConfigVariableBase::write(ostream &out) const; Description: