Link statically against boost_unit_test_framework library
[senf.git] / Packets / ParseArray.hh
index c4feca4..b7e40bd 100644 (file)
@@ -95,11 +95,26 @@ namespace senf {
         value_type operator[](difference_type i) const;
     };
 
+    /** \brief Define array field
+
+        This macro is a special helper to define a senf::Parse_Array type field, a fixed size
+        collection of fixed size elements.
+        
+        \param[in] name field name
+        \param[in] elt_type array element type
+        \param[in] size constant number of elements
+        \hideinitializer
+        \ingroup packetparsermacros
+     */
+#   define SENF_PARSER_ARRAY(name, elt_type, size)                                                \
+        typedef senf::Parse_Array<size,elt_type> BOOST_PP_CAT(name, _array_t);                    \
+        SENF_PARSER_FIELD( name, BOOST_PP_CAT(name, _array_t) )
+
 }
 
 ///////////////////////////////hh.e////////////////////////////////////////
 #endif
-#if !defined(SENF_PACKETS_DECL_ONLY) && !defined(HH_ParseArray_i_)
+#if !defined(HH_Packets__decls_) && !defined(HH_ParseArray_i_)
 #define HH_ParseArray_i_
 //#include "ParseArray.cci"
 #include "ParseArray.ct"