libgig  4.5.0.svn7
Serialization::DataType::NativeDataTypeRegistry< T > Class Template Reference

Registrator for native data types. More...

#include <Serialization.h>

Detailed Description

template<typename T>
class Serialization::DataType::NativeDataTypeRegistry< T >

Registrator for native data types.

Explicitly registers some of application's native C/C++ data types at C++ global declaration space.

This is just a wrapper class for calling the static method DataType::registerNativeDataType<T>(), as functions in general cannot be called directly from a global declaration space in C++.

Example:

// e.g. placed at the beginning of app's source file 'MyType.cpp'
Registrator for native data types.

You might define a convenience macro in your app like this:

// e.g. placed in some of app's shared header file
#define REGISTER_TYPE(type) \
static Serialization::DataType::NativeDataTypeRegistry<type> _register_##type
// e.g. placed at the beginning of app's source file 'MyType.cpp'
REGISTER_TYPE(MyType);
See also
registerNativeDataType() for discussion about manual registration

Definition at line 577 of file Serialization.h.


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