/** \file ParserTypes.hpp * * date: Sep, 27 2011 * author: heber * */ #ifndef PARSERTYPES_HPP_ #define PARSERTYPES_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include "ParserTypes.def" //!> function to print each member of the sequence in the enumeration #define sequence_print(z,n,seq) \ BOOST_PP_SEQ_ELEM(n, seq) , //!> Enumeration of all known parsers enum ParserTypes { // some proprocessor magic to generate the body from the above sequence #if defined ParserTypes_END // do we have parameters at all? #define BOOST_PP_LOCAL_MACRO(n) sequence_print(~, n, PARSERSEQUENCE) #define BOOST_PP_LOCAL_LIMITS (0, ParserTypes_END-1) #include BOOST_PP_LOCAL_ITERATE() #undef BOOST_PP_LOCAL_MACRO #undef BOOST_PP_LOCAL_LIMITS #endif ParserTypes_end = ParserTypes_END, ParserTypes_begin = BOOST_PP_SEQ_HEAD(PARSERSEQUENCE) }; #undef sequence_print //!> Number of known ParserTypes const size_t ParserTypesMax = ParserTypes_END; #include "ParserTypes.undef" //!> Typedef for enumeration to ease its use typedef enum ParserTypes ParserTypes; /** Increment operator for the enumeration ParserTypes to allow loops. * \param &type value * \return value incremented by one */ ParserTypes &operator++(ParserTypes &type); #endif /* PARSERTYPES_HPP_ */