REC RPC library
|
#include "rec/rpc/serialization/rec_rpc_serialization_Serializable.h"
#include "rec/rpc/defines.h"
#include <QDataStream>
#include <QList>
Go to the source code of this file.
Classes | |
class | rec::rpc::serialization::Complex |
Base class for complex serializable data containers. More... | |
Namespaces | |
rec | |
rec::rpc | |
rec::rpc::serialization | |
Macros | |
#define | BEGIN_COMPLEX_DATA_DECLARATION(TYPENAME) |
Begin declaration of a custom complex data type. More... | |
#define | END_COMPLEX_DATA_DECLARATION }; |
End declaration of a custom complex data type. More... | |
#define | BEGIN_COMPLEX_DATA_IMPLEMENTATION(TYPENAME, VERSION) |
Begin implementation of a custom complex data type's constructor. More... | |
#define | END_COMPLEX_DATA_IMPLEMENTATION } |
End implementation of a custom complex data type's constructor. More... | |
#define | BEGIN_COMPLEX_DATA_DECLARATION_AND_IMPLEMENTATION(TYPENAME, VERSION) |
Begin declaration and implementation of a custom complex data parameter type. More... | |
#define | END_COMPLEX_DATA_DECLARATION_AND_IMPLEMENTATION_CONSTRUCTOR } |
End constructor and begin member declaration of a custom complex data type. More... | |
#define | END_COMPLEX_DATA_DECLARATION_AND_IMPLEMENTATION }; |
End implementation and declaration of a custom complex data type. More... | |
#define | USE_COMPLEX_DATA(EXISTINGTYPENAME, NEWTYPENAME) |
Reuse an existing data type definition. More... | |
#define | USE_COMPLEX_DATA_AS_PARAM(TYPENAME, FUNCTIONNAME) USE_COMPLEX_DATA( TYPENAME, FUNCTIONNAME##Param ) |
Use an existing complex type definition for a function which uses this type as parameter type. More... | |
#define | USE_COMPLEX_DATA_AS_RESULT(TYPENAME, FUNCTIONNAME) USE_COMPLEX_DATA( TYPENAME, FUNCTIONNAME##Result ) |
Use an existing complex type definition for a function which uses the type as result type. More... | |
#define | USE_COMPLEX_DATA_AS_TOPICDATA(TYPENAME, TOPICNAME) USE_COMPLEX_DATA( TYPENAME, topic##TOPICNAME##Data ) |
Use an existing complex data type definition for a topic which uses this data type. More... | |
#define | DECLARE_CUSTOM_MEMBER(DATATYPE, NAME) |
Complex data container member definition for any rec::rpc::serialization::Serializable subclass. More... | |
#define | ADD_MEMBER(NAME) |
#define ADD_MEMBER | ( | NAME | ) |
Add serializable to the list of children. This must be done in the constructor.
NAME | Name of the child. |
Definition at line 252 of file rec_rpc_serialization_Complex.h.
#define BEGIN_COMPLEX_DATA_DECLARATION | ( | TYPENAME | ) |
Begin declaration of a custom complex data type.
This macro inserts the code necessary to declare a rec::rpc::serialization::Complex subclass into a header file. Below this macro, use the appropriate preprocessor macros to declare children.
TYPENAME | Name of the subclass. |
Definition at line 99 of file rec_rpc_serialization_Complex.h.
#define BEGIN_COMPLEX_DATA_DECLARATION_AND_IMPLEMENTATION | ( | TYPENAME, | |
VERSION | |||
) |
Begin declaration and implementation of a custom complex data parameter type.
This macro inserts the code necessary to declare a rec::rpc::serialization::Complex subclass with its constructor into a header file. Use this macro if you want the serializazable declarations only in header files. Below this macro, the preprocessor macro ADD_MEMBER must be used to insert the members to the list of children to be serialized. Then END_COMPLEX_DATA_DECLARATION_AND_IMPLEMENTATION_CONSTRUCTOR must be inserted to begin the declaration of the children.
TYPENAME | Name of the subclass. |
VERSION | Version string. If data that has been serialized with a type version different from this, it can't be deserialized with this version. |
Definition at line 154 of file rec_rpc_serialization_Complex.h.
#define BEGIN_COMPLEX_DATA_IMPLEMENTATION | ( | TYPENAME, | |
VERSION | |||
) |
Begin implementation of a custom complex data type's constructor.
This macro inserts the code necessary to implement the constructor of a custom complex data type into a source file. Below this macro, the preprocessor macro ADD_MEMBER must be used to insert the members to the list of children to be serialized.
TYPENAME | Name of the data type. |
VERSION | Version string. If data that has been serialized with a type version different from this, it can't be deserialized with this version. |
Definition at line 126 of file rec_rpc_serialization_Complex.h.
#define DECLARE_CUSTOM_MEMBER | ( | DATATYPE, | |
NAME | |||
) |
Complex data container member definition for any rec::rpc::serialization::Serializable subclass.
Place this macro into the declaration of a rec::rpc::serialization::Complex subclass to add a custom member. It can be accessed via NAME() (const and non-const).
DATATYPE | Type name of the rec::rpc::serialization::Serializable subclass. |
NAME | Member name. |
Definition at line 236 of file rec_rpc_serialization_Complex.h.
#define END_COMPLEX_DATA_DECLARATION }; |
End declaration of a custom complex data type.
Definition at line 113 of file rec_rpc_serialization_Complex.h.
#define END_COMPLEX_DATA_DECLARATION_AND_IMPLEMENTATION }; |
End implementation and declaration of a custom complex data type.
Definition at line 180 of file rec_rpc_serialization_Complex.h.
#define END_COMPLEX_DATA_DECLARATION_AND_IMPLEMENTATION_CONSTRUCTOR } |
End constructor and begin member declaration of a custom complex data type.
This macro closes the constructor and allows you to declare the children. To declare the children, use the appropriate preprocessor macros. Finally insert END_COMPLEX_DATA_DECLARATION_AND_IMPLEMENTATION.
Definition at line 173 of file rec_rpc_serialization_Complex.h.
#define END_COMPLEX_DATA_IMPLEMENTATION } |
End implementation of a custom complex data type's constructor.
Definition at line 136 of file rec_rpc_serialization_Complex.h.
#define USE_COMPLEX_DATA | ( | EXISTINGTYPENAME, | |
NEWTYPENAME | |||
) |
Reuse an existing data type definition.
EXISTINGTYPENAME | Data type that shall be reused. |
NEWTYPENAME | New data type name. |
Definition at line 190 of file rec_rpc_serialization_Complex.h.
#define USE_COMPLEX_DATA_AS_PARAM | ( | TYPENAME, | |
FUNCTIONNAME | |||
) | USE_COMPLEX_DATA( TYPENAME, FUNCTIONNAME##Param ) |
Use an existing complex type definition for a function which uses this type as parameter type.
TYPENAME | Name of the data type that shall be used. |
FUNCTIONNAME | Name of the function which uses the type as parameter type. |
Definition at line 203 of file rec_rpc_serialization_Complex.h.
#define USE_COMPLEX_DATA_AS_RESULT | ( | TYPENAME, | |
FUNCTIONNAME | |||
) | USE_COMPLEX_DATA( TYPENAME, FUNCTIONNAME##Result ) |
Use an existing complex type definition for a function which uses the type as result type.
TYPENAME | Name of the data type that shall be used. |
FUNCTIONNAME | Name of the function which uses the type as parameter type. |
Definition at line 213 of file rec_rpc_serialization_Complex.h.
#define USE_COMPLEX_DATA_AS_TOPICDATA | ( | TYPENAME, | |
TOPICNAME | |||
) | USE_COMPLEX_DATA( TYPENAME, topic##TOPICNAME##Data ) |
Use an existing complex data type definition for a topic which uses this data type.
TYPENAME | Name of the data type that shall be used. |
TOPICNAME | Name of the topic which uses the type. |
Definition at line 223 of file rec_rpc_serialization_Complex.h.