X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FListNParser.hh;h=2d96b566e017c83cde1b4328f19f763593bc8438;hb=7a5841bb928db440280cf91bbb3ea0230fd0e911;hp=af56bc32f1086fa3dc4faaa453357dde31e4321a;hpb=a1001797645cc68c869ef296f5e9ba13aa8e80c4;p=senf.git diff --git a/Packets/ListNParser.hh b/Packets/ListNParser.hh index af56bc3..2d96b56 100644 --- a/Packets/ListNParser.hh +++ b/Packets/ListNParser.hh @@ -1,8 +1,8 @@ // $Id$ // -// Copyright (C) 2007 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) +// Copyright (C) 2007 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -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////////////////////////////////////////