X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FParseListB.hh;h=c8ee2105a10142e974715b24c97761d48aef153d;hb=54b0a17fcfc48110714645f88d242a8b0d31cd8a;hp=f3506c5c7cc637c2c4967e01d0422d31d6175234;hpb=e21a814c84efb8ba3a6a978c6907f3c401c649ff;p=senf.git diff --git a/Packets/ParseListB.hh b/Packets/ParseListB.hh index f3506c5..c8ee210 100644 --- a/Packets/ParseListB.hh +++ b/Packets/ParseListB.hh @@ -65,11 +65,28 @@ namespace senf { typedef Parse_List< detail::Parse_ListB_Policy > parser; }; + /** \brief Define Parse_ListB field + + This macro is a special helper to define a senf::Parse_ListB 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) giving the total number of bytes of the list (not the + element count). + + \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_B(name, elt_type, size_type) \ + typedef senf::Parse_ListB::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_ParseListB_i_) +#if !defined(HH_Packets__decls_) && !defined(HH_ParseListB_i_) #define HH_ParseListB_i_ //#include "ParseListB.cci" //#include "ParseListB.ct"