4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Stefan Bund <g0dil@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief ListNParser public header */
26 #ifndef HH_ListNParser_
27 #define HH_ListNParser_ 1
30 #include "ListParser.hh"
31 #include "AuxParser.hh"
33 //#include "ListNParser.mpp"
34 #include "ListNParser.ih"
35 ///////////////////////////////hh.p////////////////////////////////////////
39 /** \brief List parser with size-field giving number of list elements
41 This parser will parse a list which size is giving by a preceding field containing the
42 number of list elements. This struct is just a 'template typedef':
44 senf::VectorNParser< Parser_UInt32, Parser_UInt16 >::parser MyVectorParser;
45 senf::ListNParser< MyVectorParser, UInt16Parser >::parser MyListParser;
47 This first defines a Vector of 32 bit unsigned integers with 16 bit length counter. Then it
48 defines a list of such vectors with a 16 bit size field.
51 \ingroup parsecollection
54 /** \brief Define ListNParser field
56 This macro is a special helper to define a senf::ListNParser type field, a list of elements
57 of type \a elt_type (a parser type) directly preceded by a numeric size field of type \a
58 size_type (another parser type).
60 \param[in] name field name
61 \param[in] elt_type list element type
62 \param[in] size_type size type
64 \ingroup packetparsermacros
68 ///////////////////////////////hh.e////////////////////////////////////////
70 #if !defined(HH_Packets__decls_) && !defined(HH_ListNParser_i_)
71 #define HH_ListNParser_i_
72 //#include "ListNParser.cci"
73 #include "ListNParser.ct"
74 #include "ListNParser.cti"
82 // c-file-style: "senf"
83 // indent-tabs-mode: nil
84 // ispell-local-dictionary: "american"
85 // compile-command: "scons -u test"