need to use ns3:: prefix for TypeId names now.
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Sat, 15 Mar 2008 19:29:22 +0100
changeset 2613 0e1267814e1c
parent 2612 42f60d73da03
child 2614 5efb372326be
need to use ns3:: prefix for TypeId names now.
examples/mixed-global-routing.cc
examples/simple-alternate-routing.cc
examples/simple-error-model.cc
examples/simple-global-routing.cc
examples/simple-point-to-point-olsr.cc
examples/simple-point-to-point.cc
samples/main-random-topology.cc
src/core/attribute-test.cc
src/core/object.cc
src/internet-node/pcap-trace.cc
--- a/examples/mixed-global-routing.cc	Sat Mar 15 16:26:39 2008 +0000
+++ b/examples/mixed-global-routing.cc	Sat Mar 15 19:29:22 2008 +0100
@@ -105,8 +105,8 @@
   // Set up some default values for the simulation.  Use the Bind ()
 
 
-  Config::SetDefault ("OnOffApplication::PacketSize", Uinteger (210));
-  Config::SetDefault ("OnOffApplication::DataRate", DataRate ("448kb/s"));
+  Config::SetDefault ("ns3::OnOffApplication::PacketSize", Uinteger (210));
+  Config::SetDefault ("ns3::OnOffApplication::DataRate", DataRate ("448kb/s"));
 
   // Allow the user to override any of the defaults and the above
   // Bind ()s at run-time, via command-line arguments
--- a/examples/simple-alternate-routing.cc	Sat Mar 15 16:26:39 2008 +0000
+++ b/examples/simple-alternate-routing.cc	Sat Mar 15 19:29:22 2008 +0100
@@ -103,8 +103,8 @@
   // Queue to use, and what the queue limit is
 
 
-  Config::SetDefault ("OnOffApplication::PacketSize", Uinteger (210));
-  Config::SetDefault ("OnOffApplication::DataRate", DataRate ("300b/s"));
+  Config::SetDefault ("ns3::OnOffApplication::PacketSize", Uinteger (210));
+  Config::SetDefault ("ns3::OnOffApplication::DataRate", DataRate ("300b/s"));
 
   // The below metric, if set to 3 or higher, will cause packets between
   // n1 and n3 to take the 2-hop route through n2
--- a/examples/simple-error-model.cc	Sat Mar 15 16:26:39 2008 +0000
+++ b/examples/simple-error-model.cc	Sat Mar 15 19:29:22 2008 +0100
@@ -81,11 +81,11 @@
 #endif
 
   // Set a few parameters
-  Config::SetDefault ("RateErrorModel::ErrorRate", Double (0.01));
-  Config::SetDefault ("RateErrorModel::ErrorUnit", String ("EU_PKT"));
+  Config::SetDefault ("ns3::RateErrorModel::ErrorRate", Double (0.01));
+  Config::SetDefault ("ns3::RateErrorModel::ErrorUnit", String ("EU_PKT"));
   
-  Config::SetDefault ("OnOffApplication::PacketSize", Uinteger (210));
-  Config::SetDefault ("OnOffApplication::DataRate", DataRate ("448kb/s"));
+  Config::SetDefault ("ns3::OnOffApplication::PacketSize", Uinteger (210));
+  Config::SetDefault ("ns3::OnOffApplication::DataRate", DataRate ("448kb/s"));
 
 
   // Allow the user to override any of the defaults and the above
--- a/examples/simple-global-routing.cc	Sat Mar 15 16:26:39 2008 +0000
+++ b/examples/simple-global-routing.cc	Sat Mar 15 19:29:22 2008 +0100
@@ -105,8 +105,8 @@
 #endif
   // Set up some default values for the simulation.  Use the 
 
-  Config::SetDefault ("OnOffApplication::PacketSize", Uinteger (210));
-  Config::SetDefault ("OnOffApplication::DataRate", DataRate ("448kb/s"));
+  Config::SetDefault ("ns3::OnOffApplication::PacketSize", Uinteger (210));
+  Config::SetDefault ("ns3::OnOffApplication::DataRate", DataRate ("448kb/s"));
 
   //DefaultValue::Bind ("DropTailQueue::m_maxPackets", 30);   
 
--- a/examples/simple-point-to-point-olsr.cc	Sat Mar 15 16:26:39 2008 +0000
+++ b/examples/simple-point-to-point-olsr.cc	Sat Mar 15 19:29:22 2008 +0100
@@ -101,8 +101,8 @@
 
   // Set up some default values for the simulation.
 
-  Config::SetDefault ("OnOffApplication::PacketSize", String ("210"));
-  Config::SetDefault ("OnOffApplication::DataRate", String ("448kb/s"));
+  Config::SetDefault ("ns3::OnOffApplication::PacketSize", String ("210"));
+  Config::SetDefault ("ns3::OnOffApplication::DataRate", String ("448kb/s"));
 
   //DefaultValue::Bind ("DropTailQueue::m_maxPackets", 30);   
 
--- a/examples/simple-point-to-point.cc	Sat Mar 15 16:26:39 2008 +0000
+++ b/examples/simple-point-to-point.cc	Sat Mar 15 19:29:22 2008 +0100
@@ -78,8 +78,8 @@
 
   // Set up some default values for the simulation.
 
-  Config::SetDefault ("OnOffApplication::PacketSize", String ("210"));
-  Config::SetDefault ("OnOffApplication::DataRate", String ("448kb/s"));
+  Config::SetDefault ("ns3::OnOffApplication::PacketSize", String ("210"));
+  Config::SetDefault ("ns3::OnOffApplication::DataRate", String ("448kb/s"));
 
   // Allow the user to override any of the defaults and the above
   // Bind()s at run-time, via command-line arguments
--- a/samples/main-random-topology.cc	Sat Mar 15 16:26:39 2008 +0000
+++ b/samples/main-random-topology.cc	Sat Mar 15 19:29:22 2008 +0100
@@ -44,7 +44,7 @@
   mobility.SetMobilityModel ("ns3::StaticMobilityModel");
   mobility.Layout (objects.begin (), objects.end ());
 
-  Config::Connect ("/NodeList/*/$MobilityModelNotifier/CourseChange",
+  Config::Connect ("/NodeList/*/$ns3::MobilityModelNotifier/CourseChange",
                               MakeCallback (&CourseChange));
   
   Simulator::StopAt (Seconds (100.0));
--- a/src/core/attribute-test.cc	Sat Mar 15 16:26:39 2008 +0000
+++ b/src/core/attribute-test.cc	Sat Mar 15 19:29:22 2008 +0100
@@ -96,7 +96,7 @@
     TEST_C
   };
   static TypeId GetTypeId (void) {
-    static TypeId tid = TypeId ("AttributeObjectTest")
+    static TypeId tid = TypeId ("ns3::AttributeObjectTest")
       .SetParent<Object> ()
       .HideFromDocumentation ()
       .AddAttribute ("TestBoolName", "help text",
@@ -260,7 +260,7 @@
 
   AttributeList params;
   Ptr<AttributeObjectTest> p;
-  NS_TEST_ASSERT (params.SetFailSafe ("AttributeObjectTest::TestBoolName", String ("false")));
+  NS_TEST_ASSERT (params.SetFailSafe ("ns3::AttributeObjectTest::TestBoolName", String ("false")));
   p = CreateObject<AttributeObjectTest> (params);
   CHECK_GET_STR (p, "TestBoolName", "false");
   CHECK_GET_PARAM (p, "TestBoolName", Boolean, false);
@@ -428,12 +428,12 @@
     NS_TEST_ASSERT_EQUAL (vector.GetN (), 2);
   }
 
-  NS_TEST_ASSERT (AttributeList::GetGlobal ()->SetFailSafe ("AttributeObjectTest::TestBoolName", String ("true")));
+  NS_TEST_ASSERT (AttributeList::GetGlobal ()->SetFailSafe ("ns3::AttributeObjectTest::TestBoolName", String ("true")));
   p = CreateObject<AttributeObjectTest> ();
   Boolean boolV = p->GetAttribute ("TestBoolName");
   NS_TEST_ASSERT_EQUAL (boolV, Boolean (true));
 
-  NS_TEST_ASSERT (AttributeList::GetGlobal ()->SetFailSafe ("AttributeObjectTest::TestBoolName", String ("false")));
+  NS_TEST_ASSERT (AttributeList::GetGlobal ()->SetFailSafe ("ns3::AttributeObjectTest::TestBoolName", String ("false")));
   p = CreateObject<AttributeObjectTest> ();
   boolV = p->GetAttribute ("TestBoolName");
   NS_TEST_ASSERT_EQUAL (boolV, Boolean (false));
--- a/src/core/object.cc	Sat Mar 15 16:26:39 2008 +0000
+++ b/src/core/object.cc	Sat Mar 15 19:29:22 2008 +0100
@@ -427,7 +427,7 @@
 bool
 TypeId::LookupAttributeByFullName (std::string fullName, struct TypeId::AttributeInfo *info)
 {
-  std::string::size_type pos = fullName.find ("::");
+  std::string::size_type pos = fullName.rfind ("::");
   if (pos == std::string::npos)
     {
       return 0;
--- a/src/internet-node/pcap-trace.cc	Sat Mar 15 16:26:39 2008 +0000
+++ b/src/internet-node/pcap-trace.cc	Sat Mar 15 19:29:22 2008 +0100
@@ -52,9 +52,9 @@
 void 
 PcapTrace::TraceAllIp (void)
 {
-  Config::Connect ("/NodeList/*/$Ipv4L3Protocol/Tx",
+  Config::Connect ("/NodeList/*/$ns3::Ipv4L3Protocol/Tx",
                               MakeCallback (&PcapTrace::LogTxIp, this));
-  Config::Connect ("/NodeList/*/$Ipv4L3Protocol/Rx",
+  Config::Connect ("/NodeList/*/$ns3::Ipv4L3Protocol/Rx",
                               MakeCallback (&PcapTrace::LogRxIp, this));
 }