GetNNodes() in NodeList fixes bug 225
authorcraigdo@craig-dowells-imac.local
Wed, 18 Jun 2008 21:17:56 -0700
changeset 3290 3167a20f9cf0
parent 3289 bd7baccf47a3
child 3291 ea7a7b984813
GetNNodes() in NodeList fixes bug 225
src/node/node-list.cc
src/node/node-list.h
--- a/src/node/node-list.cc	Wed Jun 18 11:57:43 2008 -0700
+++ b/src/node/node-list.cc	Wed Jun 18 21:17:56 2008 -0700
@@ -172,5 +172,10 @@
 {
   return NodeListPriv::Get ()->GetNode (n);
 }
+uint32_t
+NodeList::GetNNodes (void)
+{
+  return NodeListPriv::Get ()->GetNNodes ();
+}
 
 }//namespace ns3
--- a/src/node/node-list.h	Wed Jun 18 11:57:43 2008 -0700
+++ b/src/node/node-list.h	Wed Jun 18 21:17:56 2008 -0700
@@ -65,6 +65,10 @@
    * \returns the Node associated to index n.
    */
   static Ptr<Node> GetNode (uint32_t n);
+  /**
+   * \returns the number of nodes currently in the list.
+   */
+  static uint32_t GetNNodes (void);
 };
 
 }//namespace ns3