Fawkes API Fawkes Development Version
|
DomainOperator representation for JSON transfer. More...
#include <DomainOperator.h>
Public Member Functions | |
DomainOperator () | |
Constructor. More... | |
DomainOperator (const std::string &json) | |
Constructor from JSON. More... | |
DomainOperator (const rapidjson::Value &v) | |
Constructor from JSON. More... | |
virtual | ~DomainOperator () |
Destructor. More... | |
virtual std::string | to_json (bool pretty=false) const |
Render object to JSON. More... | |
virtual void | to_json_value (rapidjson::Document &d, rapidjson::Value &v) const |
Render object to JSON. More... | |
virtual void | from_json (const std::string &json) |
Retrieve data from JSON string. More... | |
virtual void | from_json_value (const rapidjson::Value &v) |
Retrieve data from JSON string. More... | |
virtual void | validate (bool subcall=false) const |
Validate if all required fields have been set. More... | |
std::optional< std::string > | kind () const |
Get kind value. More... | |
void | set_kind (const std::string &kind) |
Set kind value. More... | |
std::optional< std::string > | apiVersion () const |
Get apiVersion value. More... | |
void | set_apiVersion (const std::string &apiVersion) |
Set apiVersion value. More... | |
std::optional< std::string > | name () const |
Get name value. More... | |
void | set_name (const std::string &name) |
Set name value. More... | |
std::optional< bool > | wait_sensed () const |
Get wait-sensed value. More... | |
void | set_wait_sensed (const bool &wait_sensed) |
Set wait-sensed value. More... | |
std::vector< std::shared_ptr< DomainOperatorParameter > > | parameters () const |
Get parameters value. More... | |
void | set_parameters (const std::vector< std::shared_ptr< DomainOperatorParameter > > ¶meters) |
Set parameters value. More... | |
void | addto_parameters (const std::shared_ptr< DomainOperatorParameter > &¶meters) |
Add element to parameters array. More... | |
void | addto_parameters (const std::shared_ptr< DomainOperatorParameter > ¶meters) |
Add element to parameters array. More... | |
void | addto_parameters (const DomainOperatorParameter &¶meters) |
Add element to parameters array. More... | |
Static Public Member Functions | |
static std::string | api_version () |
Get version of implemented API. More... | |
DomainOperator representation for JSON transfer.
Definition at line 28 of file DomainOperator.h.
DomainOperator::DomainOperator | ( | ) |
Constructor.
Definition at line 24 of file DomainOperator.cpp.
DomainOperator::DomainOperator | ( | const std::string & | json | ) |
Constructor from JSON.
json | JSON string to initialize from |
Definition at line 28 of file DomainOperator.cpp.
References from_json().
DomainOperator::DomainOperator | ( | const rapidjson::Value & | v | ) |
Constructor from JSON.
v | RapidJSON value object to initialize from. |
Definition at line 33 of file DomainOperator.cpp.
References from_json_value().
|
virtual |
Destructor.
Definition at line 38 of file DomainOperator.cpp.
|
inline |
Add element to parameters array.
parameters | new value |
Definition at line 196 of file DomainOperator.h.
References parameters().
|
inline |
Add element to parameters array.
parameters | new value |
Definition at line 178 of file DomainOperator.h.
References parameters().
|
inline |
Add element to parameters array.
The move-semantics version (std::move) should be preferred.
parameters | new value |
Definition at line 188 of file DomainOperator.h.
References parameters().
|
inlinestatic |
Get version of implemented API.
Definition at line 49 of file DomainOperator.h.
|
inline |
Get apiVersion value.
Definition at line 110 of file DomainOperator.h.
Referenced by set_apiVersion().
|
virtual |
Retrieve data from JSON string.
json | JSON representation suitable for this object. Will allow partial assignment and not validate automaticaly. |
Definition at line 100 of file DomainOperator.cpp.
References from_json_value().
Referenced by DomainOperator().
|
virtual |
Retrieve data from JSON string.
v | RapidJSON value suitable for this object. Will allow partial assignment and not validate automaticaly. |
Definition at line 109 of file DomainOperator.cpp.
References DomainOperatorParameter::from_json_value().
Referenced by DomainOperator(), and from_json().
|
inline |
Get kind value.
Definition at line 93 of file DomainOperator.h.
Referenced by set_kind().
|
inline |
Get name value.
Definition at line 127 of file DomainOperator.h.
Referenced by set_name().
|
inline |
Get parameters value.
Definition at line 161 of file DomainOperator.h.
Referenced by addto_parameters(), and set_parameters().
|
inline |
Set apiVersion value.
apiVersion | new value |
Definition at line 119 of file DomainOperator.h.
References apiVersion().
|
inline |
Set kind value.
kind | new value |
Definition at line 102 of file DomainOperator.h.
References kind().
|
inline |
Set name value.
name | new value |
Definition at line 136 of file DomainOperator.h.
References name().
|
inline |
Set parameters value.
parameters | new value |
Definition at line 170 of file DomainOperator.h.
References parameters().
|
inline |
Set wait-sensed value.
wait_sensed | new value |
Definition at line 153 of file DomainOperator.h.
References wait_sensed().
|
virtual |
Render object to JSON.
pretty | true to enable pretty printing (readable spacing) |
Definition at line 43 of file DomainOperator.cpp.
References to_json_value().
|
virtual |
Render object to JSON.
d | RapidJSON document to retrieve allocator from |
v | RapidJSON value to add data to |
Definition at line 62 of file DomainOperator.cpp.
Referenced by to_json().
|
virtual |
Validate if all required fields have been set.
subcall | true if this is called from another class, e.g., a sub-class or array holder. Will modify the kind of exception thrown. |
std::vector<std::string> | thrown if required information is missing and subcall is set to true. Contains a list of missing fields. |
std::runtime_error | informative message describing the missing fields |
Definition at line 137 of file DomainOperator.cpp.
|
inline |
Get wait-sensed value.
Definition at line 144 of file DomainOperator.h.
Referenced by set_wait_sensed().