X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FVectorParser.hh;h=db9e0de2c015adc79658c8c584caa848a65a2e50;hb=c45c112ae88196ea8da9c5a9efb0e167196744d2;hp=34b2c2921f0478d0f3156e1fe8cd3d3e3f5b96dd;hpb=412024ed31a4ab4eaea7a4165a434f8efebee325;p=senf.git diff --git a/Packets/VectorParser.hh b/Packets/VectorParser.hh index 34b2c29..db9e0de 100644 --- a/Packets/VectorParser.hh +++ b/Packets/VectorParser.hh @@ -54,7 +54,16 @@ namespace senf { VectorParser makes use of a policy template argument, \a AuxPolicy, to customize the way the containers size is obtained. You will normally not instantiate VectorParser directly, you will use the \ref SENF_PARSER_VECTOR() helper macro. + + Some basic vector access methods are defined as parser members. To access the complete list + API however you will need to instantiate a container wrapper for the vector. See \ref + packet_usage_fields_collection. + \see + \ref How to access \ref packet_usage_fields_collection \n + SENF_PARSER_VECTOR() macro used to define vector fields \n + VectorParser_Container vector container wrapper API + \ingroup parsecollection */ template @@ -129,7 +138,7 @@ namespace senf { */ template class VectorParser_Container - : private AuxPolicy + : private AuxPolicy::WrapperPolicy { public: /////////////////////////////////////////////////////////////////////////// @@ -246,6 +255,9 @@ namespace senf { + + @@ -266,12 +278,18 @@ namespace senf { The tags are applied to the \a size parameter: \code SENF_PARSER_VECTOR ( vec, transform(MyTransform, vec_size_), senf::UInt32Parser ); + SENF_PARSER_VECTOR ( vec, packetSize(), senf::UInt32Parser ); \endcode \param[in] name field name \param[in] size name of field giving the vector size \param[in] elt_type vector element type + \see + How to use \ref packet_usage_fields_collection \n + senf::VectorParser the vector parser API for vector field access + senf::VectorParser_Container the vector parser container API for vector field access + \hideinitializer \ingroup packetparsermacros */
\c bytes(\a size)\a size gives the size of the vector in bytes not the number of contained elements
\c packetSize()Use the size of the packet to get the vector size. The + vector will occupy all space up to the end of the packet.
\c transform(\a transform, \a size)The \a transform is applied to the \a size value, the value is not used directly