Control access to objects' trace sources.
More...
#include "trace-source-accessor.h"
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 36 of file trace-source-accessor.h.
◆ TraceSourceAccessor()
ns3::TraceSourceAccessor::TraceSourceAccessor |
( |
| ) |
|
◆ ~TraceSourceAccessor()
ns3::TraceSourceAccessor::~TraceSourceAccessor |
( |
| ) |
|
|
virtual |
◆ Connect()
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] | obj | The object instance which contains the target trace source. |
[in] | context | The context to bind to the user callback. |
[in] | cb | The 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.
◆ ConnectWithoutContext()
virtual bool ns3::TraceSourceAccessor::ConnectWithoutContext |
( |
ObjectBase * | obj, |
|
|
const CallbackBase & | cb ) const |
|
pure virtual |
Connect a Callback to a TraceSource (without context.)
- Parameters
-
[in] | obj | The object instance which contains the target trace source. |
[in] | cb | The 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.
◆ Disconnect()
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] | obj | the object instance which contains the target trace source. |
[in] | context | the context which was bound to the user callback. |
[in] | cb | the 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.
◆ DisconnectWithoutContext()
virtual bool ns3::TraceSourceAccessor::DisconnectWithoutContext |
( |
ObjectBase * | obj, |
|
|
const CallbackBase & | cb ) const |
|
pure virtual |
Disconnect a Callback from a TraceSource (without context).
- Parameters
-
[in] | obj | The object instance which contains the target trace source. |
[in] | cb | The 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.
The documentation for this class was generated from the following files: