NetBurner 3.5.0
PDF Version
 
config_string Class Reference

String Configuration Variable. More...

#include <config_obj.h>

Inherits config_value.

Inherited by config_localname, config_pass, and config_time_t.

Public Member Functions

virtual void GetTextValue (NBString &s)
 Get the object value (as a text string with quotations) to the specified NBString object.
 
 config_string (config_obj &owner, NBString def_val, const char *name, const char *desc=NULL)
 Object constructor with the parent/owner leaf parameter.
 
 config_string (NBString def_val, const char *name, const char *desc=NULL)
 Object constructor.
 
 config_string (config_obj &owner, const char *def_val, const char *name, const char *desc=NULL)
 Object constructor with the parent/owner leaf parameter.
 
 config_string (const char *def_val, const char *name, const char *desc=NULL)
 Object constructor.
 
void SetEnumList (NBString s)
 Renders the data used to explain the schema/descriptions for the list of choices.
 
 operator NBString () const
 Return the object value.
 
config_stringoperator= (const char *p)
 Assign the config_string object value from a const char* string.
 
config_stringoperator= (const NBString &s)
 Assign the config_string object value from a NBString object.
 
config_stringoperator= (const config_string &ci)
 Copy one config_string object to another.
 
const char * c_str () const
 Returns the object value as a string.
 
size_t length () const
 Returns the string length in bytes.
 
const char & operator[] (size_t pos) const
 Return the value of a character in the string.
 
virtual void GetTypeValue (NBString &s)
 Copy the object type value to the specified NBString object.
 

Friends

class config_pass
 
class config_localname
 
class config_chooser
 

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

String Configuration Variable.

Note
All modifictions to configuration objects are marked as pending. A call to SaveConfigToStorage is required to save changes to flash memory.

Constructor & Destructor Documentation

◆ config_string() [1/4]

config_string::config_string ( config_obj & owner,
NBString def_val,
const char * name,
const char * desc = NULL )
inline

Object constructor with the parent/owner leaf parameter.

Default value assigned with a NBString

Parameters
ownerReference to owner/parent leaf
def_valDefault value of type NBString
nameField name assigned to the value
descDescription used for info/tool tip

◆ config_string() [2/4]

config_string::config_string ( NBString def_val,
const char * name,
const char * desc = NULL )
inline

Object constructor.

Default value assigned with a NBString

Parameters
def_valDefault value of type NBString
nameField name assigned to the value
descDescription used for info/tool tip

◆ config_string() [3/4]

config_string::config_string ( config_obj & owner,
const char * def_val,
const char * name,
const char * desc = NULL )
inline

Object constructor with the parent/owner leaf parameter.

Default value assigned with a character string

Parameters
ownerReference to owner/parent leaf
def_valDefault value of type char *
nameField name assigned to the value
descDescription used for info/tool tip

◆ config_string() [4/4]

config_string::config_string ( const char * def_val,
const char * name,
const char * desc = NULL )
inline

Object constructor.

Default value assigned with a character string

Parameters
def_valDefault value of type char *
nameField name assigned to the value
descDescription used for info/tool tip

Member Function Documentation

◆ c_str()

const char * config_string::c_str ( ) const
inline

Returns the object value as a string.

Returns
String value of object

◆ GetTextValue()

virtual void config_string::GetTextValue ( NBString & s)
virtual

Get the object value (as a text string with quotations) 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.

Reimplemented in config_pass.

◆ GetTypeValue()

virtual void config_string::GetTypeValue ( NBString & s)
inlinevirtual

Copy the object type value to the specified NBString object.

The type value "string" is written to the NBString object.

Parameters
sNBString object to hold the type value string

Reimplemented in config_time_t.

◆ length()

size_t config_string::length ( ) const
inline

Returns the string length in bytes.

Returns
String length

◆ operator NBString()

config_string::operator NBString ( ) const
inline

Return the object value.

Returns
The value of the object as a NBString

◆ operator=() [1/3]

config_string & config_string::operator= ( const char * p)
inline

Assign the config_string object value from a const char* string.

Parameters
pString to assign

◆ operator=() [2/3]

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

Copy one config_string object to another.

Parameters
ciReference to a config_string object

◆ operator=() [3/3]

config_string & config_string::operator= ( const NBString & s)
inline

Assign the config_string object value from a NBString object.

Parameters
sReference to a NBString object

◆ operator[]()

const char & config_string::operator[] ( size_t pos) const
inline

Return the value of a character in the string.

Parameters
posCharacter index/position in the string
Returns
Character value at the specified index

◆ SetEnumList()

void config_string::SetEnumList ( NBString s)
inline

Renders the data used to explain the schema/descriptions for the list of choices.

Parameters
sEnumerated list that is a string with choices separated by commas (',') with no spaces. For example, "one,two,three"

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