NetBurner 3.5.6
PDF Version |
Chooser Configuration Variable - Select From a List of Items. More...
#include <config_obj.h>
Inherits config_obj.
Public Member Functions | |
config_chooser (config_obj &owner, const char *name, const char *in_value, const char *in_choices, const char *desc=NULL) | |
Object constructor with the parent/owner leaf parameter. | |
config_chooser (const char *name, const char *in_value, const char *in_choices, const char *desc=NULL) | |
Object constructor. | |
bool | IsSelected (const char *choice) |
Check if a particular choice option is selected. | |
bool | IsSelected (const NBString &s) |
Check if a particular choice option is selected. | |
bool | IsInChoices (const char *str, size_t strLen) |
Check if a string is in the list of possible choices. A comparison will continue until a null character is found, or the length of the longer of the two strings being compared is reached (strLen is used to determine if str is longer than the current element being compared.) | |
bool | IsInChoices (const NBString &str, size_t strLen) |
Check if a string is in the list of possible choices. A comparison will continue until a null character is found, or the length of the longer of the two strings being compared is reached (strLen is used to determine if str is longer than the current element being compared.) | |
const config_string & | GetChoices () |
Get the list of choices. | |
const config_string & | SetChoices (const char *in_choices) |
Set the list of choices. | |
operator NBString () const | |
Returns the object value. | |
config_chooser & | operator= (const char *p) |
Assign the selected list item from a const char* value. | |
config_chooser & | operator= (const NBString &s) |
Assign the config_string object value from a NBString object. | |
config_chooser & | operator= (const config_chooser &ci) |
Copy one config_chooser object to another. | |
virtual void | GetTypeValue (NBString &s) override |
Assigns the object type value to the specified NBString object. | |
![]() | |
config_obj (config_obj &owner, const char *name, const char *desc) | |
Object constructor with the parent/owner leaf parameter. | |
config_obj (const char *name, const char *desc) | |
Object constructor. | |
virtual void | GetTextValue (NBString &s) override |
Get the object value as a text string to the specified NBString object. | |
Chooser Configuration Variable - Select From a List of Items.
The config_chooser class provides a list of options with the ability to select one. If used on a web page it would appear as a drop down box. For example, the choices could be "one", "two", or "three", and "two" could be the item selected. Since the items are JSON, the selected item is identified by the option name, not a list index.
|
inline |
Object constructor with the parent/owner leaf parameter.
owner | Reference to owner/parent leaf |
name | Field name assigned to the value |
in_value | The option value selected |
in_choices | The list of option choices |
desc | Description used for info/tool tip |
|
inline |
Object constructor.
name | Field name assigned to the value |
in_value | The option value selected |
in_choices | The list of option choices |
desc | Description used for info/tool tip |
|
inline |
Get the list of choices.
|
inlineoverridevirtual |
Assigns the object type value to the specified NBString object.
The type value "object" is written to the NBString object.
s | NBString object to hold the type value string |
Reimplemented from config_obj.
|
inline |
Check if a string is in the list of possible choices. A comparison will continue until a null character is found, or the length of the longer of the two strings being compared is reached (strLen is used to determine if str is longer than the current element being compared.)
str | NBString to attempt to find inside the list of choices |
strLen | Length of str. This value is used to determine the amount of characters to compare for each element in the list of choices. |
true | if str is found as an option in list of choices |
false | if str is not found in the list of choices |
|
inline |
Check if a string is in the list of possible choices. A comparison will continue until a null character is found, or the length of the longer of the two strings being compared is reached (strLen is used to determine if str is longer than the current element being compared.)
str | NBString to attempt to find inside the list of choices |
strLen | Length of str. This value is used to determine the amount of characters to compare for each element in the list of choices. |
true | if str is found as an option in list of choices |
false | if str is not found in the list of choices |
|
inline |
Check if a particular choice option is selected.
choice | Choice to test as a string type |
true | Selected |
false | Not Selected |
|
inline |
Check if a particular choice option is selected.
s | Choice to test as a NBString type |
true | Selected |
false | Not Selected |
|
inline |
Returns the object value.
|
inline |
Assign the selected list item from a const char* value.
p | Selected list item to assign |
|
inline |
Copy one config_chooser object to another.
ci | Reference to a config_chooser object |
|
inline |
Assign the config_string object value from a NBString object.
s | Reference to a NBString object |
|
inline |
Set the list of choices.
in_choices | The list of option choices |