10 #ifndef GENERICPARAMETERS_H_
11 #define GENERICPARAMETERS_H_
18 namespace OpenAB_Plugin {
48 std::string
toJSON()
const;
56 bool fromJSON(
const std::string& json);
87 std::map<std::string, OpenAB::Variant> config;
92 #endif // GENERICPARAMETERS_H_
Definition: Plugin.hpp:176
OpenAB::Variant getValue(const std::string &key) const
Returns value assigned to given key.
Definition: GenericParameters.cpp:119
virtual ~GenericParameters()
Destructor, virtual by default.
Definition: GenericParameters.cpp:27
std::vector< std::string > getAllKeys() const
Returns list of all keys. list of all keys.
Definition: GenericParameters.cpp:135
void removeKey(const std::string &key)
Removes key and its assigned value.
Definition: GenericParameters.cpp:129
void setValue(const std::string &key, const OpenAB::Variant &value)
Assigns or updates value to/of given key.
Definition: GenericParameters.cpp:114
bool fromJSON(const std::string &json)
Deserializes parameters from JSON string.
Definition: GenericParameters.cpp:66
Variant class that can contains different types of data.
Definition: Variant.hpp:26
GenericParameters()
Default constructor.
Definition: GenericParameters.cpp:15
std::string toJSON() const
Serializes parameters to JSON string.
Definition: GenericParameters.cpp:32
Generic storage for plugin parameters. Allows to store map of parameters with different types (OpenAB...
Definition: GenericParameters.hpp:25