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 () | |
| Constructor. More... | |
| SimpleRefCount (const SimpleRefCount &o) | |
| Copy constructor. More... | |
| uint32_t | GetReferenceCount (void) const |
| Get the reference count of the object. More... | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| Assignment. More... | |
| void | Ref (void) const |
| Increment the reference count. More... | |
| void | Unref (void) const |
| Decrement the reference count. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from ns3::SimpleRefCount< TraceSourceAccessor > | |
| static void | Cleanup (void) |
| Noop. More... | |
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.
| ns3::TraceSourceAccessor::TraceSourceAccessor | ( | ) |
Constructor.
Definition at line 33 of file trace-source-accessor.cc.
|
virtual |
Destructor.
Definition at line 36 of file trace-source-accessor.cc.
|
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.
| obj | The object instance which contains the target trace source. |
| context | The context to bind to the user callback. |
| cb | The callback to connect to the target trace source. |
true unless the connection could not be made, typically because the obj couldn't be cast to the correct type.
|
pure virtual |
Connect a Callback to a TraceSource (without context.)
| obj | The object instance which contains the target trace source. |
| cb | The callback to connect to the target trace source. |
true unless the connection could not be made, typically because the obj couldn't be cast to the correct type.
|
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.
| obj | the object instance which contains the target trace source. |
| context | the context which was bound to the user callback. |
| cb | the callback to disconnect from the target trace source. |
true unless the connection could not be made, typically because the obj couldn't be cast to the correct type.
|
pure virtual |
Disconnect a Callback from a TraceSource (without context).
| obj | The object instance which contains the target trace source. |
| cb | The callback to disconnect from the target trace source. |
true unless the connection could not be made, typically because the obj couldn't be cast to the correct type.