cel_datatraits.h File Reference

Defines Data Traits for Copying/Serializing. More...

#include "cel_types.h"

Include dependency graph for cel_datatraits.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Celartem

Classes

struct  Celartem::DataTraits< T >

Defines

#define CEL_DEFINE_DATATRAITS_EX(inType, inCopyPolicy, inStoragePolicy, isPod)
#define CEL_DEFINE_DATATRAITS(inType, inCopyPolicy, inStoragePolicy)   CEL_DEFINE_DATATRAITS_EX(inType, inCopyPolicy, inStoragePolicy, false)
#define CEL_DEFINE_DATATRAITS_POD(inType)   CEL_DEFINE_DATATRAITS_EX(inType, byMemcpy, bySwapCopyBytes, true)

Enumerations

enum  Celartem::CopyPolicy { Celartem::noCopy = 0, Celartem::byConstructor = 1, Celartem::byMemcpy = 2 }
enum  Celartem::StoragePolicy { Celartem::notToBeStored = 0, Celartem::byCopyBytes = 1, Celartem::bySwapCopyBytes = 2, Celartem::byClassMethods = 3 }


Detailed Description

Defines Data Traits for Copying/Serializing.

Definition in file cel_datatraits.h.


Define Documentation

#define CEL_DEFINE_DATATRAITS ( inType,
inCopyPolicy,
inStoragePolicy   )     CEL_DEFINE_DATATRAITS_EX(inType, inCopyPolicy, inStoragePolicy, false)

This macro eases to define the DataTraits for a type.

Parameters:
inType The type to define.
inCopyPolicy One of the Celartem::CopyPolicy enumeration.
inStoragePolicy One of the Celartem::StoragePolicy enumeration.
See also:
DataTraits, SimpleArray, DataArray

Definition at line 183 of file cel_datatraits.h.

#define CEL_DEFINE_DATATRAITS_EX ( inType,
inCopyPolicy,
inStoragePolicy,
isPod   ) 

Value:

template<> struct ::Celartem::DataTraits<inType> {              \
            static const ::Celartem::CopyPolicy copyPolicy = ::Celartem::inCopyPolicy; \
            static const ::Celartem::StoragePolicy storagePolicy = ::Celartem::inStoragePolicy; \
            static const bool isPOD = isPod; \
        }
This macro eases to define the DataTraits for a type.
Parameters:
inType The type to define.
inCopyPolicy One of the Celartem::CopyPolicy enumeration.
inStoragePolicy One of the Celartem::StoragePolicy enumeration.
isPod true if the type is POD (Plain-Old-Data); otherwise false.
See also:
DataTraits, SimpleArray, DataArray

Definition at line 157 of file cel_datatraits.h.

#define CEL_DEFINE_DATATRAITS_POD ( inType   )     CEL_DEFINE_DATATRAITS_EX(inType, byMemcpy, bySwapCopyBytes, true)

This macro declares the type is POD (Plain-Old-Data).

Parameters:
inType The type to define.

Definition at line 192 of file cel_datatraits.h.


This document is automatically generated using doxygen 1.5.4 at Fri Jun 27 18:22:06 2008.