|
Fawkes API
Fawkes Development Version
|
TransformsGraph representation for JSON transfer. More...
#include <TransformsGraph.h>
Public Member Functions | |
| TransformsGraph () | |
| Constructor. More... | |
| TransformsGraph (const std::string &json) | |
| Constructor from JSON. More... | |
| TransformsGraph (const rapidjson::Value &v) | |
| Constructor from JSON. 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 > | dotgraph () const |
| Get dotgraph value. More... | |
| void | set_dotgraph (const std::string &dotgraph) |
| Set dotgraph value. More... | |
Static Public Member Functions | |
| static std::string | api_version () |
| Get version of implemented API. More... | |
TransformsGraph representation for JSON transfer.
Definition at line 26 of file TransformsGraph.h.
| TransformsGraph::TransformsGraph | ( | ) |
Constructor.
Definition at line 23 of file TransformsGraph.cpp.
| TransformsGraph::TransformsGraph | ( | const std::string & | json | ) |
Constructor from JSON.
| json | JSON string to initialize from |
Definition at line 27 of file TransformsGraph.cpp.
References from_json().
| TransformsGraph::TransformsGraph | ( | const rapidjson::Value & | v | ) |
Constructor from JSON.
| v | RapidJSON value object to initialize from. |
Definition at line 32 of file TransformsGraph.cpp.
References from_json_value().
|
inlinestatic |
Get version of implemented API.
Definition at line 45 of file TransformsGraph.h.
|
inline |
Get apiVersion value.
Definition at line 106 of file TransformsGraph.h.
Referenced by set_apiVersion().
|
inline |
Get dotgraph value.
Definition at line 123 of file TransformsGraph.h.
Referenced by set_dotgraph().
|
virtual |
Retrieve data from JSON string.
| json | JSON representation suitable for this object. Will allow partial assignment and not validate automaticaly. |
Definition at line 82 of file TransformsGraph.cpp.
References from_json_value().
Referenced by TransformsGraph().
|
virtual |
Retrieve data from JSON string.
| v | RapidJSON value suitable for this object. Will allow partial assignment and not validate automaticaly. |
Definition at line 91 of file TransformsGraph.cpp.
Referenced by from_json(), and TransformsGraph().
|
inline |
Get kind value.
Definition at line 89 of file TransformsGraph.h.
Referenced by set_kind().
|
inline |
Set apiVersion value.
| apiVersion | new value |
Definition at line 115 of file TransformsGraph.h.
References apiVersion().
|
inline |
Set dotgraph value.
| dotgraph | new value |
Definition at line 132 of file TransformsGraph.h.
References dotgraph().
|
inline |
Set kind value.
| kind | new value |
Definition at line 98 of file TransformsGraph.h.
References kind().
|
virtual |
Render object to JSON.
| pretty | true to enable pretty printing (readable spacing) |
Definition at line 38 of file TransformsGraph.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 57 of file TransformsGraph.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 105 of file TransformsGraph.cpp.