![]() |
HAL
|
#include <json_write_document.h>
Public Member Functions | |
JsonWriteComplex (const std::string &tag, JsonWriteComplex *parent) | |
virtual | ~JsonWriteComplex () |
void | close () |
![]() | |
JsonWriteData (const std::string &tag, JsonWriteComplex *parent) | |
virtual | ~JsonWriteData () |
JsonWriteData & | operator= (const std::string &txt) |
JsonWriteData & | operator= (int ivalue) |
JsonWriteData & | operator= (double value) |
JsonWriteData & | operator= (uint64_t u64Value) |
Protected Member Functions | |
virtual void | finalize (JsonWriteComplex *cplx)=0 |
![]() | |
virtual rapidjson::Document::AllocatorType & | allocator () |
Protected Attributes | |
std::vector< JsonWriteData * > | mChildData |
rapidjson::Value | mRapidValue |
![]() | |
std::string | mTagname |
JsonWriteComplex * | mParent |
Friends | |
class | JsonWriteData |
class | JsonWriteObject |
class | JsonWriteArray |
class | JsonWriteDocument |
The JsonWriteComplex class is the abstract base class for JSON objects and arrays. Both complex types have in common that a call to close is neccessary at the end to indicate that no more content will be added to the element.
Definition at line 106 of file json_write_document.h.
hal::JsonWriteComplex::JsonWriteComplex | ( | const std::string & | tag, |
JsonWriteComplex * | parent | ||
) |
Constructor.
[in] | tag | - JSON tag name. |
[in] | parent | - Parent instance. |
Definition at line 72 of file json_write_document.cpp.
|
virtual |
Definition at line 77 of file json_write_document.cpp.
References mChildData.
void hal::JsonWriteComplex::close | ( | ) |
Must be called when no more data gets added to complex JSON element
Definition at line 84 of file json_write_document.cpp.
References finalize(), and hal::JsonWriteData::mParent.
Referenced by hal::GroupingSerializer::serialize().
|
protectedpure virtual |
Implemented in hal::JsonWriteDocument, hal::JsonWriteArray, and hal::JsonWriteObject.
Referenced by close().
|
friend |
Definition at line 110 of file json_write_document.h.
Referenced by hal::JsonWriteArray::add_array(), and hal::JsonWriteObject::add_array().
|
friend |
Definition at line 108 of file json_write_document.h.
|
friend |
Definition at line 111 of file json_write_document.h.
|
friend |
Definition at line 109 of file json_write_document.h.
Referenced by hal::JsonWriteArray::add_object(), and hal::JsonWriteObject::add_object().
|
protected |
Definition at line 114 of file json_write_document.h.
Referenced by hal::JsonWriteArray::add_array(), hal::JsonWriteObject::add_array(), hal::JsonWriteArray::add_object(), hal::JsonWriteObject::add_object(), hal::JsonWriteObject::operator[](), and ~JsonWriteComplex().
|
protected |
Definition at line 115 of file json_write_document.h.
Referenced by hal::JsonWriteObject::add_member(), hal::JsonWriteObject::finalize(), hal::JsonWriteArray::finalize(), hal::JsonWriteDocument::finalize(), hal::JsonWriteArray::JsonWriteArray(), hal::JsonWriteObject::JsonWriteObject(), and hal::JsonWriteArray::operator<<().