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

Macro set for template class manipulation. More...

#include <boost/preprocessor/seq/for_each.hpp>
#include <boost/preprocessor/seq/elem.hpp>
#include <boost/preprocessor/seq/pop_front.hpp>
#include <boost/preprocessor/seq/enum.hpp>
#include <IPSDKUtil/Tools/BaseMacros.h>

Go to the source code of this file.

Macros

#define IPSDK_TEMPLATE_PARAMS_TYPED_OR_RAW_TRUE(T)   BOOST_PP_SEQ_ELEM(0, T) BOOST_PP_CAT(_, BOOST_PP_SEQ_ELEM(1, T))
 [INTERNAL] macro allowing to print typed or not typed template parameters
 
#define IPSDK_TEMPLATE_PARAMS_TYPED_OR_RAW_FALSE(T)   typename BOOST_PP_CAT(_, BOOST_PP_SEQ_ELEM(0, T))
 [INTERNAL] macro allowing to print typed or not typed template parameters
 
#define IPSDK_TEMPLATE_PARAMS_TYPED_OR_RAW(T)
 [INTERNAL] macro allowing to print typed or not typed template parameters More...
 
#define IPSDK_TEMPLATE_PARAMS_MACRO(r, data, i, T)   BOOST_PP_COMMA_IF(i) IPSDK_TEMPLATE_PARAMS_TYPED_OR_RAW(T)
 [INTERNAL] macro allowing to enumerate template parameters.
 
#define IPSDK_TEMPLATE_PARAMS(seqT)   template <BOOST_PP_SEQ_FOR_EACH_I(IPSDK_TEMPLATE_PARAMS_MACRO, _, seqT)>
 macro allowing to enumerate template parameters. More...
 
#define IPSDK_TEMPLATE_ARGS_TYPED_OR_RAW_TRUE(T)   BOOST_PP_CAT(_, BOOST_PP_SEQ_ELEM(1, T))
 [INTERNAL] macro allowing to print typed or not typed template arguments
 
#define IPSDK_TEMPLATE_ARGS_TYPED_OR_RAW_FALSE(T)   BOOST_PP_CAT(_, BOOST_PP_SEQ_ELEM(0, T))
 [INTERNAL] macro allowing to print typed or not typed template arguments
 
#define IPSDK_TEMPLATE_ARGS_TYPED_OR_RAW(T)
 [INTERNAL] macro allowing to print typed or not typed template arguments More...
 
#define IPSDK_TEMPLATE_ARGS_MACRO(r, data, i, T)   BOOST_PP_COMMA_IF(i) IPSDK_TEMPLATE_ARGS_TYPED_OR_RAW(T)
 [INTERNAL] macro allowing to enumerate template arguments.
 
#define IPSDK_TEMPLATE_ARGS(seqT)   BOOST_PP_SEQ_FOR_EACH_I(IPSDK_TEMPLATE_ARGS_MACRO, _, seqT)
 macro allowing to enumerate template arguments. More...
 
#define IPSDK_TEMPLATE_VALUES_MACRO(s, data, T)   BOOST_PP_CAT(_, T)
 [INTERNAL] macro allowing to enumerate template values.
 
#define IPSDK_TEMPLATE_VALUES(seqT)   BOOST_PP_SEQ_ENUM(seqT)
 macro allowing to enumerate template values. More...
 

Detailed Description

Macro set for template class manipulation.

Author
E. Noirfalise
Date
2013/2/15

Macro Definition Documentation

◆ IPSDK_TEMPLATE_PARAMS_TYPED_OR_RAW

#define IPSDK_TEMPLATE_PARAMS_TYPED_OR_RAW (   T)
Value:
BOOST_PP_IF(BOOST_PP_SUB(BOOST_PP_SEQ_SIZE(T), 1), \
#define IPSDK_TEMPLATE_PARAMS_TYPED_OR_RAW_FALSE(T)
[INTERNAL] macro allowing to print typed or not typed template parameters
Definition: TemplateMacro.h:33
#define IPSDK_TEMPLATE_PARAMS_TYPED_OR_RAW_TRUE(T)
[INTERNAL] macro allowing to print typed or not typed template parameters
Definition: TemplateMacro.h:28

[INTERNAL] macro allowing to print typed or not typed template parameters

User can for example use it with :

  • IPSDK_TEMPLATE_TYPED_OR_RAW((TemplateArg))
  • IPSDK_TEMPLATE_TYPED_OR_RAW((TemplateType)(TemplateArg))

◆ IPSDK_TEMPLATE_PARAMS

#define IPSDK_TEMPLATE_PARAMS (   seqT)    template <BOOST_PP_SEQ_FOR_EACH_I(IPSDK_TEMPLATE_PARAMS_MACRO, _, seqT)>

macro allowing to enumerate template parameters.

IPSDK_TEMPLATE_PARAMS(((T1))((T2))((T3))) outputs as : template <typename _T1, typename _T2, typename _T3>

◆ IPSDK_TEMPLATE_ARGS_TYPED_OR_RAW

#define IPSDK_TEMPLATE_ARGS_TYPED_OR_RAW (   T)
Value:
BOOST_PP_IF(BOOST_PP_SUB(BOOST_PP_SEQ_SIZE(T), 1), \
#define IPSDK_TEMPLATE_ARGS_TYPED_OR_RAW_TRUE(T)
[INTERNAL] macro allowing to print typed or not typed template arguments
Definition: TemplateMacro.h:65
#define IPSDK_TEMPLATE_ARGS_TYPED_OR_RAW_FALSE(T)
[INTERNAL] macro allowing to print typed or not typed template arguments
Definition: TemplateMacro.h:70

[INTERNAL] macro allowing to print typed or not typed template arguments

User can for example use it with :

◆ IPSDK_TEMPLATE_ARGS

#define IPSDK_TEMPLATE_ARGS (   seqT)    BOOST_PP_SEQ_FOR_EACH_I(IPSDK_TEMPLATE_ARGS_MACRO, _, seqT)

macro allowing to enumerate template arguments.

IPSDK_TEMPLATE_ARGS(((T1))((T2))((T3))) outputs as : _T1, _T2, _T3

◆ IPSDK_TEMPLATE_VALUES

#define IPSDK_TEMPLATE_VALUES (   seqT)    BOOST_PP_SEQ_ENUM(seqT)

macro allowing to enumerate template values.

IPSDK_TEMPLATE_VALUES((T1)(T2)(T3)) outputs as : T1, T2, T3