--- a/src/node/node-list.cc Sun Mar 02 22:52:55 2008 +0100
+++ b/src/node/node-list.cc Sun Mar 02 22:53:11 2008 +0100
@@ -20,7 +20,6 @@
* Mathieu Lacage <mathieu.lacage@sophia.inria.fr>,
*/
-#include "ns3/composite-trace-resolver.h"
#include "ns3/simulator.h"
#include "ns3/object-vector.h"
#include "ns3/config.h"
@@ -29,34 +28,6 @@
namespace ns3 {
-NodeListIndex::NodeListIndex ()
- : m_index (0)
-{}
-NodeListIndex::NodeListIndex (uint32_t index)
- : m_index (index)
-{}
-void
-NodeListIndex::Print (std::ostream &os)
-{
- os << "nodeid=" << m_index;
-}
-uint16_t
-NodeListIndex::GetUid (void)
-{
- static uint16_t uid = AllocateUid<NodeListIndex> ("NodeListIndex");
- return uid;
-}
-uint32_t
-NodeListIndex::Get (void) const
-{
- return m_index;
-}
-std::string
-NodeListIndex::GetTypeName (void) const
-{
- return "ns3::NodeListIndex";
-}
-
/**
* The private node list used by the static-based API
@@ -71,7 +42,6 @@
uint32_t Add (Ptr<Node> node);
NodeList::Iterator Begin (void) const;
NodeList::Iterator End (void) const;
- Ptr<TraceResolver> GetTraceResolver (void) const;
Ptr<Node> GetNode (uint32_t n);
uint32_t GetNNodes (void);
@@ -166,15 +136,6 @@
return m_nodes[n];
}
-
-Ptr<TraceResolver>
-NodeListPriv::GetTraceResolver (void) const
-{
- Ptr<CompositeTraceResolver> resolver = Create<CompositeTraceResolver> ();
- resolver->AddArray ("nodes", Begin (), End (), NodeListIndex ());
- return resolver;
-}
-
}
/**
@@ -205,24 +166,4 @@
return NodeListPriv::Get ()->GetNode (n);
}
-void
-NodeList::Connect (std::string name, const CallbackBase &cb)
-{
- NodeListPriv::Get ()->GetTraceResolver ()->Connect (name, cb, TraceContext ());
-}
-void
-NodeList::Disconnect (std::string name, const CallbackBase &cb)
-{
- NodeListPriv::Get ()->GetTraceResolver ()->Disconnect (name, cb);
-}
-void
-NodeList::TraceAll (std::ostream &os)
-{
- NodeListPriv::Get ()->GetTraceResolver ()->TraceAll (os, TraceContext ());
-}
-Ptr<TraceResolver>
-NodeList::GetTraceResolver (void)
-{
- return NodeListPriv::Get ()->GetTraceResolver ();
-}
}//namespace ns3
--- a/src/node/node-list.h Sun Mar 02 22:52:55 2008 +0100
+++ b/src/node/node-list.h Sun Mar 02 22:53:11 2008 +0100
@@ -23,33 +23,12 @@
#define NODE_LIST_H
#include <vector>
-#include "ns3/trace-context-element.h"
#include "ns3/ptr.h"
namespace ns3 {
class Node;
class CallbackBase;
-class TraceResolver;
-
-/**
- * \brief hold in a TraceContext the index of a node within a NodeList.
- */
-class NodeListIndex : public TraceContextElement
-{
-public:
- NodeListIndex ();
- NodeListIndex (uint32_t index);
- void Print (std::ostream &os);
- static uint16_t GetUid (void);
- /**
- * \returns the index of the node within the NodeList
- */
- uint32_t Get (void) const;
- std::string GetTypeName (void) const;
-private:
- uint32_t m_index;
-};
/**
@@ -85,45 +64,6 @@
* \returns the Node associated to index n.
*/
static Ptr<Node> GetNode (uint32_t n);
- /**
- * \param name namespace regexp to match
- * \param cb callback to connect
- *
- * Connect input callback to all trace sources which match
- * the input namespace regexp.
- * A tutorial which explains how to use this method can be
- * found in the \ref tracing section.
- */
- static void Connect (std::string name, const CallbackBase &cb);
- /**
- * \param name namespace regexp to match
- * \param cb callback to connect
- *
- * Disconnect input callback from all trace sources which match
- * the input namespace regexp.
- */
- static void Disconnect (std::string name, const CallbackBase &cb);
- /**
- * \param os the output stream on which the content of each trace event should be
- * dumped in ascii format.
- *
- * Enable _every_ trace source accessible from the NodeList and write to the
- * output stream an ascii representation of each trace event.
- * This method is very useful to get quick-and-dirty trace output from a
- * simulation.
- * More fancy tracing output could be generated with the ns3::NodeList::Connect
- * method as explained in the \ref tracing section.
- */
- static void TraceAll (std::ostream &os);
- /**
- * \returns the trace resolver used by the ns3::NodeList::Connect,
- * ns3::NodeList::Disconnect, and, ns3::NodeList::TraceAll methods.
- *
- * Using this method directly is not really recommended. Instead, users
- * should use one of the three methods ns3::NodeList::Connect,
- * ns3::NodeList::Disconnect, or, ns3::NodeList::TraceAll methods.
- */
- static Ptr<TraceResolver> GetTraceResolver (void);
};
}//namespace ns3