do not use templates.

This commit is contained in:
Mathieu Lacage
2008-03-24 11:28:42 -07:00
parent 0ccf783437
commit 80fec1898e
2 changed files with 6 additions and 20 deletions

View File

@@ -34,7 +34,11 @@ OlsrHelper::SetAgent (std::string tid,
void
OlsrHelper::Enable (NodeContainer container)
{
Enable (container.Begin (), container.End ());
for (NodeContainer::Iterator i = container.Begin (); i != container.End (); ++i)
{
Ptr<Node> node = *i;
Enable (node);
}
}
void
OlsrHelper::Enable (Ptr<Node> node)
@@ -47,7 +51,7 @@ OlsrHelper::Enable (Ptr<Node> node)
void
OlsrHelper::EnableAll (void)
{
Enable (NodeList::Begin (), NodeList::End ());
Enable (NodeContainer::GetGlobal ());
}
} // namespace ns3

View File

@@ -22,8 +22,6 @@ public:
std::string n6 = "", Attribute v6 = Attribute (),
std::string n7 = "", Attribute v7 = Attribute ());
template <typename InputIterator>
void Enable (InputIterator begin, InputIterator end);
void Enable (NodeContainer container);
void Enable (Ptr<Node> node);
void EnableAll (void);
@@ -33,20 +31,4 @@ private:
} // namespace ns3
namespace ns3 {
template <typename T>
void
OlsrHelper::Enable (T begin, T end)
{
for (T i = begin; i != end; i++)
{
Ptr<Object> obj = (*i);
Ptr<Node> node = obj->GetObject<Node> ();
Enable (node);
}
}
} // namespace ns3
#endif /* OLSR_HELPER_H */