From b3578666552af34aef173e193d501e17833fe9b6 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 18 Jun 2008 21:17:56 -0700 Subject: [PATCH] GetNNodes() in NodeList fixes bug 225 --- src/node/node-list.cc | 5 +++++ src/node/node-list.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/node/node-list.cc b/src/node/node-list.cc index e99a94b35..651be40b2 100644 --- a/src/node/node-list.cc +++ b/src/node/node-list.cc @@ -172,5 +172,10 @@ NodeList::GetNode (uint32_t n) { return NodeListPriv::Get ()->GetNode (n); } +uint32_t +NodeList::GetNNodes (void) +{ + return NodeListPriv::Get ()->GetNNodes (); +} }//namespace ns3 diff --git a/src/node/node-list.h b/src/node/node-list.h index 137363dff..2d74b67df 100644 --- a/src/node/node-list.h +++ b/src/node/node-list.h @@ -65,6 +65,10 @@ public: * \returns the Node associated to index n. */ static Ptr GetNode (uint32_t n); + /** + * \returns the number of nodes currently in the list. + */ + static uint32_t GetNNodes (void); }; }//namespace ns3