Boolean Configuration Variable.
More...
#include <config_obj.h>
Inherits config_value.
Inherited by reboot_obj.
|
| config_value (config_obj &owner, const char *name, const char *desc) |
| Object constructor with the parent/owner leaf parameter.
|
|
| config_value (const char *name, const char *desc) |
| Object constructor.
|
|
Boolean Configuration Variable.
- Note
- All modifictions to configuration objects are marked as pending. A call to SaveConfigToStorage is required to save changes to flash memory.
◆ config_bool() [1/2]
config_bool::config_bool |
( |
config_obj & | owner, |
|
|
bool | def_val, |
|
|
const char * | name, |
|
|
const char * | desc = NULL ) |
|
inline |
Object constructor with the parent/owner leaf parameter.
- Parameters
-
owner | Reference to parent leaf |
def_val | Default value |
name | Field name assigned to the value |
desc | Description used for info/tool tip |
◆ config_bool() [2/2]
config_bool::config_bool |
( |
bool | def_val, |
|
|
const char * | name, |
|
|
const char * | desc = NULL ) |
|
inline |
Object constructor.
- Parameters
-
def_val | Default value |
name | Field name assigned to the value |
desc | Description, used for info/tool tips |
◆ GetTextValue()
virtual void config_bool::GetTextValue |
( |
NBString & | s | ) |
|
|
inlinevirtual |
Copy the object value as a text string to the specified NBString object.
Writes either "true" or "false". This is a virtual function that can be overridden in a derived class.
- Parameters
-
s | Reference to a NBString object to store the result |
Implements config_value.
◆ GetTypeValue()
virtual void config_bool::GetTypeValue |
( |
NBString & | s | ) |
|
|
inlinevirtual |
Copy the object type value to the specified NBString object.
- Parameters
-
s | NBString object to hold the type value string |
◆ operator bool()
config_bool::operator bool |
( |
| ) |
const |
|
inline |
Return the object value.
- Returns
- The object value as a bool
Example: for a variable named configInt of type config_double:
bool boolValue = bool(NV_Settings.m_nvBool);
iprintf("boolValue: %d\r\n", boolValue);
◆ operator=() [1/3]
Assign the config_bool object value to the specified bool value.
- Parameters
-
◆ operator=() [2/3]
◆ operator=() [3/3]
Assign a config_bool object value to the specified integer value.
- Parameters
-
i | Integer value, either 0 (false) or 1 (true) |
The documentation for this class was generated from the following file: