X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FListNParser.hh;h=2d96b566e017c83cde1b4328f19f763593bc8438;hb=46ce25973f087d30ca10eebdad6e3bfa7586ecc9;hp=2cb4292f78fb9483fa95811677ff10aff98bb158;hpb=a1a6c76a214ad1935032826713cabaf9ac57bf07;p=senf.git diff --git a/Packets/ListNParser.hh b/Packets/ListNParser.hh index 2cb4292..2d96b56 100644 --- a/Packets/ListNParser.hh +++ b/Packets/ListNParser.hh @@ -28,50 +28,13 @@ // Custom includes #include "ListParser.hh" +#include "AuxParser.hh" //#include "ListNParser.mpp" +#include "ListNParser.ih" ///////////////////////////////hh.p//////////////////////////////////////// namespace senf { - - namespace detail { template - class ListNParser_Policy; } - - /** \brief List parser with size-field giving number of list elements - - This parser will parse a list which size is giving by a preceding field containing the - number of list elements. This struct is just a 'template typedef': - \code - senf::VectorNParser< Parser_UInt32, Parser_UInt16 >::parser MyVectorParser; - senf::ListNParser< MyVectorParser, UInt16Parser >::parser MyListParser; - \endcode - This first defines a Vector of 32 bit unsigned integers with 16 bit length counter. Then it - defines a list of such vectors with a 16 bit size field. - - \see ListParser - \ingroup parsecollection - */ - template - struct ListNParser { - typedef ListParser< detail::ListNParser_Policy > parser; - }; - - /** \brief Define ListNParser field - - This macro is a special helper to define a senf::ListNParser 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::ListNParser::parser BOOST_PP_CAT(name, _list_t); \ - SENF_PARSER_FIELD( name, BOOST_PP_CAT(name, _list_t) ) - } ///////////////////////////////hh.e////////////////////////////////////////