Panda3D
|
This is a convenience class to specialize ConfigVariable as a boolean type. More...
#include "configVariableBool.h"
Public Member Functions | |
ConfigVariableBool (const string &name) | |
ConfigVariableBool (const string &name, bool default_value, const string &description=string(), int flags=0) | |
ConfigVariableBool (const string &name, const string &default_value, const string &description=string(), int flags=0) | |
bool | get_default_value () const |
Returns the variable's default value. | |
bool | get_value () const |
Returns the variable's value. | |
bool | get_word (int n) const |
Returns the variable's nth value. | |
operator bool () const | |
Returns the variable's value. | |
void | operator= (bool value) |
Reassigns the variable's local value. | |
bool | operator[] (int n) const |
Returns the value of the variable's nth word. | |
void | set_value (bool value) |
Reassigns the variable's local value. | |
void | set_word (int n, bool value) |
Reassigns the variable's nth value. | |
int | size () const |
Returns the number of unique words in the variable. |
This is a convenience class to specialize ConfigVariable as a boolean type.
Definition at line 26 of file configVariableBool.h.
bool ConfigVariableBool::get_default_value | ( | ) | const [inline] |
Returns the variable's default value.
Reimplemented from ConfigVariable.
Definition at line 139 of file configVariableBool.I.
References ConfigDeclaration::get_bool_word().
bool ConfigVariableBool::get_value | ( | ) | const [inline] |
Returns the variable's value.
Definition at line 124 of file configVariableBool.I.
References ConfigVariable::get_bool_word(), ConfigFlags::is_cache_valid(), and ConfigFlags::mark_cache_valid().
Referenced by operator bool().
bool ConfigVariableBool::get_word | ( | int | n | ) | const [inline] |
Returns the variable's nth value.
Definition at line 153 of file configVariableBool.I.
References ConfigVariable::get_bool_word().
Referenced by operator[]().
ConfigVariableBool::operator bool | ( | ) | const [inline] |
Returns the variable's value.
Definition at line 83 of file configVariableBool.I.
References get_value().
void ConfigVariableBool::operator= | ( | bool | value | ) | [inline] |
Reassigns the variable's local value.
Definition at line 73 of file configVariableBool.I.
References set_value().
bool ConfigVariableBool::operator[] | ( | int | n | ) | const [inline] |
Returns the value of the variable's nth word.
Definition at line 103 of file configVariableBool.I.
References get_word().
void ConfigVariableBool::set_value | ( | bool | value | ) | [inline] |
Reassigns the variable's local value.
Definition at line 113 of file configVariableBool.I.
References ConfigVariable::set_bool_word(), and ConfigVariable::set_string_value().
Referenced by operator=().
void ConfigVariableBool::set_word | ( | int | n, |
bool | value | ||
) | [inline] |
Reassigns the variable's nth value.
This makes a local copy of the variable's overall value.
Definition at line 164 of file configVariableBool.I.
References ConfigVariable::set_bool_word().
int ConfigVariableBool::size | ( | ) | const [inline] |
Returns the number of unique words in the variable.
Definition at line 93 of file configVariableBool.I.
References ConfigVariable::get_num_words().