do not use templates.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user