/** \file
\brief ListParser public header */
-#ifndef HH_ListParser_
-#define HH_ListParser_ 1
+#ifndef HH_SENF_Packets_ListParser_
+#define HH_SENF_Packets_ListParser_ 1
// Custom includes
#include <boost/utility.hpp>
// The size field should be declared private or read-only (size is accessible via the list)
SENF_PARSER_PRIVATE_FIELD ( list_size_, senf::UInt16Parser );
// Define the list
- SENF_PARSER_VECTOR ( list, list_size_, EltParser );
+ SENF_PARSER_LIST ( list, list_size_, EltParser );
\endcode
Here \c EltParser can be an arbitrary parser and need not have a fixed size.
+ \warning Realize, that the \a size field is controlled by the list parser. This field
+ should therefore be declared either read-only or private and must be changed only via
+ the list parser.
+
Further additional tags are supported which modify the type of list created:
<table class="senf fixedcolumn">
The tags are applied to the \a size parameter:
\code
- SENF_PARSER_LIST ( vec, transform(MyTransform, list_size_), EltParser );
+ SENF_PARSER_LIST ( list, transform(MyTransform, list_size_), EltParser );
\endcode
\warning There are some caveats when working with \c bytes() type lists:
///////////////////////////////hh.e////////////////////////////////////////
#endif
-#if !defined(HH_Packets__decls_) && !defined(HH_ListParser_i_)
-#define HH_ListParser_i_
+#if !defined(HH_SENF_Packets_Packets__decls_) && !defined(HH_SENF_Packets_ListParser_i_)
+#define HH_SENF_Packets_ListParser_i_
//#include "ListParser.cci"
#include "ListParser.ct"
#include "ListParser.cti"