do not use templates.
--- a/src/helper/olsr-helper.cc Mon Mar 24 11:14:05 2008 -0700
+++ b/src/helper/olsr-helper.cc Mon Mar 24 11:28:42 2008 -0700
@@ -34,7 +34,11 @@
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 @@
void
OlsrHelper::EnableAll (void)
{
- Enable (NodeList::Begin (), NodeList::End ());
+ Enable (NodeContainer::GetGlobal ());
}
} // namespace ns3
--- a/src/helper/olsr-helper.h Mon Mar 24 11:14:05 2008 -0700
+++ b/src/helper/olsr-helper.h Mon Mar 24 11:28:42 2008 -0700
@@ -22,8 +22,6 @@
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 @@
} // 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 */