CnC
Classes | Modules | Defines | Functions
Serialization

Classes

class  explicitly_serializable
 Specifies serialization category: explicit serialization via a "serialize" function. More...
class  bitwise_serializable
 simple structs/classes are bitwise serializable. More...
class  chunk< T, Allocator >
 Serialization of arrays with and without automatic memory handling. More...
class  serializer
 Handles serilialization of data-objects. More...

Modules

 Serialization of simple structs/classes without pointers or virtual functions.
 Non bitwise serializable objects
 Marshalling pointer types (e.g. items which are pointers)
 Automatic serialization of built-in types.

Defines

#define CNC_BITWISE_SERIALIZABLE(T)
#define CNC_POINTER_SERIALIZABLE(T)

Functions

template<class T >
explicitly_serializable serializer_category (const T *)

Detailed Description

There are three possible ways of setting up the serialization of your struct resp. class:


Define Documentation

#define CNC_BITWISE_SERIALIZABLE (   T)
Value:

Convenience macro for defining that a type should be treated as bitwise serializable:

Definition at line 238 of file serializer.h.

#define CNC_POINTER_SERIALIZABLE (   T)
Value:
namespace CnC {                                             \
        void serialize( serializer & ser, T *& t ) {  \
            ser & chunk< T >(t, 1);                        \
        }                                                       \
    }

Convenience macro for declaring serializable pointers. The object being pointed to should be serializable.

Definition at line 302 of file serializer.h.


Function Documentation

explicitly_serializable CnC::serializer_category ( const T *  ) [inline]

General case: a type belongs to the category explicitly_serializable, unless there is a specialization of the function template "serializer_category" (see below).

Definition at line 225 of file serializer.h.

    {
        return explicitly_serializable();
    }
 All Classes Namespaces Functions Variables Typedefs Enumerator Friends