Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef CLASS_ADAPTOR_HPP_
00035 #define CLASS_ADAPTOR_HPP_
00036 #include <boost/preprocessor/tuple/elem.hpp>
00037 #include <boost/preprocessor/seq/for_each_i.hpp>
00038 #include <boost/preprocessor/seq/for_each.hpp>
00039 #include <boost/preprocessor/cat.hpp>
00040 #include <boost/preprocessor/dec.hpp>
00041 #include <boost/preprocessor/seq/size.hpp>
00042 #include <boost/preprocessor/repetition/repeat.hpp>
00043 #include <boost/preprocessor/control/if.hpp>
00044
00045 #define PP_LABUST_NAMESPACE_BEGIN(R,DATA,ELEM) \
00046 namespace ELEM{
00047
00048 #define PP_LABUST_NAMESPACE_ENUM(R,DATA,ELEM) ELEM::
00049
00050 #define PP_LABUST_NAMESPACE_END(Z,I,DATA) }
00051
00052 #define PP_LABUST_MAKE_STRING_LVL1(string) #string
00053 #define PP_LABUST_MAKE_STRING_LVL2(string) PP_LABUST_MAKE_STRING_LVL1(string)
00054
00055 #define PP_LABUST_FILLER_0(X, Y) \
00056 ((X, Y)) PP_LABUST_FILLER_1
00057 #define PP_LABUST_FILLER_1(X, Y) \
00058 ((X, Y)) PP_LABUST_FILLER_0
00059 #define PP_LABUST_FILLER_0_END
00060 #define PP_LABUST_FILLER_1_END
00061
00062 #define PP_LABUST_ATTRIBUTE_EXPAND(R, ATTRIBUTE_TUPEL_SIZE, ATTRIBUTE) \
00063 BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,0,ATTRIBUTE) BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE); \
00064
00065 #define PP_LABUST_NAMESPACE_DEFINITIONS_BEGIN(NAMESPACE_SEQ) \
00066 BOOST_PP_IF( \
00067 BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(NAMESPACE_SEQ)), \
00068 BOOST_PP_SEQ_FOR_EACH_R, \
00069 BOOST_PP_TUPLE_EAT(4))( \
00070 1, PP_LABUST_NAMESPACE_BEGIN, \
00071 _, BOOST_PP_SEQ_TAIL(NAMESPACE_SEQ))
00072
00073 #define PP_LABUST_NAMESPACE_DEFINITIONS_ENUM(NAMESPACE_SEQ) \
00074 BOOST_PP_IF( \
00075 BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(NAMESPACE_SEQ)), \
00076 BOOST_PP_SEQ_FOR_EACH_R, \
00077 BOOST_PP_TUPLE_EAT(4))( \
00078 1, PP_LABUST_NAMESPACE_ENUM, \
00079 _, BOOST_PP_SEQ_TAIL(NAMESPACE_SEQ))
00080
00081 #define PP_LABUST_NAMESPACE_DEFINITIONS_END(NAMESPACE_SEQ) \
00082 BOOST_PP_REPEAT_1( \
00083 BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(NAMESPACE_SEQ)), \
00084 PP_LABUST_NAMESPACE_END, _)
00085
00086 #define PP_LABUST_MACRO_ON_ATTRIBUTES(MACRO,ATTRIBUTES) \
00087 BOOST_PP_SEQ_FOR_EACH_R(1, MACRO, \
00088 2, BOOST_PP_CAT(PP_LABUST_FILLER_0 ATTRIBUTES, _END))
00089
00090
00091 #endif