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 <class ElementParser, class AuxPolicy>
*/
template <class ElementParser, class AuxPolicy>
class VectorParser_Container
- : private AuxPolicy
+ : private AuxPolicy::WrapperPolicy
{
public:
///////////////////////////////////////////////////////////////////////////
<table class="senf fixedcolumn">
<tr><td>\c bytes(\a size)</td><td>\a size gives the size of the vector in bytes not the
number of contained elements</td></tr>
+
+ <tr><td>\c packetSize()</td><td>Use the size of the packet to get the vector size. The
+ vector will occupy all space up to the end of the packet.</td></tr>
<tr><td>\c transform(\a transform, \a size)</td><td>The \a transform is applied to the \a
size value, the value is not used directly</td>
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
*/