X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FListBParser.hh;h=76227c0b5f58cfc6c93d0dcb612365ce05510004;hb=b8ca4a544cce3e6023bb56b712a03d6362f2bb79;hp=aa7d69dd0244765ec0ee7e567054fcc7fbdc8a2e;hpb=380525e28d9a2a2758dedcb4875b5c3755303344;p=senf.git diff --git a/Packets/ListBParser.hh b/Packets/ListBParser.hh index aa7d69d..76227c0 100644 --- a/Packets/ListBParser.hh +++ b/Packets/ListBParser.hh @@ -23,8 +23,8 @@ /** \file \brief ListBParser public header */ -#ifndef HH_ListBParser_ -#define HH_ListBParser_ 1 +#ifndef HH_SENF_Packets_ListBParser_ +#define HH_SENF_Packets_ListBParser_ 1 // Custom includes #include "ListParser.hh" @@ -34,54 +34,12 @@ namespace senf { - namespace detail { template - class ListBParser_Policy; } - - /** \brief List parser with size-field in bytes - - This list parser will parse a list which size is given by a preceding field containing the - length of the list in bytes. This struct is just a template typedef: - \code - typedef senf::VectorNParser< Parser_UInt32, Parser_UInt16 >::parser MyVectorParser; - typedef senf::ListBParser< 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 bytes field. - - \warning There are some caveats when working with this kind of list - \li You may only change the size of a contained element from a container wrapper. - \li While you hold a container wrapper, only access the packet through this wrapper - or a nested wrapper either for reading or writing. - - If lists are nested, you need to allocate a container wrapper for each level and may only - access the packet through the lowest-level active container wrapper. - - \implementation These restrictions are necessary to ensure correct recalculation of the - bytes field. For more info, see the comments in \ref ListBParser.ih - - \see ListParser - \ingroup parsecollection - */ - - /** \brief Define ListBParser field - - This macro is a special helper to define a senf::ListBParser 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 - */ } ///////////////////////////////hh.e//////////////////////////////////////// #endif -#if !defined(HH_Packets__decls_) && !defined(HH_ListBParser_i_) -#define HH_ListBParser_i_ +#if !defined(HH_SENF_Packets_Packets__decls_) && !defined(HH_SENF_Packets_ListBParser_i_) +#define HH_SENF_Packets_ListBParser_i_ //#include "ListBParser.cci" //#include "ListBParser.ct" #include "ListBParser.cti"