A Discrete-Event Network Simulator
API
ns3::TraceSourceAccessor Class Referenceabstract

Control access to objects' trace sources. More...

#include "trace-source-accessor.h"

+ Inheritance diagram for ns3::TraceSourceAccessor:
+ Collaboration diagram for ns3::TraceSourceAccessor:

Public Member Functions

 TraceSourceAccessor ()
 Constructor. More...
 
virtual ~TraceSourceAccessor ()
 Destructor. More...
 
virtual bool Connect (ObjectBase *obj, std::string context, const CallbackBase &cb) const =0
 Connect a Callback to a TraceSource with a context string. More...
 
virtual bool ConnectWithoutContext (ObjectBase *obj, const CallbackBase &cb) const =0
 Connect a Callback to a TraceSource (without context.) More...
 
virtual bool Disconnect (ObjectBase *obj, std::string context, const CallbackBase &cb) const =0
 Disconnect a Callback from a TraceSource with a context string. More...
 
virtual bool DisconnectWithoutContext (ObjectBase *obj, const CallbackBase &cb) const =0
 Disconnect a Callback from a TraceSource (without context). More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< TraceSourceAccessor >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 

Detailed Description

Control access to objects' trace sources.

This class abstracts the kind of trace source to which we want to connect and provides services to Connect and Disconnect a sink to a trace source.

Definition at line 46 of file trace-source-accessor.h.

Constructor & Destructor Documentation

ns3::TraceSourceAccessor::TraceSourceAccessor ( )

Constructor.

Definition at line 33 of file trace-source-accessor.cc.

ns3::TraceSourceAccessor::~TraceSourceAccessor ( )
virtual

Destructor.

Definition at line 36 of file trace-source-accessor.cc.

Member Function Documentation

virtual bool ns3::TraceSourceAccessor::Connect ( ObjectBase obj,
std::string  context,
const CallbackBase cb 
) const
pure virtual

Connect a Callback to a TraceSource with a context string.

The context string will be provided as the first argument to the Callback function.

Parameters
[in]objThe object instance which contains the target trace source.
[in]contextThe context to bind to the user callback.
[in]cbThe callback to connect to the target trace source.
Returns
true unless the connection could not be made, typically because the obj couldn't be cast to the correct type.

Referenced by ns3::DoMakeTraceSourceAccessor().

+ Here is the caller graph for this function:

virtual bool ns3::TraceSourceAccessor::ConnectWithoutContext ( ObjectBase obj,
const CallbackBase cb 
) const
pure virtual

Connect a Callback to a TraceSource (without context.)

Parameters
[in]objThe object instance which contains the target trace source.
[in]cbThe callback to connect to the target trace source.
Returns
true unless the connection could not be made, typically because the obj couldn't be cast to the correct type.

Referenced by ns3::DoMakeTraceSourceAccessor().

+ Here is the caller graph for this function:

virtual bool ns3::TraceSourceAccessor::Disconnect ( ObjectBase obj,
std::string  context,
const CallbackBase cb 
) const
pure virtual

Disconnect a Callback from a TraceSource with a context string.

The context string will be provided as the first argument to the Callback function.

Parameters
[in]objthe object instance which contains the target trace source.
[in]contextthe context which was bound to the user callback.
[in]cbthe callback to disconnect from the target trace source.
Returns
true unless the connection could not be made, typically because the obj couldn't be cast to the correct type.

Referenced by ns3::DoMakeTraceSourceAccessor().

+ Here is the caller graph for this function:

virtual bool ns3::TraceSourceAccessor::DisconnectWithoutContext ( ObjectBase obj,
const CallbackBase cb 
) const
pure virtual

Disconnect a Callback from a TraceSource (without context).

Parameters
[in]objThe object instance which contains the target trace source.
[in]cbThe callback to disconnect from the target trace source.
Returns
true unless the connection could not be made, typically because the obj couldn't be cast to the correct type.

Referenced by ns3::DoMakeTraceSourceAccessor().

+ Here is the caller graph for this function:


The documentation for this class was generated from the following files: