X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FPacketRegistry.hh;h=882f69359d55d35d063f4c90900e67c5de0e1cc6;hb=33adfa86c0b25cb6eeda0fa12d47e077e488375a;hp=2311f3eba1c2434ee36055d4e7621fb270b0ffcc;hpb=601d1f509f5bb24df167a4dd5a20da67a0af9af8;p=senf.git diff --git a/senf/Packets/PacketRegistry.hh b/senf/Packets/PacketRegistry.hh index 2311f3e..882f693 100644 --- a/senf/Packets/PacketRegistry.hh +++ b/senf/Packets/PacketRegistry.hh @@ -31,7 +31,7 @@ #include // for boost::noncopyable #include #include -#include "../Utils/Exception.hh" +#include #include "Packet.hh" #include "PacketRegistry.ih" @@ -78,6 +78,11 @@ namespace senf { static registration only works when the symbol is included into the final binary. To force this inclusion, you should not put packet registrations into a library but into an object file. + + To simplify static registration the SENF_PACKET_REGISTRY_REGISTER macro can be used: + \code + SENF_PACKET_REGISTRY_REGISTER(SomeTag, SomePacket, key_of_somePacket); + \endcode \ingroup packet_module */ @@ -196,6 +201,7 @@ namespace senf { This macro will declare an anonymous global variable in such a way, that constructing this variable will add a registration to the given packet registry. + \ingroup packet_module \hideinitializer */ # define SENF_PACKET_REGISTRY_REGISTER( registry, value, type ) \ @@ -216,7 +222,7 @@ namespace senf { This exception is signaled whenever a throwing lookup operation fails. */ struct PacketTypeNotRegisteredException : public senf::Exception - { PacketTypeNotRegisteredException() : senf::Exception("packet type not registered"){} }; + { PacketTypeNotRegisteredException() : senf::Exception("packet type not registered") {} }; } @@ -229,7 +235,7 @@ namespace senf { #include "PacketRegistry.cti" #endif - + // Local Variables: // mode: c++ // fill-column: 100