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);
struct RegistrationProxy
{
RegistrationProxy(typename Tag::key_t key);
+ ~RegistrationProxy();
};
/** \brief Register new packet type
template <class PacketType>
static void registerPacket(typename Tag::key_t key);
+ template <class PacketType>
+ static void unregisterPacket();
+ static void unregisterPacket(typename Tag::key_t key);
+
/** \brief Find key of a packet type
Return the key of \a PacketType as registered in the \a Tag registry
// compile-command: "scons -u test"
// comment-column: 40
// End:
-