X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FParseListN.hh;h=18c5f4b90406e76980a604a1931cc391cbb7a521;hb=ac86c2bb40746fbedf70a19af3307e5da642b04a;hp=9151a6112e228a9492b2b8690ae21755cb9592e1;hpb=e21a814c84efb8ba3a6a978c6907f3c401c649ff;p=senf.git diff --git a/Packets/ParseListN.hh b/Packets/ParseListN.hh index 9151a61..18c5f4b 100644 --- a/Packets/ParseListN.hh +++ b/Packets/ParseListN.hh @@ -55,11 +55,27 @@ namespace senf { typedef Parse_List< detail::Parse_ListN_Policy > parser; }; + /** \brief Define Parse_ListN field + + This macro is a special helper to define a senf::Parse_ListN type field, a list of elements + of type \a elt_type (a parser type) directly preceded by a numeric size field of type \a + size_type (another parser type). + + \param[in] name field name + \param[in] elt_type list element type + \param[in] size_type size type + \hideinitializer + \ingroup packetparsermacros + */ +# define SENF_PARSER_LIST_N(name, elt_type, size_type) \ + typedef senf::Parse_ListN::parser BOOST_PP_CAT(name, _list_t); \ + SENF_PARSER_FIELD( name, BOOST_PP_CAT(name, _list_t) ) + } ///////////////////////////////hh.e//////////////////////////////////////// #endif -#if !defined(SENF_PACKETS_DECL_ONLY) && !defined(HH_ParseListN_i_) +#if !defined(HH_Packets__decls_) && !defined(HH_ParseListN_i_) #define HH_ParseListN_i_ //#include "ParseListN.cci" #include "ParseListN.ct"