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'
static Serialization::DataType::NativeDataTypeRegistry<MyType> _registerMyType;
Serialization::DataType::NativeDataTypeRegistry
Registrator for native data types.
Definition Serialization.h:615

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 615 of file Serialization.h.

## Constructor & Destructor Documentation

## NativeDataTypeRegistry()

template<typename T>

Serialization::DataType::NativeDataTypeRegistry< T >::NativeDataTypeRegistry | ( |  | ) |

inline

Definition at line 617 of file Serialization.h.

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

- Serialization.h