vdj_pipe
pipeline for processing DNA sequence data
keyword_struct_macro.hpp
Go to the documentation of this file.
1 
7 #ifndef KEYWORD_STRUCT_MACRO_HPP_
8 #define KEYWORD_STRUCT_MACRO_HPP_
9 #include "boost/preprocessor/seq/for_each.hpp"
10 #include "boost/preprocessor/stringize.hpp"
11 
12 #define VDJ_PIPE_STATIC_STRING_METHOD(name, val) \
13  static std::string const& name() { \
14  static const std::string s = val; return s; \
15  } \
16 /* */
17 
18 #define VDJ_PIPE_KEYWORD_STRUCT_MACRO_(r, data, elem) \
19  VDJ_PIPE_STATIC_STRING_METHOD(elem, BOOST_PP_STRINGIZE(elem)) \
20 /* */
21 
22 #define VDJ_PIPE_KEYWORD_STRUCT(name, list) \
23  struct name { \
24  BOOST_PP_SEQ_FOR_EACH(VDJ_PIPE_KEYWORD_STRUCT_MACRO_, ,list) \
25  } \
26 /* */
27 
28 #endif /* KEYWORD_STRUCT_MACRO_HPP_ */