NEW FILE HEADER / COPYRIGHT FORMAT
[senf.git] / Packets / PacketType.cti
index aa610d8..5d1ec9d 100644 (file)
@@ -1,6 +1,8 @@
+// $Id$
+//
 // Copyright (C) 2007 
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
+// Fraunhofer Institute for Open Communication Systems (FOKUS) 
+// Competence Center NETwork research (NET), St. Augustin, GERMANY 
 //     Stefan Bund <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
@@ -73,6 +75,13 @@ prefix_ void senf::PacketTypeMixin<Self,Registry>::init(Packet p)
     p.as< ConcretePacket<Self> >()->init();
 }
 
+template <class Self, class Registry>
+prefix_ typename senf::PacketTypeMixin<Self,Registry>::optional_registry_key_t
+senf::PacketTypeMixin<Self,Registry>::key(Packet p)
+{
+    return p ? PacketRegistry<Registry>::key(p, nothrow) : optional_registry_key_t();
+}
+
 ///////////////////////////////////////////////////////////////////////////
 // senf::PacketTypeMixin<Self,void>
 
@@ -115,4 +124,6 @@ prefix_ void senf::PacketTypeMixin<Self,void>::init(Packet p)
 // c-file-style: "senf"
 // indent-tabs-mode: nil
 // ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
 // End: