X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FParseListB.hh;h=f3506c5c7cc637c2c4967e01d0422d31d6175234;hb=81ffa1c459b96dd44472bcef37e1e373934ee138;hp=7a53c0ab3bcf044b72f95c882005c99e98b0ad19;hpb=47368f306a577d1e46df69a7f729bd3893cbe5e7;p=senf.git diff --git a/Packets/ParseListB.hh b/Packets/ParseListB.hh index 7a53c0a..f3506c5 100644 --- a/Packets/ParseListB.hh +++ b/Packets/ParseListB.hh @@ -38,10 +38,10 @@ namespace senf { /** \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 - lenght of the list in bytes. This struct is just a template typedef: + length of the list in bytes. This struct is just a template typedef: \code - typedef senf::Parse_VectorN< Parser_UInt32, Parser_UInt16 >::parser Parse_MyVector; - typedef senf::Parse_ListB< Parse_MyVector, Parse_UInt16 >::parser Parse_MyList; + typedef senf::Parse_VectorN< Parser_UInt32, Parser_UInt16 >::parser Parse_MyVector; + typedef senf::Parse_ListB< Parse_MyVector, Parse_UInt16 >::parser Parse_MyList; \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. @@ -49,13 +49,16 @@ namespace senf { \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 wrepper either for reading or writing. + 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 ParseListB.ih + + \see Parse_List + \ingroup parsecollection */ template struct Parse_ListB { @@ -65,6 +68,9 @@ namespace senf { } ///////////////////////////////hh.e//////////////////////////////////////// +#endif +#if !defined(SENF_PACKETS_DECL_ONLY) && !defined(HH_ParseListB_i_) +#define HH_ParseListB_i_ //#include "ParseListB.cci" //#include "ParseListB.ct" #include "ParseListB.cti"