Rename PacketRegistry::RegistrationProxy to ScopedRegistrationProxy
g0dil [Mon, 9 Aug 2010 12:25:20 +0000 (12:25 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1667 270642c3-0616-0410-b53a-bc976706d245

senf/Packets/Packet.test.cc
senf/Packets/PacketRegistry.cti
senf/Packets/PacketRegistry.hh
senf/Packets/PacketRegistry.test.cc

index aeca47d..a8cba98 100644 (file)
@@ -106,8 +106,8 @@ namespace {
     typedef BarPacketType::packet BarPacket;
 
     namespace reg {
-        senf::PacketRegistry<RegTag>::RegistrationProxy<FooPacket> registerFoo(1u);
-        senf::PacketRegistry<RegTag>::RegistrationProxy<BarPacket> registerBar(2u);
+        senf::PacketRegistry<RegTag>::ScopedRegistrationProxy<FooPacket> registerFoo(1u);
+        senf::PacketRegistry<RegTag>::ScopedRegistrationProxy<BarPacket> registerBar(2u);
     }
 
     struct IntAnnotation {
index 89b4868..b70af2a 100644 (file)
 ///////////////////////////////PacketRegistry..p///////////////////////////////////////
 
 ///////////////////////////////////////////////////////////////////////////
-// senf::PacketRegistry<Tag>::RegistrationProxy<PacketType>
+// senf::PacketRegistry<Tag>::ScopedRegistrationProxy<PacketType>
 
 template <class Tag>
 template <class PacketType>
-prefix_ senf::PacketRegistry<Tag>::RegistrationProxy<PacketType>::
-RegistrationProxy(typename Tag::key_t key, int priority)
+prefix_ senf::PacketRegistry<Tag>::ScopedRegistrationProxy<PacketType>::
+ScopedRegistrationProxy(typename Tag::key_t key, int priority)
 {
     PacketRegistry<Tag>::template registerPacket<PacketType>(key,priority);
 }
 
 template <class Tag>
 template <class PacketType>
-prefix_ senf::PacketRegistry<Tag>::RegistrationProxy<PacketType>::~RegistrationProxy()
+prefix_ senf::PacketRegistry<Tag>::ScopedRegistrationProxy<PacketType>::~ScopedRegistrationProxy()
 {
     try {
         PacketRegistry<Tag>::template unregisterPacket<PacketType>();
index 497c143..a82e7b3 100644 (file)
@@ -97,7 +97,7 @@ namespace senf {
             directly, define a symbol in the following way:
             \code
             namespace {
-                senf::PacketRegistry<Tag>::RegistrationProxy<PacketType>
+                senf::PacketRegistry<Tag>::ScopedRegistrationProxy<PacketType>
                     registerPacketType (key, optional_priority);
             }
             \endcode
@@ -110,10 +110,10 @@ namespace senf {
             of \c registerPacketType ends.
          */
         template <class PacketType>
-        struct RegistrationProxy
+        struct ScopedRegistrationProxy
         {
-            RegistrationProxy(typename Tag::key_t key, int priority=0);
-            ~RegistrationProxy();
+            ScopedRegistrationProxy(typename Tag::key_t key, int priority=0);
+            ~ScopedRegistrationProxy();
         };
 
         /** \brief Register new packet type
@@ -233,7 +233,7 @@ namespace senf {
      */
 #   define SENF_PACKET_REGISTRY_REGISTER( registry, value, type )       \
         namespace {                                                     \
-            senf::PacketRegistry< registry >::RegistrationProxy< type > \
+            senf::PacketRegistry< registry >::ScopedRegistrationProxy< type > \
             BOOST_PP_CAT(packetRegistration_, __LINE__) ( value );      \
         }
 
@@ -247,7 +247,7 @@ namespace senf {
      */
 #   define SENF_PACKET_REGISTRY_REGISTER_PRIORITY( registry, value, priority, type ) \
         namespace {                                                     \
-            senf::PacketRegistry< registry >::RegistrationProxy< type > \
+            senf::PacketRegistry< registry >::ScopedRegistrationProxy< type > \
             BOOST_PP_CAT(packetRegistration_, __LINE__) ( value, priority ); \
         }
 
index 38e669c..8dd410d 100644 (file)
@@ -72,7 +72,7 @@ SENF_AUTO_UNIT_TEST(packetRegistry_test)
     {
         PacketRegistry<StringTag>::registerPacket<BarPacket>("bar");
         PacketRegistry<BaseTag>::registerPacket<FooPacket>(1u);
-        senf::PacketRegistry<BaseTag>::RegistrationProxy<BarPacket> registerBarInBase (2u);
+        senf::PacketRegistry<BaseTag>::ScopedRegistrationProxy<BarPacket> registerBarInBase (2u);
 
         BOOST_CHECK_EQUAL( PacketRegistry<BaseTag>::key<FooPacket>(), 1u );
         BOOST_CHECK_EQUAL( PacketRegistry<BaseTag>::key<BarPacket>(), 2u );