Classes | Namespaces | Macros | Enumerations
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:

Classes

struct  Celartem::DataTraits< T >
 

Namespaces

 Celartem
 

Macros

#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.

Macro Definition 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
inTypeThe type to define.
inCopyPolicyOne of the Celartem::CopyPolicy enumeration.
inStoragePolicyOne of the Celartem::StoragePolicy enumeration.
See Also
DataTraits, SimpleArray, DataArray
#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; \
}
CopyPolicy
Definition: cel_datatraits.h:20
StoragePolicy
Definition: cel_datatraits.h:39

This macro eases to define the DataTraits for a type.

Parameters
inTypeThe type to define.
inCopyPolicyOne of the Celartem::CopyPolicy enumeration.
inStoragePolicyOne of the Celartem::StoragePolicy enumeration.
isPodtrue if the type is POD (Plain-Old-Data); otherwise false.
See Also
DataTraits, SimpleArray, DataArray
#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
inTypeThe type to define.

Cuminas DjVu SDK 3.0.33103
This document is made with doxygen 1.8.5 at Sun Dec 15 2013 19:38:05.
Cuminas Logo