add NodeContainer::GetGlobal
This commit is contained in:
1 parent
29f19e164e
commit
4e5eab77e2
2 files changed
+19
No files matched your search
@@ -1,4 +1,5 @@
|
||||
#include "node-container.h"
|
||||
#include "ns3/node-list.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
@@ -58,4 +59,15 @@ NodeContainer::Add (Ptr<Node> node)
|
||||
m_nodes.push_back (node);
|
||||
}
|
||||
|
||||
NodeContainer
|
||||
NodeContainer::GetGlobal (void)
|
||||
{
|
||||
NodeContainer c;
|
||||
for (NodeList::Iterator i = NodeList::Begin (); i != NodeList::End (); ++i)
|
||||
{
|
||||
c.Add (*i);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
} // namespace ns3
|
||||
Reference in new issue
Block a user