Double Float Configuration Variable.
More...
#include <config_obj.h>
Inherits config_value.
|
| 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.
|
|
Double Float Configuration Variable.
- Note
- All modifications to configuration objects are marked as pending. A call to SaveConfigToStorage is required to save changes to flash memory.
◆ config_double() [1/2]
config_double::config_double |
( |
config_obj & | owner, |
|
|
double | 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_double() [2/2]
config_double::config_double |
( |
double | 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 tip |
◆ GetTextValue()
virtual void config_double::GetTextValue |
( |
NBString & | s | ) |
|
|
inlinevirtual |
Copy the object value as a text string to the specified NBString object.
This is a virtual function that can be overridden in any derived class.
- Parameters
-
s | Reference to a NBString object to store the result |
Implements config_value.
◆ GetTypeValue()
virtual void config_double::GetTypeValue |
( |
NBString & | s | ) |
|
|
inlinevirtual |
Copy the object type value in the specified NBString object.
The type value "float" is written to the NBString object.
- Parameters
-
◆ operator double()
config_double::operator double |
( |
| ) |
const |
|
inline |
Returns the object value as a double float.
- Returns
- The double float value of the object
Example: for a variable named configInt of type config_double:
double value = double(configInt);
iprintf("int = %f\r\n", value);
◆ operator float()
config_double::operator float |
( |
| ) |
const |
|
inline |
Return the object value as a float.
- Returns
- The float value of the object
Example: for a variable named configFloat of type config_double:
float value = float(configFloat);
iprintf("int = %f\r\n", value);
◆ operator int()
config_double::operator int |
( |
| ) |
const |
|
inline |
Return the object value as an int.
- Returns
- The integer value of the object
Example: for a variable named configInt of type config_double:
int value = int(configInt);
iprintf("int = %d\r\n", value);
◆ operator=() [1/2]
◆ operator=() [2/2]
Assign the config_double object value from a double value.
- Parameters
-
The documentation for this class was generated from the following file: