work in progress towards a working trace context

This commit is contained in:
Mathieu Lacage committed 2007-08-06 17:19:13 +02:00
1 parent 03d6425976
commit 8648af261e
14 files changed
+340 -144

No files matched your search

+26 -2
View File
@@ -40,6 +40,30 @@ public:
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 = Register<NodeListIndex> ("NodeListIndex");
return uid;
}
uint32_t
NodeListIndex::Get (void) const
{
return m_index;
}
/**
* The private node list used by the static-based API
*/
@@ -115,8 +139,8 @@ NodeListPriv::GetNode (uint32_t n)
TraceResolver *
NodeListPriv::CreateTraceResolver (TraceContext const &context)
{
ArrayTraceResolver<Node> *resolver =
new ArrayTraceResolver<Node>
ArrayTraceResolver<Node, NodeListIndex> *resolver =
new ArrayTraceResolver<Node, NodeListIndex>
(context,
MakeCallback (&NodeListPriv::GetNNodes, this),
MakeCallback (&NodeListPriv::PeekNode, this));