X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FParseListB.hh;h=c8ee2105a10142e974715b24c97761d48aef153d;hb=688f3266c15bd532194fe81e704c0a2cf320375a;hp=5fa118c3144b3c4c2ac367851461faa18b35c47e;hpb=54eed72c506b09ef5b4be0b62fecedfbc0e3f261;p=senf.git diff --git a/Packets/ParseListB.hh b/Packets/ParseListB.hh index 5fa118c..c8ee210 100644 --- a/Packets/ParseListB.hh +++ b/Packets/ParseListB.hh @@ -65,6 +65,23 @@ 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////////////////////////////////////////