remove dead code
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Fri, 10 Aug 2007 14:28:52 +0200
changeset 1329 fc842b2faece
parent 1328 03f1081c21a7
child 1330 d67fce6d56f8
remove dead code
src/common/composite-trace-resolver.cc
src/common/trace-resolver.cc
src/common/trace-resolver.h
--- a/src/common/composite-trace-resolver.cc	Fri Aug 10 14:25:58 2007 +0200
+++ b/src/common/composite-trace-resolver.cc	Fri Aug 10 14:28:52 2007 +0200
@@ -66,7 +66,6 @@
 
   if (id == "*")
     {
-      TraceResolver::TraceResolverList list;
       for (TraceItems::const_iterator i = m_items.begin (); i != m_items.end (); i++)
 	{
           OperationOne (subpath, i, cb, context, op);
@@ -106,7 +105,6 @@
       names.push_back (element);
       cur_pos = next_pos + 1;
     }
-  TraceResolver::TraceResolverList list;
   for (std::list<std::string>::const_iterator i = names.begin (); i != names.end (); i++)
     {
       for (TraceItems::const_iterator j = m_items.begin (); j != m_items.end (); j++)
--- a/src/common/trace-resolver.cc	Fri Aug 10 14:25:58 2007 +0200
+++ b/src/common/trace-resolver.cc	Fri Aug 10 14:28:52 2007 +0200
@@ -28,57 +28,11 @@
 
 void 
 TraceResolver::Connect (std::string path, CallbackBase const &cb, const TraceContext &context)
-{
-  std::string::size_type cur = 1;
-  // check that first char is "/"
-  std::string::size_type next = path.find ("/", cur);
-  std::string element = std::string (path, cur, next-1);
-  TraceResolverList resolverList = DoLookup (element);
-  for (TraceResolverList::iterator i = resolverList.begin (); i != resolverList.end (); i++)
-    {
-      TraceResolver *resolver = i->first;
-      TraceContext tmp = context;
-      tmp.Add (i->second);
-      if (next == std::string::npos) 
-	{
-	  // we really break the recursion here.
-	  resolver->DoConnect (cb, tmp);
-	}
-      else
-	{
-	  std::string subpath = std::string (path, next, std::string::npos);
-          resolver->Connect (subpath, cb, tmp);
-	}
-      delete resolver;
-    }
-  resolverList.erase (resolverList.begin (), resolverList.end ());
-}
+{}
 
 void 
 TraceResolver::Disconnect (std::string path, CallbackBase const &cb)
-{
-  std::string::size_type cur = 1;
-  // check that first char is "/"
-  std::string::size_type next = path.find ("/", cur);
-  std::string element = std::string (path, cur, next-1);
-  TraceResolverList resolverList = DoLookup (element);
-  for (TraceResolverList::iterator i = resolverList.begin (); i != resolverList.end (); i++)
-    {
-      TraceResolver *resolver = i->first;
-      if (next == std::string::npos) 
-	{
-	  // we really break the recursion here.
-	  resolver->DoDisconnect (cb);
-	}
-      else
-	{
-	  std::string subpath = std::string (path, next, std::string::npos);
-          resolver->Disconnect (subpath, cb);
-	}
-      delete resolver;
-    }
-  resolverList.erase (resolverList.begin (), resolverList.end ());
-}
+{}
 
 std::string 
 TraceResolver::GetElement (std::string path)
@@ -107,19 +61,4 @@
   return subpath;
 }
 
-
-TraceResolver::TraceResolverList 
-TraceResolver::DoLookup (std::string id) const
-{
-  return TraceResolverList ();
-}
-void 
-TraceResolver::DoConnect (CallbackBase const &cb, const TraceContext &context)
-{}
-
-void 
-TraceResolver::DoDisconnect (CallbackBase const &cb)
-{}
-
-
 }//namespace ns3
--- a/src/common/trace-resolver.h	Fri Aug 10 14:25:58 2007 +0200
+++ b/src/common/trace-resolver.h	Fri Aug 10 14:28:52 2007 +0200
@@ -70,35 +70,8 @@
    */
   virtual void Disconnect (std::string path, CallbackBase const &cb);
 protected:
-  typedef std::list<std::pair<TraceResolver *, TraceContext> > TraceResolverList;
   std::string GetElement (std::string path);
   std::string GetSubpath (std::string path);
-private:
-  /**
-   * \param id the id to resolve. This is supposed to be
-   * one element of the global tracing namespace.
-   * \returns a list of reslvers which match the input namespace element
-   *
-   * A subclass which overrides this method should return a potentially
-   * empty list of pointers to ns3::TraceResolver instances which match
-   * the input namespace element. Each of these TraceResolver should be
-   * instanciated with a TraceContext which holds enough context
-   * information to identify the type of the TraceResolver.
-   */
-  virtual TraceResolverList DoLookup (std::string id) const;
-  /**
-   * \param cb callback to connect
-   *
-   * This method is invoked on leaf trace resolvers.
-   */
-  virtual void DoConnect (CallbackBase const &cb, const TraceContext &context);
-  /**
-   * \param cb callback to disconnect
-   *
-   * This method is invoked on leaf trace resolvers.
-   */
-  virtual void DoDisconnect (CallbackBase const &cb);
-  TraceContext m_context;
 };
 
 }//namespace ns3