#include <ParameterSet.h>
|
| virtual | ~ParameterSet ()=default |
| |
| virtual void | inject (const String &jsonText)=0 |
| |
| virtual String | getString (const String &key) const =0 |
| |
| virtual String | getString (const String &key, const String &defaultValue) const =0 |
| |
| virtual void | setString (const String &key, const String &value)=0 |
| |
| virtual bool | getBoolean (const String &key) const =0 |
| |
| virtual bool | getBoolean (const String &key, bool defaultValue) const =0 |
| |
| virtual void | setBoolean (const String &key, bool value)=0 |
| |
| virtual double | getNumber (const String &key) const =0 |
| |
| virtual double | getNumber (const String &key, double defaultValue) const =0 |
| |
| virtual void | setNumber (const String &key, double value)=0 |
| |
| virtual std::vector< String > | getStringArray (const String &key) const =0 |
| |
| virtual std::vector< String > | getStringArray (const String &key, const std::vector< String > &defaultValue) const =0 |
| |
| virtual void | setStringArray (const String &key, const std::vector< String > &value)=0 |
| |
| virtual std::vector< double > | getNumberArray (const String &key) const =0 |
| |
| virtual std::vector< double > | getNumberArray (const String &key, const std::vector< double > &defaultValue) const =0 |
| |
| virtual void | setNumberArray (const String &key, const std::vector< double > &value)=0 |
| |
| virtual std::shared_ptr< ParameterSet > | getSection (const String &key)=0 |
| |
Represents a set of parameters values.
◆ ~ParameterSet()
| virtual myscript::iink::ParameterSet::~ParameterSet |
( |
| ) |
|
|
virtualdefault |
◆ inject()
| virtual void myscript::iink::ParameterSet::inject |
( |
const String & |
jsonText | ) |
|
|
pure virtual |
Injects JSON content into this parameter set.
- Parameters
-
| jsonText | JSON parameters values. |
- Exceptions
-
| std::invalid_argument | when jsonText is not valid JSON. |
◆ getString() [1/2]
| virtual String myscript::iink::ParameterSet::getString |
( |
const String & |
key | ) |
const |
|
pure virtual |
Returns the string value associated with key.
- Parameters
-
| key | the key of the value to obtain. |
- Returns
- the value.
- Exceptions
-
| std::invalid_argument | when key is not found. |
| std::runtime_error | when entry at key is not a string. |
◆ getString() [2/2]
| virtual String myscript::iink::ParameterSet::getString |
( |
const String & |
key, |
|
|
const String & |
defaultValue |
|
) |
| const |
|
pure virtual |
Returns the string value associated with key.
- Parameters
-
| key | the key of the value to obtain. |
| defaultValue | the value to return when key is not present. |
- Returns
- the value.
- Exceptions
-
| std::runtime_error | when entry at key is not a string. |
◆ setString()
| virtual void myscript::iink::ParameterSet::setString |
( |
const String & |
key, |
|
|
const String & |
value |
|
) |
| |
|
pure virtual |
Sets the string value associated with key.
- Parameters
-
| key | the key of the value to set. |
| value | the string value to set. |
- Exceptions
-
| std::runtime_error | when entry at key exists and is not a string. |
◆ getBoolean() [1/2]
| virtual bool myscript::iink::ParameterSet::getBoolean |
( |
const String & |
key | ) |
const |
|
pure virtual |
Returns the boolean value associated with key.
- Parameters
-
| key | the key of the value to obtain. |
- Returns
- the value.
- Exceptions
-
| std::invalid_argument | when key is not found. |
| std::runtime_error | when entry at key is not a boolean. |
◆ getBoolean() [2/2]
| virtual bool myscript::iink::ParameterSet::getBoolean |
( |
const String & |
key, |
|
|
bool |
defaultValue |
|
) |
| const |
|
pure virtual |
Returns the boolean value associated with key.
- Parameters
-
| key | the key of the value to obtain. |
| defaultValue | the value to return when key is not present. |
- Returns
- the value.
- Exceptions
-
| std::runtime_error | when entry at key is not a boolean. |
◆ setBoolean()
| virtual void myscript::iink::ParameterSet::setBoolean |
( |
const String & |
key, |
|
|
bool |
value |
|
) |
| |
|
pure virtual |
Sets the boolean value associated with key.
- Parameters
-
| key | the key of the value to set. |
| value | the boolean value to set. |
- Exceptions
-
| std::runtime_error | when entry at key exists and is not a boolean. |
◆ getNumber() [1/2]
| virtual double myscript::iink::ParameterSet::getNumber |
( |
const String & |
key | ) |
const |
|
pure virtual |
Returns the numeric value associated with key.
- Parameters
-
| key | the key of the value to obtain. |
- Returns
- the value.
- Exceptions
-
| std::invalid_argument | when key is not found. |
| std::runtime_error | when entry at key is not a number. |
◆ getNumber() [2/2]
| virtual double myscript::iink::ParameterSet::getNumber |
( |
const String & |
key, |
|
|
double |
defaultValue |
|
) |
| const |
|
pure virtual |
Returns the numeric value associated with key.
- Parameters
-
| key | the key of the value to obtain. |
| defaultValue | the value to return when key is not present. |
- Returns
- the value.
- Exceptions
-
| std::runtime_error | when entry at key is not a number. |
◆ setNumber()
| virtual void myscript::iink::ParameterSet::setNumber |
( |
const String & |
key, |
|
|
double |
value |
|
) |
| |
|
pure virtual |
Sets the numeric value associated with key.
- Parameters
-
| key | the key of the value to set. |
| value | the double value to set. |
- Exceptions
-
| std::runtime_error | when entry at key exists and is not a number. |
◆ getStringArray() [1/2]
| virtual std::vector< String > myscript::iink::ParameterSet::getStringArray |
( |
const String & |
key | ) |
const |
|
pure virtual |
Returns the string array value associated with key.
- Parameters
-
| key | the key of the value to obtain. |
- Returns
- the value.
- Exceptions
-
| std::invalid_argument | when key is not found. |
| std::runtime_error | when entry at key is not a string array. |
◆ getStringArray() [2/2]
| virtual std::vector< String > myscript::iink::ParameterSet::getStringArray |
( |
const String & |
key, |
|
|
const std::vector< String > & |
defaultValue |
|
) |
| const |
|
pure virtual |
Returns the string array value associated with key.
- Parameters
-
| key | the key of the value to obtain. |
| defaultValue | the value to return when key is not present. |
- Returns
- the value.
- Exceptions
-
| std::runtime_error | when entry at key is not a string array. |
- Since
- 1.4
◆ setStringArray()
| virtual void myscript::iink::ParameterSet::setStringArray |
( |
const String & |
key, |
|
|
const std::vector< String > & |
value |
|
) |
| |
|
pure virtual |
Sets the string array value associated with key.
- Parameters
-
| key | the key of the value to set. |
| value | the value to set. |
- Exceptions
-
| std::runtime_error | when entry at key exists and is not a string array. |
◆ getNumberArray() [1/2]
| virtual std::vector< double > myscript::iink::ParameterSet::getNumberArray |
( |
const String & |
key | ) |
const |
|
pure virtual |
Returns the number array value associated with key.
- Parameters
-
| key | the key of the value to obtain. |
- Returns
- the value.
- Exceptions
-
| std::invalid_argument | when key is not found. |
| std::runtime_error | when entry at key is not a number array. |
- Since
- 3.1
◆ getNumberArray() [2/2]
| virtual std::vector< double > myscript::iink::ParameterSet::getNumberArray |
( |
const String & |
key, |
|
|
const std::vector< double > & |
defaultValue |
|
) |
| const |
|
pure virtual |
Returns the number array value associated with key.
- Parameters
-
| key | the key of the value to obtain. |
| defaultValue | the value to return when key is not present. |
- Returns
- the value.
- Exceptions
-
| std::runtime_error | when entry at key is not a number array. |
- Since
- 3.1
◆ setNumberArray()
| virtual void myscript::iink::ParameterSet::setNumberArray |
( |
const String & |
key, |
|
|
const std::vector< double > & |
value |
|
) |
| |
|
pure virtual |
Sets the number array value associated with key.
- Parameters
-
| key | the key of the value to set. |
| value | the value to set. |
- Exceptions
-
| std::runtime_error | when entry at key exists and is not a number array. |
- Since
- 3.1
◆ getSection()
| virtual std::shared_ptr< ParameterSet > myscript::iink::ParameterSet::getSection |
( |
const String & |
key | ) |
|
|
pure virtual |
Returns a parameter set object representing the section associated with key. Sections correspond to the hierarchical organization of keys according to their dots. For example, if you have keys "a.b.c" and "a.b.d" there is a section "a.b" that contains keys "c" and "d", as well as a section "a" containing "b.c" and "b.d".
- Parameters
-
| key | the key of the section to obtain. |
- Returns
- the section.
- Exceptions
-
| std::invalid_argument | when key is not found. |
| std::runtime_error | when entry at key is not a section. |
The documentation for this class was generated from the following file: