--- a/src/helper/on-off-helper.cc Wed Nov 05 19:53:52 2008 -0800
+++ b/src/helper/on-off-helper.cc Thu Nov 06 13:08:20 2008 -0800
@@ -38,18 +38,30 @@
}
ApplicationContainer
-OnOffHelper::Install (NodeContainer c)
+OnOffHelper::Install (Ptr<Node> node) const
+{
+ return ApplicationContainer (InstallPriv (node));
+}
+
+ApplicationContainer
+OnOffHelper::Install (NodeContainer c) const
{
ApplicationContainer apps;
for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i)
{
- Ptr<Node> node = *i;
- Ptr<Application> app = m_factory.Create<Application> ();
- node->AddApplication (app);
- apps.Add (app);
+ apps.Add (InstallPriv (*i));
}
+
return apps;
}
+Ptr<Application>
+OnOffHelper::InstallPriv (Ptr<Node> node) const
+{
+ Ptr<Application> app = m_factory.Create<Application> ();
+ node->AddApplication (app);
+
+ return app;
+}
} // namespace ns3