18 #include "ns3/names.h"    54       .SetGroupName (
"Core")
    55       .HideFromDocumentation ()
    79       .SetGroupName (
"Core")
    80       .HideFromDocumentation ()
   110   virtual void DoRun (
void);
   115   : 
TestCase (
"Check low level Names::Add and Names::FindName functionality")
   139   Names::Add (objectOne, 
"Child", childOfObjectOne);
   142   Names::Add (objectTwo, 
"Child", childOfObjectTwo);
   148   NS_TEST_ASSERT_MSG_EQ (found, 
"Name Two", 
"Could not Names::Add and Names::FindName a second Object");
   175   virtual void DoRun (
void);
   180   : 
TestCase (
"Check string context Names::Add and Names::FindName functionality")
   205   Names::Add (
"/Names/Name One", 
"Child", childOfObjectOne);
   208   Names::Add (
"/Names/Name Two", 
"Child", childOfObjectTwo);
   214   NS_TEST_ASSERT_MSG_EQ (found, 
"Name Two", 
"Could not Names::Add and Names::FindName a second Object");
   240   virtual void DoRun (
void);
   245   : 
TestCase (
"Check fully qualified path Names::Add and Names::FindName functionality")
   270   Names::Add (
"/Names/Name One/Child", childOfObjectOne);
   273   Names::Add (
"/Names/Name Two/Child", childOfObjectTwo);
   279   NS_TEST_ASSERT_MSG_EQ (found, 
"Name Two", 
"Could not Names::Add and Names::FindName a second Object");
   309   virtual void DoRun (
void);
   314   : 
TestCase (
"Check relative path Names::Add and Names::FindName functionality")
   339   Names::Add (
"Name One/Child", childOfObjectOne);
   342   Names::Add (
"Name Two/Child", childOfObjectTwo);
   348   NS_TEST_ASSERT_MSG_EQ (found, 
"Name Two", 
"Could not Names::Add and Names::FindName a second Object");
   375   virtual void DoRun (
void);
   380   : 
TestCase (
"Check low level Names::Rename functionality")
   401   Names::Add (objectOne, 
"Child", childOfObjectOne);
   437   virtual void DoRun (
void);
   442   : 
TestCase (
"Check string context-based Names::Rename functionality")
   463   Names::Add (
"/Names/Name", 
"Child", childOfObjectOne);
   499   virtual void DoRun (
void);
   504   : 
TestCase (
"Check fully qualified path Names::Rename functionality")
   525   Names::Add (
"/Names/Name/Child", childOfObjectOne);
   561   virtual void DoRun (
void);
   566   : 
TestCase (
"Check relative path Names::Rename functionality")
   623   virtual void DoRun (
void);
   628   : 
TestCase (
"Check Names::FindPath functionality")
   649   Names::Add (
"/Names/Name/Child", childOfObjectOne);
   655   NS_TEST_ASSERT_MSG_EQ (found, 
"/Names/Name/Child", 
"Could not Names::Add and Names::FindPath a child Object");
   678   virtual void DoRun (
void);
   683   : 
TestCase (
"Check low level Names::Find functionality")
   707   Names::Add (
"Name One/Child", childOfObjectOne);
   710   Names::Add (
"Name Two/Child", childOfObjectTwo);
   712   found = Names::Find<TestObject> (
Ptr<Object> (0, 
false), 
"Name One");
   713   NS_TEST_ASSERT_MSG_EQ (found, objectOne, 
"Could not find a previously named Object via object context");
   715   found = Names::Find<TestObject> (
Ptr<Object> (0, 
false), 
"Name Two");
   716   NS_TEST_ASSERT_MSG_EQ (found, objectTwo, 
"Could not find a previously named Object via object context");
   718   found = Names::Find<TestObject> (objectOne, 
"Child");
   719   NS_TEST_ASSERT_MSG_EQ (found, childOfObjectOne, 
"Could not find a previously named child Object via object context");
   721   found = Names::Find<TestObject> (objectTwo, 
"Child");
   722   NS_TEST_ASSERT_MSG_EQ (found, childOfObjectTwo, 
"Could not find a previously named child Object via object context");
   742   virtual void DoRun (
void);
   747   : 
TestCase (
"Check string context-based Names::Find functionality")
   771   Names::Add (
"Name One/Child", childOfObjectOne);
   774   Names::Add (
"Name Two/Child", childOfObjectTwo);
   776   found = Names::Find<TestObject> (
"/Names", 
"Name One");
   777   NS_TEST_ASSERT_MSG_EQ (found, objectOne, 
"Could not find a previously named Object via string context");
   779   found = Names::Find<TestObject> (
"/Names", 
"Name Two");
   780   NS_TEST_ASSERT_MSG_EQ (found, objectTwo, 
"Could not find a previously named Object via stribng context");
   782   found = Names::Find<TestObject> (
"/Names/Name One", 
"Child");
   783   NS_TEST_ASSERT_MSG_EQ (found, childOfObjectOne, 
"Could not find a previously named child Object via string context");
   785   found = Names::Find<TestObject> (
"/Names/Name Two", 
"Child");
   786   NS_TEST_ASSERT_MSG_EQ (found, childOfObjectTwo, 
"Could not find a previously named child Object via string context");
   806   virtual void DoRun (
void);
   811   : 
TestCase (
"Check fully qualified path Names::Find functionality")
   835   Names::Add (
"/Names/Name One/Child", childOfObjectOne);
   838   Names::Add (
"/Names/Name Two/Child", childOfObjectTwo);
   840   found = Names::Find<TestObject> (
"/Names/Name One");
   841   NS_TEST_ASSERT_MSG_EQ (found, objectOne, 
"Could not find a previously named Object via string context");
   843   found = Names::Find<TestObject> (
"/Names/Name Two");
   844   NS_TEST_ASSERT_MSG_EQ (found, objectTwo, 
"Could not find a previously named Object via stribng context");
   846   found = Names::Find<TestObject> (
"/Names/Name One/Child");
   847   NS_TEST_ASSERT_MSG_EQ (found, childOfObjectOne, 
"Could not find a previously named child Object via string context");
   849   found = Names::Find<TestObject> (
"/Names/Name Two/Child");
   850   NS_TEST_ASSERT_MSG_EQ (found, childOfObjectTwo, 
"Could not find a previously named child Object via string context");
   870   virtual void DoRun (
void);
   875   : 
TestCase (
"Check relative path Names::Find functionality")
   899   Names::Add (
"Name One/Child", childOfObjectOne);
   902   Names::Add (
"Name Two/Child", childOfObjectTwo);
   904   found = Names::Find<TestObject> (
"Name One");
   905   NS_TEST_ASSERT_MSG_EQ (found, objectOne, 
"Could not find a previously named Object via string context");
   907   found = Names::Find<TestObject> (
"Name Two");
   908   NS_TEST_ASSERT_MSG_EQ (found, objectTwo, 
"Could not find a previously named Object via stribng context");
   910   found = Names::Find<TestObject> (
"Name One/Child");
   911   NS_TEST_ASSERT_MSG_EQ (found, childOfObjectOne, 
"Could not find a previously named child Object via string context");
   913   found = Names::Find<TestObject> (
"Name Two/Child");
   914   NS_TEST_ASSERT_MSG_EQ (found, childOfObjectTwo, 
"Could not find a previously named child Object via string context");
   931   virtual void DoRun (
void);
   936   : 
TestCase (
"Check GetObject operation in Names::Find")
   955   Names::Add (
"Alternate Test Object", alternateTestObject);
   960   foundTestObject = Names::Find<TestObject> (
"Test Object");
   962                          "Could not find a previously named TestObject via GetObject");
   964   foundAlternateTestObject = Names::Find<AlternateTestObject> (
"Alternate Test Object");
   966                          "Could not find a previously named AlternateTestObject via GetObject");
   969   foundAlternateTestObject = Names::Find<AlternateTestObject> (
"Test Object");
   971                          "Unexpectedly able to GetObject<AlternateTestObject> on a TestObject");
   973   foundTestObject = Names::Find<TestObject> (
"Alternate Test Object");
   975                          "Unexpectedly able to GetObject<TestObject> on an AlternateTestObject");
 virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase. 
Test the Object Name Service can correctly use a string context. 
Test the Object Name Service can find Objects. 
Smart pointer class similar to boost::intrusive_ptr. 
Test the Object Name Service can rename objects using a string context. 
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase. 
StringContextRenameTestCase()
Constructor. 
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase. 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
virtual ~StringContextFindTestCase()
Destructor. 
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase. 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
virtual ~RelativeAddTestCase()
Destructor. 
virtual ~BasicAddTestCase()
Destructor. 
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase. 
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase. 
Test the Object Name Service can correctly use a fully qualified path to add associations. 
Alternate test object for the Name service. 
BasicFindTestCase()
Constructor. 
static TypeId GetTypeId(void)
Register this type. 
Test the Object Name Service can look up an object and return its fully qualified path name...
Test the Object Name Service can rename objects. 
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase. 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase. 
static TypeId GetTypeId(void)
Register this type. 
NamesTestSuite()
Constructor. 
RelativeRenameTestCase()
Constructor. 
virtual ~FullyQualifiedAddTestCase()
Destructor. 
virtual ~BasicRenameTestCase()
Destructor. 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
virtual ~StringContextRenameTestCase()
Destructor. 
Test the Object Name Service can find Objects using a second type. 
static void Add(std::string name, Ptr< Object > object)
Add the association between the string "name" and the Ptr<Object> obj. 
virtual ~AlternateFindTestCase()
Destructor. 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
AlternateTestObject()
Constructor. 
Test the Object Name Service can correctly use a relative path to add associations. 
static void Clear(void)
Clear the list of objects associated with names. 
AlternateFindTestCase()
Constructor. 
Test the Object Name Service can do its most basic job. 
Test the Object Name Service can rename objects using a relative path name. 
Simple test object to exercise the Name service. 
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite. 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
FullyQualifiedFindTestCase()
Constructor. 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not. 
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase. 
virtual ~FullyQualifiedRenameTestCase()
Destructor. 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
virtual ~RelativeFindTestCase()
Destructor. 
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase. 
static NamesTestSuite g_namesTestSuite
NamesTestSuite instance variable. 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
FindPathTestCase()
Constructor. 
FullyQualifiedRenameTestCase()
Constructor. 
BasicAddTestCase()
Constructor. 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
static void Rename(std::string oldpath, std::string newname)
Rename a previously associated name. 
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase. 
static std::string FindPath(Ptr< Object > object)
Given a pointer to an object, look to see if that object has a name associated with it and return the...
virtual void DoRun(void)
Implementation to actually run this TestCase. 
RelativeAddTestCase()
Constructor. 
virtual ~RelativeRenameTestCase()
Destructor. 
virtual ~BasicFindTestCase()
Destructor. 
Test the Object Name Service can rename objects using a fully qualified path name. 
Test the Object Name Service can find Objects using a fully qualified path name. 
virtual ~FindPathTestCase()
Destructor. 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
virtual ~FullyQualifiedFindTestCase()
Destructor. 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
static std::string FindName(Ptr< Object > object)
Given a pointer to an object, look to see if that object has a name associated with it and...
Test the Object Name Service can find Objects using a string context. 
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase. 
A base class which provides memory management and object aggregation. 
Test the Object Name Service can find Objects using a relative path name. 
BasicRenameTestCase()
Constructor. 
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase. 
virtual ~StringContextAddTestCase()
Destructor. 
a unique identifier for an interface. 
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase. 
FullyQualifiedAddTestCase()
Constructor. 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
TypeId SetParent(TypeId tid)
Set the parent TypeId. 
StringContextFindTestCase()
Constructor. 
RelativeFindTestCase()
Constructor. 
StringContextAddTestCase()
Constructor.