REC RPC library
|
Base class for complex serializable data containers. More...
#include <rec_rpc_serialization_Complex.h>
Public Member Functions | |
Complex (const QString &versionString) | |
virtual | ~Complex () |
![]() | |
Serializable () | |
virtual | ~Serializable () |
Protected Member Functions | |
void | addChild (Serializable *c) |
Additional Inherited Members | |
![]() | |
static SerializablePtr | empty |
Base class for complex serializable data containers.
This class can be used as a base class for complex or nested serializable data containers. This is useful if a function has more than one parameter or return value or a topic stores more than one single value.
Derive from Complex to declare and implement an own complex data container using the preprocessor macros.
Every instance of a Complex subclass must have a version string that will also be serialized. When deserializing, the version strings are compared, and if they differ, an error will be thrown.
It is recommended to use the preprocessor macros to declare a Complex subclass.
Definition at line 57 of file rec_rpc_serialization_Complex.h.
rec::rpc::serialization::Complex::Complex | ( | const QString & | versionString | ) |
Creates a complex instance with a version string.
|
virtual |
|
protected |
Adds a Serializable to the list of children. This must be done in the constructor. It is recommended to use the preprocessor macro.
c | The child to be added. |