CompositeTraceResolver::Add -> CompositeTraceResolver::AddSource
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Sun, 12 Aug 2007 22:31:16 +0200
changeset 1355 6289ac826830
parent 1354 256446080d34
child 1356 5b10d248d66a
CompositeTraceResolver::Add -> CompositeTraceResolver::AddSource
src/core/composite-trace-resolver.cc
src/core/composite-trace-resolver.h
src/core/object.cc
src/devices/csma-cd/csma-cd-net-device.cc
src/devices/point-to-point/point-to-point-net-device.cc
src/internet-node/ipv4-l3-protocol.cc
src/mobility/mobility-model-notifier.cc
src/node/queue.cc
--- a/src/core/composite-trace-resolver.cc	Sun Aug 12 22:24:45 2007 +0200
+++ b/src/core/composite-trace-resolver.cc	Sun Aug 12 22:31:16 2007 +0200
@@ -64,7 +64,7 @@
 }
 
 void 
-CompositeTraceResolver::Add (std::string name,
+CompositeTraceResolver::AddSource (std::string name,
                              TraceSource &trace)
 {
   DoAddSource (name, trace, TraceContext ());
@@ -351,8 +351,8 @@
 CompositeTraceResolverTest::CreateSubResolver (void)
 {
   Ptr<CompositeTraceResolver> subresolver = Create<CompositeTraceResolver> ();
-  subresolver->Add ("trace-int", m_traceInt, 
-                    SubTraceSourceTest (SubTraceSourceTest::INT));
+  subresolver->AddSource ("trace-int", m_traceInt, 
+                          SubTraceSourceTest (SubTraceSourceTest::INT));
   return subresolver;
 }
 bool 
@@ -366,10 +366,10 @@
 
   CompositeTraceResolver resolver;
 
-  resolver.Add ("trace-double-a", traceDoubleA, 
-                TraceSourceTest (TraceSourceTest::DOUBLEA));
-  resolver.Add ("trace-double-b", traceDoubleB, 
-                TraceSourceTest (TraceSourceTest::DOUBLEB));
+  resolver.AddSource ("trace-double-a", traceDoubleA, 
+                      TraceSourceTest (TraceSourceTest::DOUBLEA));
+  resolver.AddSource ("trace-double-b", traceDoubleB, 
+                      TraceSourceTest (TraceSourceTest::DOUBLEB));
 
   resolver.Connect ("/*", MakeCallback (&CompositeTraceResolverTest::TraceDouble, this), TraceContext ());
 
@@ -461,7 +461,7 @@
     }
 
   resolver.Add ("subresolver", 
-		MakeCallback (&CompositeTraceResolverTest::CreateSubResolver, this));
+                MakeCallback (&CompositeTraceResolverTest::CreateSubResolver, this));
 
   resolver.Connect ("/subresolver/trace-int", 
 		    MakeCallback (&CompositeTraceResolverTest::TraceInt, this), TraceContext ());
@@ -501,7 +501,7 @@
 
   SVTraceSource<uint16_t> source;
 
-  resolver.Add ("uint16_t", source, TraceSourceTest (TraceSourceTest::UINT16_T));
+  resolver.AddSource ("uint16_t", source, TraceSourceTest (TraceSourceTest::UINT16_T));
   
 
   return ok;
--- a/src/core/composite-trace-resolver.h	Sun Aug 12 22:24:45 2007 +0200
+++ b/src/core/composite-trace-resolver.h	Sun Aug 12 22:31:16 2007 +0200
@@ -53,8 +53,8 @@
    * be automatically extended to contain the input context.
    */
   template <typename T>
-  void Add (std::string name,
-            TraceSource &trace, T const &context);
+  void AddSource (std::string name,
+                  TraceSource &trace, T const &context);
   /**
    * \param name name of trace source
    * \param trace a callback trace source
@@ -63,8 +63,8 @@
    * source will match the name specified during namespace 
    * resolution.
    */
-  void Add (std::string name,
-            TraceSource &trace);
+  void AddSource (std::string name,
+                  TraceSource &trace);
   /**
    * \param name name of child trace resolver
    * \param createResolver a trace resolver constructor
@@ -140,9 +140,9 @@
 
 template <typename T>
 void 
-CompositeTraceResolver::Add (std::string name,
-                             TraceSource &trace, 
-                             T const &context)
+CompositeTraceResolver::AddSource (std::string name,
+                                   TraceSource &trace, 
+                                   T const &context)
 {
   TraceContext ctx;
   ctx.Add (context);
--- a/src/core/object.cc	Sun Aug 12 22:24:45 2007 +0200
+++ b/src/core/object.cc	Sun Aug 12 22:31:16 2007 +0200
@@ -310,7 +310,7 @@
   {
     ns3::Ptr<ns3::CompositeTraceResolver> resolver = 
       ns3::Create<ns3::CompositeTraceResolver> ();
-    resolver->Add ("basea-x", m_source);
+    resolver->AddSource ("basea-x", m_source);
     resolver->SetParent (Object::GetTraceResolver ());
     return resolver;
   }
@@ -334,7 +334,7 @@
   {
     ns3::Ptr<ns3::CompositeTraceResolver> resolver = 
       ns3::Create<ns3::CompositeTraceResolver> ();
-    resolver->Add ("deriveda-x", m_sourceDerived);
+    resolver->AddSource ("deriveda-x", m_sourceDerived);
     resolver->SetParent (BaseA::GetTraceResolver ());
     return resolver;
   }
@@ -361,7 +361,7 @@
   {
     ns3::Ptr<ns3::CompositeTraceResolver> resolver = 
       ns3::Create<ns3::CompositeTraceResolver> ();
-    resolver->Add ("baseb-x", m_source);
+    resolver->AddSource ("baseb-x", m_source);
     resolver->SetParent (Object::GetTraceResolver ());
     return resolver;
   }
@@ -385,7 +385,7 @@
   {
     ns3::Ptr<ns3::CompositeTraceResolver> resolver = 
       ns3::Create<ns3::CompositeTraceResolver> ();
-    resolver->Add ("derivedb-x", m_sourceDerived);
+    resolver->AddSource ("derivedb-x", m_sourceDerived);
     resolver->SetParent (BaseB::GetTraceResolver ());
     return resolver;
   }
--- a/src/devices/csma-cd/csma-cd-net-device.cc	Sun Aug 12 22:24:45 2007 +0200
+++ b/src/devices/csma-cd/csma-cd-net-device.cc	Sun Aug 12 22:31:16 2007 +0200
@@ -454,12 +454,12 @@
 {
   Ptr<CompositeTraceResolver> resolver = Create<CompositeTraceResolver> ();
   resolver->AddChild ("queue", m_queue);
-  resolver->Add ("rx",
-                 m_rxTrace,
-                 CsmaCdTraceType (CsmaCdTraceType::RX));
-  resolver->Add ("drop",
-                 m_dropTrace,
-                 CsmaCdTraceType (CsmaCdTraceType::DROP));
+  resolver->AddSource ("rx",
+                       m_rxTrace,
+                       CsmaCdTraceType (CsmaCdTraceType::RX));
+  resolver->AddSource ("drop",
+                       m_dropTrace,
+                       CsmaCdTraceType (CsmaCdTraceType::DROP));
   resolver->SetParent (NetDevice::GetTraceResolver ());
   return resolver;
 }
--- a/src/devices/point-to-point/point-to-point-net-device.cc	Sun Aug 12 22:24:45 2007 +0200
+++ b/src/devices/point-to-point/point-to-point-net-device.cc	Sun Aug 12 22:31:16 2007 +0200
@@ -193,9 +193,9 @@
 {
   Ptr<CompositeTraceResolver> resolver = Create<CompositeTraceResolver> ();
   resolver->AddChild ("queue", m_queue);
-  resolver->Add ("rx",
-                 m_rxTrace,
-                 PointToPointTraceType ());
+  resolver->AddSource ("rx",
+                       m_rxTrace,
+                       PointToPointTraceType ());
   resolver->SetParent (NetDevice::GetTraceResolver ());
   return resolver;
 }
--- a/src/internet-node/ipv4-l3-protocol.cc	Sun Aug 12 22:24:45 2007 +0200
+++ b/src/internet-node/ipv4-l3-protocol.cc	Sun Aug 12 22:31:16 2007 +0200
@@ -152,9 +152,9 @@
 Ipv4L3Protocol::GetTraceResolver (void)
 {
   Ptr<CompositeTraceResolver> resolver = Create<CompositeTraceResolver> ();
-  resolver->Add ("tx", m_txTrace, Ipv4L3ProtocolTraceContextElement(Ipv4L3ProtocolTraceContextElement::TX));
-  resolver->Add ("rx", m_rxTrace, Ipv4L3ProtocolTraceContextElement(Ipv4L3ProtocolTraceContextElement::RX));
-  resolver->Add ("drop", m_dropTrace, Ipv4L3ProtocolTraceContextElement (Ipv4L3ProtocolTraceContextElement::DROP));
+  resolver->AddSource ("tx", m_txTrace, Ipv4L3ProtocolTraceContextElement(Ipv4L3ProtocolTraceContextElement::TX));
+  resolver->AddSource ("rx", m_rxTrace, Ipv4L3ProtocolTraceContextElement(Ipv4L3ProtocolTraceContextElement::RX));
+  resolver->AddSource ("drop", m_dropTrace, Ipv4L3ProtocolTraceContextElement (Ipv4L3ProtocolTraceContextElement::DROP));
   resolver->AddArray ("interfaces", 
                       m_interfaces.begin (), m_interfaces.end (), 
                       Ipv4L3ProtocolInterfaceIndex ());
--- a/src/mobility/mobility-model-notifier.cc	Sun Aug 12 22:24:45 2007 +0200
+++ b/src/mobility/mobility-model-notifier.cc	Sun Aug 12 22:31:16 2007 +0200
@@ -44,7 +44,7 @@
 {
   Ptr<CompositeTraceResolver> resolver = 
     Create<CompositeTraceResolver> ();
-  resolver->Add ("course-change", m_trace);
+  resolver->AddSource ("course-change", m_trace);
   return resolver;
 }
 
--- a/src/node/queue.cc	Sun Aug 12 22:24:45 2007 +0200
+++ b/src/node/queue.cc	Sun Aug 12 22:31:16 2007 +0200
@@ -98,9 +98,9 @@
 Queue::GetTraceResolver (void)
 {
   Ptr<CompositeTraceResolver> resolver = Create<CompositeTraceResolver> ();
-  resolver->Add ("enqueue", m_traceEnqueue, QueueTraceType (QueueTraceType::ENQUEUE));
-  resolver->Add ("dequeue", m_traceDequeue, QueueTraceType (QueueTraceType::DEQUEUE));
-  resolver->Add ("drop", m_traceDrop, QueueTraceType (QueueTraceType::DROP));
+  resolver->AddSource ("enqueue", m_traceEnqueue, QueueTraceType (QueueTraceType::ENQUEUE));
+  resolver->AddSource ("dequeue", m_traceDequeue, QueueTraceType (QueueTraceType::DEQUEUE));
+  resolver->AddSource ("drop", m_traceDrop, QueueTraceType (QueueTraceType::DROP));
   resolver->SetParent (Object::GetTraceResolver ());
   return resolver;
 }