Packets/DefaultBundle: Fix packet parser documentation using #ifndef DOXYGEN guards
[senf.git] / Packets / DefaultBundle / UDPPacket.hh
index bc3ab1d..5ea93db 100644 (file)
 
 namespace senf {
 
-    ///\addtogroup protocolbundle_default
-    ///@{
+    /** \brief Parse a UDP packet
 
-    // See RFC768
+        Parser implementing the UDP header. The fields implemented are:
+
+        \see UDPPacketType
+            <a href="http://tools.ietf.org/html/rfc768">RFC 768</a>
+     */
     struct Parse_UDP : public PacketParserBase
     {
-        SENF_PACKET_PARSER_INIT(Parse_UDP);
+        typedef Parse_UInt16 Parse_16bit;
 
-        ///////////////////////////////////////////////////////////////////////////
+#       ifndef DOXYGEN
 
-        typedef Parse_UInt16 Parse_16bit;
+        SENF_PACKET_PARSER_INIT(Parse_UDP);
 
         SENF_PACKET_PARSER_DEFINE_FIXED_FIELDS(
             ((Field)( source,      Parse_16bit ))
             ((Field)( destination, Parse_16bit ))
             ((Field)( length,      Parse_16bit ))
             ((Field)( crc,         Parse_16bit )) );
+
+#       else
+
+        Parse_16bit source();
+        Parse_16bit destination();
+        Parse_16bit length();
+        Parse_16bit crc();
+
+#       endif
     };
 
+    /** \brief UDP packet
+        
+        \par Packet type (typedef):
+            \ref UDPPacket
+
+        \par Fields:
+            \ref Parse_UDP
+
+        \ingroup protocolbundle_default
+     */
     struct UDPPacketType
         : public PacketTypeBase,
           public PacketTypeMixin<UDPPacketType>
@@ -65,9 +87,8 @@ namespace senf {
         static void dump(packet p, std::ostream & os);
     };
 
+    /** \brief UDP packet typedef */
     typedef UDPPacketType::packet UDPPacket;
-
-    ///@}
 }