A strongly typed in-memory parameter target that can be made read-only. More...
#include <InMemoryParameter.h>
Public Member Functions | |
virtual bool | CanRead (const std::string &path) const noexceptoverride |
Determines whether the value can be read. More... | |
virtual bool | CanWrite (const std::string &path) const noexceptoverride |
Determines whether the value can be written. More... | |
virtual data::Variant | Get (const std::string &path) override |
Get the current value of the target. More... | |
virtual data::discovery::Field | GetFieldDescriptor (const std::string &path) const override |
Get the data type of the target. More... | |
const std::string & | GetPath () const |
Get the resource path of the parameter. More... | |
InMemoryParameter (const std::string &path, bool value, bool readOnly=false) | |
Create a new boolean in-memory parameter. More... | |
InMemoryParameter (const std::string &path, const std::string &value, bool readOnly=false) | |
Create a new string in-memory parameter. More... | |
InMemoryParameter (const std::string &path, const char *value, bool readOnly=false) | |
Create a new string in-memory parameter. More... | |
InMemoryParameter (const std::string &path, int value, bool readOnly=false) | |
Create a new integer in-memory parameter. More... | |
InMemoryParameter (const std::string &path, double value, bool readOnly=false) | |
Create a new integer in-memory parameter. More... | |
virtual void | Set (const std::string &path, const data::Variant &value) override |
Set the current value of the target. More... | |
Private Attributes | |
std::string | _path |
Resource path. More... | |
bool | _readOnly |
Is read-only? More... | |
data::discovery::Type | _type |
Type. More... | |
data::Variant | _value |
Value. More... | |
A strongly typed in-memory parameter target that can be made read-only.
Definition at line 14 of file InMemoryParameter.h.
|
inline |
Create a new boolean in-memory parameter.
value | Value |
readOnly | Is read-only? |
Definition at line 50 of file InMemoryParameter.h.
|
inline |
Create a new string in-memory parameter.
value | Value |
readOnly | Is read-only? |
Definition at line 63 of file InMemoryParameter.h.
|
inline |
Create a new string in-memory parameter.
value | Value |
readOnly | Is read-only? |
Definition at line 76 of file InMemoryParameter.h.
|
inline |
Create a new integer in-memory parameter.
value | Value |
readOnly | Is read-only? |
Definition at line 89 of file InMemoryParameter.h.
|
inline |
Create a new integer in-memory parameter.
value | Value |
readOnly | Is read-only? |
Definition at line 102 of file InMemoryParameter.h.
|
inlineoverridevirtualnoexcept |
Determines whether the value can be read.
Reimplemented from swarmio::services::keyvalue::Target.
Definition at line 240 of file InMemoryParameter.h.
|
inlineoverridevirtualnoexcept |
Determines whether the value can be written.
Reimplemented from swarmio::services::keyvalue::Target.
Definition at line 223 of file InMemoryParameter.h.
|
inlineoverridevirtual |
Get the current value of the target.
Implements swarmio::services::keyvalue::Target.
Definition at line 114 of file InMemoryParameter.h.
|
inlineoverridevirtual |
Get the data type of the target.
Implements swarmio::services::keyvalue::Target.
Definition at line 204 of file InMemoryParameter.h.
|
inline |
Get the resource path of the parameter.
Definition at line 257 of file InMemoryParameter.h.
|
inlineoverridevirtual |
Set the current value of the target.
value | New value |
Implements swarmio::services::keyvalue::Target.
Definition at line 131 of file InMemoryParameter.h.
|
private |
Resource path.
Definition at line 40 of file InMemoryParameter.h.
|
private |
Is read-only?
Definition at line 34 of file InMemoryParameter.h.
|
private |
Type.
Definition at line 28 of file InMemoryParameter.h.
|
private |
Value.
Definition at line 22 of file InMemoryParameter.h.