Fawkes API
Fawkes Development Version
|
DomainPredicate representation for JSON transfer. More...
#include <DomainPredicate.h>
Public Member Functions | |
DomainPredicate () | |
Constructor. More... | |
DomainPredicate (const std::string &json) | |
Constructor from JSON. More... | |
DomainPredicate (const rapidjson::Value &v) | |
Constructor from JSON. More... | |
virtual | ~DomainPredicate () |
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 > | sensed () const |
Get sensed value. More... | |
void | set_sensed (const bool &sensed) |
Set sensed value. More... | |
std::vector< std::string > | param_names () const |
Get param-names value. More... | |
void | set_param_names (const std::vector< std::string > ¶m_names) |
Set param-names value. More... | |
void | addto_param_names (const std::string &¶m_names) |
Add element to param-names array. More... | |
void | addto_param_names (const std::string ¶m_names) |
Add element to param-names array. More... | |
std::vector< std::string > | param_types () const |
Get param-types value. More... | |
void | set_param_types (const std::vector< std::string > ¶m_types) |
Set param-types value. More... | |
void | addto_param_types (const std::string &¶m_types) |
Add element to param-types array. More... | |
void | addto_param_types (const std::string ¶m_types) |
Add element to param-types array. More... | |
Static Public Member Functions | |
static std::string | api_version () |
Get version of implemented API. More... | |
DomainPredicate representation for JSON transfer.
Definition at line 25 of file DomainPredicate.h.
DomainPredicate::DomainPredicate | ( | ) |
Constructor.
Definition at line 22 of file DomainPredicate.cpp.
DomainPredicate::DomainPredicate | ( | const std::string & | json | ) |
Constructor from JSON.
json | JSON string to initialize from |
Definition at line 26 of file DomainPredicate.cpp.
References from_json().
DomainPredicate::DomainPredicate | ( | const rapidjson::Value & | v | ) |
Constructor from JSON.
v | RapidJSON value object to initialize from. |
Definition at line 31 of file DomainPredicate.cpp.
References from_json_value().
|
virtual |
Destructor.
Definition at line 36 of file DomainPredicate.cpp.
|
inline |
Add element to param-names array.
param_names | new value |
Definition at line 176 of file DomainPredicate.h.
References param_names().
|
inline |
Add element to param-names array.
The move-semantics version (std::move) should be preferred.
param_names | new value |
Definition at line 186 of file DomainPredicate.h.
References param_names().
|
inline |
Add element to param-types array.
param_types | new value |
Definition at line 211 of file DomainPredicate.h.
References param_types().
|
inline |
Add element to param-types array.
The move-semantics version (std::move) should be preferred.
param_types | new value |
Definition at line 221 of file DomainPredicate.h.
References param_types().
|
inlinestatic |
Get version of implemented API.
Definition at line 47 of file DomainPredicate.h.
|
inline |
Get apiVersion value.
Definition at line 108 of file DomainPredicate.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 106 of file DomainPredicate.cpp.
References from_json_value().
Referenced by DomainPredicate().
|
virtual |
Retrieve data from JSON string.
v | RapidJSON value suitable for this object. Will allow partial assignment and not validate automaticaly. |
Definition at line 115 of file DomainPredicate.cpp.
Referenced by DomainPredicate(), and from_json().
|
inline |
Get kind value.
Definition at line 91 of file DomainPredicate.h.
Referenced by set_kind().
|
inline |
Get name value.
Definition at line 125 of file DomainPredicate.h.
Referenced by set_name().
|
inline |
Get param-names value.
Definition at line 159 of file DomainPredicate.h.
Referenced by addto_param_names(), and set_param_names().
|
inline |
Get param-types value.
Definition at line 194 of file DomainPredicate.h.
Referenced by addto_param_types(), and set_param_types().
|
inline |
Get sensed value.
Definition at line 142 of file DomainPredicate.h.
Referenced by set_sensed().
|
inline |
Set apiVersion value.
apiVersion | new value |
Definition at line 117 of file DomainPredicate.h.
References apiVersion().
|
inline |
Set kind value.
kind | new value |
Definition at line 100 of file DomainPredicate.h.
References kind().
|
inline |
Set name value.
name | new value |
Definition at line 134 of file DomainPredicate.h.
References name().
|
inline |
Set param-names value.
param_names | new value |
Definition at line 168 of file DomainPredicate.h.
References param_names().
|
inline |
Set param-types value.
param_types | new value |
Definition at line 203 of file DomainPredicate.h.
References param_types().
|
inline |
Set sensed value.
sensed | new value |
Definition at line 151 of file DomainPredicate.h.
References sensed().
|
virtual |
Render object to JSON.
pretty | true to enable pretty printing (readable spacing) |
Definition at line 41 of file DomainPredicate.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 60 of file DomainPredicate.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 150 of file DomainPredicate.cpp.