IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Macros
SerializationTemplateSrcMacro.h File Reference

Source part of macros set for template class serialization. More...

#include <IPSDKUtil/Dynamic/DynamicTemplateSrcMacro.h>
#include <IPSDKSerialization/Logger/IPSDKSerializationLog.h>
#include <IPSDKSerialization/Engine/SerializationSrcMacro.h>
#include <IPSDKUtil/TemplateMacro.h>

Go to the source code of this file.

Macros

#define IPSDK_IMPLEMENT_TEMPLATE_SERIAL_VERSION(className, seqT, version)
 macro enabling to define serialization class version More...
 
#define IPSDK_IMPLEMENT_TEMPLATE_SERIAL(libraryName, className, seqT, version)   IPSDK_IMPLEMENT_TEMPLATE_SERIAL_VERSION(className, seqT, version)
 macro enabling class serialization in library class
 
#define IPSDK_IMPLEMENT_TEMPLATE_SERIAL_WITH_COPY(libraryName, className, seqT, version)
 macro enabling class serialization in library class More...
 
#define IPSDK_IMPLEMENT_TEMPLATE_SERIAL_WITHOUT_COPY(libraryName, className, seqT, version)
 macro enabling class serialization in library class More...
 
#define IPSDK_IMPLEMENT_ABSTRACT_TEMPLATE_SERIAL_WITH_COPY(libraryName, className, seqT, version)
 macro enabling class serialization in library class More...
 
#define IPSDK_IMPLEMENT_ABSTRACT_TEMPLATE_SERIAL_WITHOUT_COPY(libraryName, className, seqT, version)
 macro enabling class serialization in library class More...
 
#define IPSDK_IMPLEMENT_TEMPLATE_SERIAL_READ(className, seqT, baseClassName)
 macros enabling object read from an archive More...
 
#define IPSDK_IMPLEMENT_TEMPLATE_SERIAL_WRITE(className, seqT, baseClassName)
 macros enabling object save to an archive More...
 
#define IPSDK_EXPORT_TEMPLATE_SERIAL(libraryName, namespaceSeq, className, TYPE_SEQ)
 macro for exporting template class specializations More...
 
#define IPSDK_EXPORT_ABSTRACT_TEMPLATE_SERIAL(libraryName, namespaceSeq, className, TYPE_SEQ)
 macro for exporting abstract template class specializations More...
 

Detailed Description

Source part of macros set for template class serialization.

Author
E. Noirfalise
Date
2013/2/15

Macro Definition Documentation

◆ IPSDK_IMPLEMENT_TEMPLATE_SERIAL_VERSION

#define IPSDK_IMPLEMENT_TEMPLATE_SERIAL_VERSION (   className,
  seqT,
  version 
)
Value:
ipUInt32 className<IPSDK_TEMPLATE_ARGS(seqT)>::getVersion() { \
boost::lock_guard<boost::mutex> lock(VersionMutex::get()); \
static ipUInt32 g_##className##Version(version); \
return g_##className##Version; \
}
#define IPSDK_TEMPLATE_PARAMS(seqT)
macro allowing to enumerate template parameters.
Definition: TemplateMacro.h:57
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53

macro enabling to define serialization class version

◆ IPSDK_IMPLEMENT_TEMPLATE_SERIAL_WITH_COPY

#define IPSDK_IMPLEMENT_TEMPLATE_SERIAL_WITH_COPY (   libraryName,
  className,
  seqT,
  version 
)
Value:
IPSDK_IMPLEMENT_TEMPLATE_SERIAL(libraryName, className, seqT, version)
#define IPSDK_IMPLEMENT_TEMPLATE_DYNAMIC_WITH_COPY(className, seqT)
macro enabling dynamic properties on template class
Definition: DynamicTemplateSrcMacro.h:111

macro enabling class serialization in library class

◆ IPSDK_IMPLEMENT_TEMPLATE_SERIAL_WITHOUT_COPY

#define IPSDK_IMPLEMENT_TEMPLATE_SERIAL_WITHOUT_COPY (   libraryName,
  className,
  seqT,
  version 
)
Value:
IPSDK_IMPLEMENT_TEMPLATE_SERIAL(libraryName, className, seqT, version)
#define IPSDK_IMPLEMENT_TEMPLATE_DYNAMIC_WITHOUT_COPY(className, seqT)
macro enabling dynamic properties on template class
Definition: DynamicTemplateSrcMacro.h:117

macro enabling class serialization in library class

◆ IPSDK_IMPLEMENT_ABSTRACT_TEMPLATE_SERIAL_WITH_COPY

#define IPSDK_IMPLEMENT_ABSTRACT_TEMPLATE_SERIAL_WITH_COPY (   libraryName,
  className,
  seqT,
  version 
)
Value:
IPSDK_IMPLEMENT_TEMPLATE_SERIAL(libraryName, className, seqT, version)
#define IPSDK_IMPLEMENT_ABSTRACT_TEMPLATE_DYNAMIC_WITH_COPY(className, seqT)
macro enabling dynamic properties on abstract template class
Definition: DynamicTemplateSrcMacro.h:139

macro enabling class serialization in library class

◆ IPSDK_IMPLEMENT_ABSTRACT_TEMPLATE_SERIAL_WITHOUT_COPY

#define IPSDK_IMPLEMENT_ABSTRACT_TEMPLATE_SERIAL_WITHOUT_COPY (   libraryName,
  className,
  seqT,
  version 
)
Value:
IPSDK_IMPLEMENT_TEMPLATE_SERIAL(libraryName, className, seqT, version)
#define IPSDK_IMPLEMENT_ABSTRACT_TEMPLATE_DYNAMIC_WITHOUT_COPY(className, seqT)
macro enabling dynamic properties on abstract template class
Definition: DynamicTemplateSrcMacro.h:144

macro enabling class serialization in library class

◆ IPSDK_IMPLEMENT_TEMPLATE_SERIAL_READ

#define IPSDK_IMPLEMENT_TEMPLATE_SERIAL_READ (   className,
  seqT,
  baseClassName 
)
Value:
ipsdk::BoolResult className<IPSDK_TEMPLATE_ARGS(seqT)>::read(ipsdk::BaseIArchive& ar) { \
ipsdk::BoolResult baseClassResult = baseClassName::read(ar); \
if (baseClassResult == false) \
return baseClassResult; \
ipsdk::ipUInt32 version; \
if (ar.isClassVersionRegistred(className<IPSDK_TEMPLATE_ARGS(seqT)>::getClassName()) == true) \
version = ar.getRegisterClassVersion(className<IPSDK_TEMPLATE_ARGS(seqT)>::getClassName()); \
else { \
IPSDK_START_ARCHIVE_SECTION(ar, className<IPSDK_TEMPLATE_ARGS(seqT)>::getClassName()); \
ar >> IPSDK_MAKE_IITEM_VALUE(version); \
IPSDKSERIALIZATION_CHECK(version <= className<IPSDK_TEMPLATE_ARGS(seqT)>::getVersion(), \
version % className<IPSDK_TEMPLATE_ARGS(seqT)>::getClassName() % \
className<IPSDK_TEMPLATE_ARGS(seqT)>::getVersion()); \
ar.registerClassVersion(className<IPSDK_TEMPLATE_ARGS(seqT)>::getClassName(), version); \
IPSDK_END_ARCHIVE_SECTION(className<IPSDK_TEMPLATE_ARGS(seqT)>::getClassName()); \
}
Read class version d for class s is greater than current class version d.
Definition: IPSDKSerializationLogMessages.h:84
#define IPSDK_MAKE_IITEM_VALUE(value)
macro for SerializationIItem creation
Definition: SerializationIItemMacros.h:26
#define IPSDK_TEMPLATE_ARGS(seqT)
macro allowing to enumerate template arguments.
Definition: TemplateMacro.h:94
Base class for serialization input archives.
Definition: BaseIArchive.h:36
ProcessingResult< bool > BoolResult
typedef for boolean results associated to a string description
Definition: ProcessingResultTypes.h:29
#define IPSDK_TEMPLATE_PARAMS(seqT)
macro allowing to enumerate template parameters.
Definition: TemplateMacro.h:57
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53

macros enabling object read from an archive

◆ IPSDK_IMPLEMENT_TEMPLATE_SERIAL_WRITE

#define IPSDK_IMPLEMENT_TEMPLATE_SERIAL_WRITE (   className,
  seqT,
  baseClassName 
)
Value:
ipsdk::BoolResult className<IPSDK_TEMPLATE_ARGS(seqT)>::write(ipsdk::BaseOArchive& ar) const { \
ipsdk::BoolResult baseClassResult = baseClassName::write(ar); \
if (baseClassResult == false) \
return baseClassResult; \
if (ar.isClassVersionRegistred(className<IPSDK_TEMPLATE_ARGS(seqT)>::getClassName()) == false) { \
ipsdk::ipUInt32 version = className<IPSDK_TEMPLATE_ARGS(seqT)>::getVersion(); \
IPSDK_START_ARCHIVE_SECTION(ar, className<IPSDK_TEMPLATE_ARGS(seqT)>::getClassName()); \
ar << IPSDK_MAKE_OITEM_VALUE(version); \
ar.registerClassVersion(className<IPSDK_TEMPLATE_ARGS(seqT)>::getClassName(), version); \
IPSDK_END_ARCHIVE_SECTION(className<IPSDK_TEMPLATE_ARGS(seqT)>::getClassName()); \
}
#define IPSDK_MAKE_OITEM_VALUE(value)
macro for SerializationOItem creation
Definition: SerializationOItemMacros.h:26
#define IPSDK_TEMPLATE_ARGS(seqT)
macro allowing to enumerate template arguments.
Definition: TemplateMacro.h:94
Base class for serialization output archives.
Definition: BaseOArchive.h:35
ProcessingResult< bool > BoolResult
typedef for boolean results associated to a string description
Definition: ProcessingResultTypes.h:29
#define IPSDK_TEMPLATE_PARAMS(seqT)
macro allowing to enumerate template parameters.
Definition: TemplateMacro.h:57
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53

macros enabling object save to an archive

◆ IPSDK_EXPORT_TEMPLATE_SERIAL

#define IPSDK_EXPORT_TEMPLATE_SERIAL (   libraryName,
  namespaceSeq,
  className,
  TYPE_SEQ 
)
Value:
BOOST_PP_SEQ_FOR_EACH(IPSDK_EXPORT_TEMPLATE_DYNAMIC_MACRO, \
(IPSDK_LIB_API(libraryName)) \
(IPSDK_START_NAMESPACE(namespaceSeq)) \
(className) \
(IPSDK_END_NAMESPACE(namespaceSeq)) \
(IPSDK_FULL_NAMESPACE_STR(namespaceSeq)), \
TYPE_SEQ)
#define IPSDK_LIB_API(libraryName)
macro allowing to format macro name used to retrieve a library api macro given its base name ...
#define IPSDK_FULL_NAMESPACE_STR(namespaceSeq)
macro allowing to retrieve string associated to a namespace sequence
Definition: BaseMacros.h:106
#define IPSDK_EXPORT_TEMPLATE_DYNAMIC_MACRO(r, Seq, seqT)
[INTERNAL] macro for exporting template class specializations
Definition: DynamicTemplateSrcMacro.h:169
#define IPSDK_START_NAMESPACE(namespaceSeq)
macro allowing to print namespaces begining
Definition: BaseMacros.h:74
#define IPSDK_END_NAMESPACE(namespaceSeq)
macro allowing to print namespaces ending
Definition: BaseMacros.h:83

macro for exporting template class specializations

◆ IPSDK_EXPORT_ABSTRACT_TEMPLATE_SERIAL

#define IPSDK_EXPORT_ABSTRACT_TEMPLATE_SERIAL (   libraryName,
  namespaceSeq,
  className,
  TYPE_SEQ 
)
Value:
(IPSDK_LIB_API(libraryName)) \
(IPSDK_START_NAMESPACE(namespaceSeq)) \
(className) \
(IPSDK_END_NAMESPACE(namespaceSeq)) \
(IPSDK_FULL_NAMESPACE_STR(namespaceSeq)), \
TYPE_SEQ)
#define IPSDK_LIB_API(libraryName)
macro allowing to format macro name used to retrieve a library api macro given its base name ...
#define IPSDK_FULL_NAMESPACE_STR(namespaceSeq)
macro allowing to retrieve string associated to a namespace sequence
Definition: BaseMacros.h:106
#define IPSDK_START_NAMESPACE(namespaceSeq)
macro allowing to print namespaces begining
Definition: BaseMacros.h:74
#define IPSDK_END_NAMESPACE(namespaceSeq)
macro allowing to print namespaces ending
Definition: BaseMacros.h:83
#define IPSDK_EXPORT_ABSTRACT_TEMPLATE_DYNAMIC_MACRO(r, Seq, seqT)
[INTERNAL] macro for exporting abstract template class specializations
Definition: DynamicTemplateSrcMacro.h:234

macro for exporting abstract template class specializations