hivemind 1.0.0
Loading...
Searching...
No Matches
Json::ISValue Class Reference

Rflection is made possible by the help of the ISValue class and the type classes. More...

#include <serializer.h>

Inheritance diagram for Json::ISValue:
Inheritance graph
Collaboration diagram for Json::ISValue:
Collaboration graph

Public Member Functions

virtual ISProperties GetProperty ()
 GetProperty enables the serializer to deal with composite type like objects and members.
 
virtual void CreateObject ()
 For future expansion.
 
virtual rapidjson::Value GetName (rapidjson::Document &d)
 For future expansion.
 
virtual rapidjson::Value ToDom (rapidjson::Document &d)
 ToDom is the function that enables the serializer to take data from the application to the JSON file.
 
virtual void FromDom (rapidjson::Value &v, rapidjson::Document &d)
 FromDom is the function that enables the serializer to get data out of the JSON file and put it in the application.
 

Detailed Description

Rflection is made possible by the help of the ISValue class and the type classes.

Each type needs their own implementation for reflection to work. At the moment only JSON is supported by this library. Making the library work for other format than JSON would require implementing each type again for the new format by in theory would not impact the application programmers at all

Definition at line 41 of file serializer.h.

Member Function Documentation

◆ CreateObject()

virtual void Json::ISValue::CreateObject ( )
inlinevirtual

For future expansion.

Reimplemented in Json::ISObject< T >, and Json::ISMember< T >.

Definition at line 55 of file serializer.h.

◆ FromDom()

void Json::ISValue::FromDom ( rapidjson::Value &  v,
rapidjson::Document &  d 
)
virtual

FromDom is the function that enables the serializer to get data out of the JSON file and put it in the application.

Reimplemented in Json::ISInt, Json::ISFloat, Json::ISDouble, Json::ISBool, Json::ISString, Json::ISObject< T >, Json::ISObjectVector< T >, Json::ISObjVecVec< T >, Json::ISMemVecVec< T >, Json::ISMember< T >, Json::ISMemberVector< T >, Json::ISIntVector, Json::ISFloatVector, and Json::ISDoubleVector.

Definition at line 113 of file serializer.cpp.

References GetProperty().

Here is the call graph for this function:

◆ GetName()

virtual rapidjson::Value Json::ISValue::GetName ( rapidjson::Document &  d)
inlinevirtual

For future expansion.

Typeid is mostly implemented for future expansion, but it helps with making the JSON file more readable for humans.

Reimplemented in Json::ISObject< T >, and Json::ISMember< T >.

Definition at line 60 of file serializer.h.

Referenced by Json::serialize(), and ToDom().

Here is the caller graph for this function:

◆ GetProperty()

virtual ISProperties Json::ISValue::GetProperty ( )
inlinevirtual

GetProperty enables the serializer to deal with composite type like objects and members.

Definition at line 48 of file serializer.h.

Referenced by Json::deserialize(), FromDom(), Json::serialize(), and ToDom().

Here is the caller graph for this function:

◆ ToDom()

rapidjson::Value Json::ISValue::ToDom ( rapidjson::Document &  d)
virtual

ToDom is the function that enables the serializer to take data from the application to the JSON file.

Reimplemented in Json::ISInt, Json::ISFloat, Json::ISDouble, Json::ISBool, Json::ISString, Json::ISObject< T >, Json::ISObjectVector< T >, Json::ISObjVecVec< T >, Json::ISMemVecVec< T >, Json::ISMember< T >, Json::ISMemberVector< T >, Json::ISIntVector, Json::ISFloatVector, and Json::ISDoubleVector.

Definition at line 95 of file serializer.cpp.

References GetName(), and GetProperty().

Here is the call graph for this function:

The documentation for this class was generated from the following files: