NetBurner 3.5.0
PDF Version
 
config_double Class Reference

Double Float Configuration Variable. More...

#include <config_obj.h>

Inherits config_value.

Public Member Functions

virtual void GetTextValue (NBString &s)
 Copy the object value as a text string to the specified NBString object.
 
 config_double (config_obj &owner, double def_val, const char *name, const char *desc=NULL)
 Object constructor with the parent/owner leaf parameter.
 
 config_double (double def_val, const char *name, const char *desc=NULL)
 Object constructor.
 
 operator int () const
 Return the object value as an int.
 
 operator float () const
 Return the object value as a float.
 
 operator double () const
 Returns the object value as a double float.
 
config_doubleoperator= (const double d)
 Assign the config_double object value from a double value.
 
config_doubleoperator= (const config_double &ci)
 Copy one config_double object to another.
 
virtual void GetTypeValue (NBString &s)
 Copy the object type value in the specified NBString object.
 

Additional Inherited Members

- Protected Member Functions inherited from 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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ 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
ownerReference to parent leaf
def_valDefault value
nameField name assigned to the value
descDescription 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_valDefault value
nameField name assigned to the value
descDescription used for info/tool tip

Member Function Documentation

◆ 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
sReference 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
sReference to a NBString object

◆ 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]

config_double & config_double::operator= ( const config_double & ci)
inline

Copy one config_double object to another.

Parameters
ciReference to a config_double object

◆ operator=() [2/2]

config_double & config_double::operator= ( const double d)
inline

Assign the config_double object value from a double value.

Parameters
dValue of type double

The documentation for this class was generated from the following file: