Statically register a packet type in a PacketRegistry. More...
#include <senf/Packets/PacketRegistry.hh>
Public Member Functions | |
ScopedRegistrationProxy (typename Tag::key_t key, int priority=0) | |
~ScopedRegistrationProxy () | |
Statically register a packet type in a PacketRegistry.
This class is normally used via SENF_PACKET_REGISTRY_REGISTER. To use this class directly, define a symbol in the following way:
Here Tag is the type tag of the registry to register the packet in, PacketType is the packet to register (this is the ConcretePacket of that packet) and key is the key of type Tag::key_t
under which the packet is to be registered. registerPacketType is an arbitrary name for the global symbol.
The packet will be registered in the constructor and will be unregistered when the scope of registerPacketType
ends.
Definition at line 104 of file PacketRegistry.hh.
senf::PacketRegistry< Tag >::ScopedRegistrationProxy< PacketType >::ScopedRegistrationProxy | ( | typename Tag::key_t | key, |
int | priority = 0 |
||
) |
senf::PacketRegistry< Tag >::ScopedRegistrationProxy< PacketType >::~ScopedRegistrationProxy | ( | ) |