REC RPC library
Public Member Functions | Protected Member Functions | List of all members
rec::rpc::serialization::Complex Class Reference

Base class for complex serializable data containers. More...

#include <rec_rpc_serialization_Complex.h>

Inheritance diagram for rec::rpc::serialization::Complex:
Inheritance graph
[legend]
Collaboration diagram for rec::rpc::serialization::Complex:
Collaboration graph
[legend]

Public Member Functions

 Complex (const QString &versionString)
 
virtual ~Complex ()
 
- Public Member Functions inherited from rec::rpc::serialization::Serializable
 Serializable ()
 
virtual ~Serializable ()
 

Protected Member Functions

void addChild (Serializable *c)
 

Additional Inherited Members

- Static Public Attributes inherited from rec::rpc::serialization::Serializable
static SerializablePtr empty
 

Detailed Description

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.

See also
BEGIN_COMPLEX_DATA_DECLARATION, BEGIN_COMPLEX_DATA_DECLARATION_AND_IMPLEMENTATION

Definition at line 57 of file rec_rpc_serialization_Complex.h.

Constructor & Destructor Documentation

rec::rpc::serialization::Complex::Complex ( const QString &  versionString)

Creates a complex instance with a version string.

virtual rec::rpc::serialization::Complex::~Complex ( )
virtual

Member Function Documentation

void rec::rpc::serialization::Complex::addChild ( Serializable c)
protected

Adds a Serializable to the list of children. This must be done in the constructor. It is recommended to use the preprocessor macro.

Parameters
cThe child to be added.
See also
ADD_MEMBER

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