Fawkes API
Fawkes Development Version
|
DomainPreconditionAtom representation for JSON transfer. More...
#include <DomainPreconditionAtom.h>
Public Member Functions | |
DomainPreconditionAtom () | |
Constructor. More... | |
DomainPreconditionAtom (const std::string &json) | |
Constructor from JSON. More... | |
DomainPreconditionAtom (const rapidjson::Value &v) | |
Constructor from JSON. More... | |
virtual | ~DomainPreconditionAtom () |
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 > | predicate () const |
Get predicate value. More... | |
void | set_predicate (const std::string &predicate) |
Set predicate 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_values () const |
Get param-values value. More... | |
void | set_param_values (const std::vector< std::string > ¶m_values) |
Set param-values value. More... | |
void | addto_param_values (const std::string &¶m_values) |
Add element to param-values array. More... | |
void | addto_param_values (const std::string ¶m_values) |
Add element to param-values array. More... | |
std::vector< std::string > | param_constants () const |
Get param-constants value. More... | |
void | set_param_constants (const std::vector< std::string > ¶m_constants) |
Set param-constants value. More... | |
void | addto_param_constants (const std::string &¶m_constants) |
Add element to param-constants array. More... | |
void | addto_param_constants (const std::string ¶m_constants) |
Add element to param-constants array. More... | |
![]() | |
DomainPrecondition () | |
Constructor. More... | |
DomainPrecondition (const std::string &json) | |
Constructor from JSON. More... | |
DomainPrecondition (const rapidjson::Value &v) | |
Constructor from JSON. More... | |
virtual | ~DomainPrecondition () |
Destructor. 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< std::string > | type () const |
Get type value. More... | |
void | set_type (const std::string &type) |
Set type value. More... | |
std::optional< bool > | grounded () const |
Get grounded value. More... | |
void | set_grounded (const bool &grounded) |
Set grounded value. More... | |
std::optional< bool > | is_satisfied () const |
Get is-satisfied value. More... | |
void | set_is_satisfied (const bool &is_satisfied) |
Set is-satisfied value. More... | |
Static Public Member Functions | |
static std::string | api_version () |
Get version of implemented API. More... | |
![]() | |
static std::string | api_version () |
Get version of implemented API. More... | |
DomainPreconditionAtom representation for JSON transfer.
Definition at line 27 of file DomainPreconditionAtom.h.
DomainPreconditionAtom::DomainPreconditionAtom | ( | ) |
Constructor.
Definition at line 22 of file DomainPreconditionAtom.cpp.
DomainPreconditionAtom::DomainPreconditionAtom | ( | const std::string & | json | ) |
Constructor from JSON.
json | JSON string to initialize from |
Definition at line 26 of file DomainPreconditionAtom.cpp.
References from_json().
DomainPreconditionAtom::DomainPreconditionAtom | ( | const rapidjson::Value & | v | ) |
Constructor from JSON.
v | RapidJSON value object to initialize from. |
Definition at line 31 of file DomainPreconditionAtom.cpp.
References from_json_value().
|
virtual |
Destructor.
Definition at line 36 of file DomainPreconditionAtom.cpp.
|
inline |
Add element to param-constants array.
param_constants | new value |
Definition at line 198 of file DomainPreconditionAtom.h.
References param_constants().
|
inline |
Add element to param-constants array.
The move-semantics version (std::move) should be preferred.
param_constants | new value |
Definition at line 208 of file DomainPreconditionAtom.h.
References param_constants().
|
inline |
Add element to param-names array.
param_names | new value |
Definition at line 128 of file DomainPreconditionAtom.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 138 of file DomainPreconditionAtom.h.
References param_names().
|
inline |
Add element to param-values array.
param_values | new value |
Definition at line 163 of file DomainPreconditionAtom.h.
References param_values().
|
inline |
Add element to param-values array.
The move-semantics version (std::move) should be preferred.
param_values | new value |
Definition at line 173 of file DomainPreconditionAtom.h.
References param_values().
|
inlinestatic |
Get version of implemented API.
Definition at line 49 of file DomainPreconditionAtom.h.
|
virtual |
Retrieve data from JSON string.
json | JSON representation suitable for this object. Will allow partial assignment and not validate automaticaly. |
Reimplemented from DomainPrecondition.
Definition at line 100 of file DomainPreconditionAtom.cpp.
References from_json_value().
Referenced by DomainPreconditionAtom().
|
virtual |
Retrieve data from JSON string.
v | RapidJSON value suitable for this object. Will allow partial assignment and not validate automaticaly. |
Reimplemented from DomainPrecondition.
Definition at line 109 of file DomainPreconditionAtom.cpp.
References DomainPrecondition::from_json_value().
Referenced by DomainPreconditionAtom(), and from_json().
|
inline |
Get param-constants value.
Definition at line 181 of file DomainPreconditionAtom.h.
Referenced by addto_param_constants(), and set_param_constants().
|
inline |
Get param-names value.
Definition at line 111 of file DomainPreconditionAtom.h.
Referenced by addto_param_names(), and set_param_names().
|
inline |
Get param-values value.
Definition at line 146 of file DomainPreconditionAtom.h.
Referenced by addto_param_values(), and set_param_values().
|
inline |
Get predicate value.
Definition at line 94 of file DomainPreconditionAtom.h.
Referenced by set_predicate().
|
inline |
Set param-constants value.
param_constants | new value |
Definition at line 190 of file DomainPreconditionAtom.h.
References param_constants().
|
inline |
Set param-names value.
param_names | new value |
Definition at line 120 of file DomainPreconditionAtom.h.
References param_names().
|
inline |
Set param-values value.
param_values | new value |
Definition at line 155 of file DomainPreconditionAtom.h.
References param_values().
|
inline |
Set predicate value.
predicate | new value |
Definition at line 103 of file DomainPreconditionAtom.h.
References predicate().
|
virtual |
Render object to JSON.
pretty | true to enable pretty printing (readable spacing) |
Reimplemented from DomainPrecondition.
Definition at line 41 of file DomainPreconditionAtom.cpp.
References to_json_value().
|
virtual |
Render object to JSON.
d | RapidJSON document to retrieve allocator from |
v | RapidJSON value to add data to |
Reimplemented from DomainPrecondition.
Definition at line 60 of file DomainPreconditionAtom.cpp.
References DomainPrecondition::to_json_value().
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 |
Reimplemented from DomainPrecondition.
Definition at line 145 of file DomainPreconditionAtom.cpp.
References DomainPrecondition::validate().