forward calls to a chain of CallbackAn ns3::TracedCallback has almost exactly the same API as a normal ns3::Callback but instead of forwarding calls to a single function (as an ns3::Callback normally does), it forwards calls to a chain of ns3::Callback. TracedCallback::Connect adds a ns3::Callback at the end of the chain of callbacks. TracedCallback::Disconnect removes a ns3::Callback from the chain of callbacks. More...
#include <traced-callback.h>
Public Member Functions | |
TracedCallback () | |
void | ConnectWithoutContext (const CallbackBase &callback) |
void | Connect (const CallbackBase &callback, std::string path) |
void | DisconnectWithoutContext (const CallbackBase &callback) |
void | Disconnect (const CallbackBase &callback, std::string path) |
void | operator() (void) const |
void | operator() (T1 a1) const |
void | operator() (T1 a1, T2 a2) const |
void | operator() (T1 a1, T2 a2, T3 a3) const |
void | operator() (T1 a1, T2 a2, T3 a3, T4 a4) const |
void | operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) const |
void | operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) const |
void | operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7) const |
void | operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8) const |
Private Types | |
typedef std::list< Callback < void, T1, T2, T3, T4, T5, T6, T7, T8 > > | CallbackList |
Private Attributes | |
CallbackList | m_callbackList |
forward calls to a chain of Callback
An ns3::TracedCallback has almost exactly the same API as a normal ns3::Callback but instead of forwarding calls to a single function (as an ns3::Callback normally does), it forwards calls to a chain of ns3::Callback. TracedCallback::Connect adds a ns3::Callback at the end of the chain of callbacks. TracedCallback::Disconnect removes a ns3::Callback from the chain of callbacks.
Definition at line 43 of file traced-callback.h.
typedef std::list<Callback<void,T1,T2,T3,T4,T5,T6,T7,T8> > ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::CallbackList [private] |
Definition at line 92 of file traced-callback.h.
ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::TracedCallback | ( | ) | [inline] |
Definition at line 106 of file traced-callback.h.
void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::Connect | ( | const CallbackBase & | callback, | |
std::string | path | |||
) | [inline] |
callback | callback to add to chain of callbacks | |
path | the path to send back to the user callback. |
Append the input callback to the end of the internal list of ns3::Callback. This method also will make sure that the input path specified by the user will be give back to the user's callback as its first argument.
Definition at line 125 of file traced-callback.h.
References ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::Assign(), ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::Bind(), and ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::m_callbackList.
Referenced by ns3::TracedValue< ValueClassTest >::Connect().
void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::ConnectWithoutContext | ( | const CallbackBase & | callback | ) | [inline] |
callback | callback to add to chain of callbacks |
Append the input callback to the end of the internal list of ns3::Callback.
Definition at line 114 of file traced-callback.h.
References ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::Assign(), and ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::m_callbackList.
Referenced by ns3::TracedValue< ValueClassTest >::ConnectWithoutContext(), and ns3::TracedCallbackTest::RunTests().
void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::Disconnect | ( | const CallbackBase & | callback, | |
std::string | path | |||
) | [inline] |
callback | callback to remove from the chain of callbacks. | |
path | the path which is sent back to the user callback. |
Remove the input callback which has a matching path as first argument from the internal list of ns3::Callback. This method is really the symmetric of the TracedCallback::Connect method.
Definition at line 157 of file traced-callback.h.
References ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::Assign(), ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::Bind(), and ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::DisconnectWithoutContext().
Referenced by ns3::TracedValue< ValueClassTest >::Disconnect().
void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::DisconnectWithoutContext | ( | const CallbackBase & | callback | ) | [inline] |
callback | callback to remove from the chain of callbacks. |
Remove the input callback from the internal list of ns3::Callback. This method is really the symmetric of the TracedCallback::ConnectWithoutContext method.
Definition at line 137 of file traced-callback.h.
References ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::m_callbackList.
Referenced by ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::Disconnect(), ns3::TracedValue< ValueClassTest >::DisconnectWithoutContext(), and ns3::TracedCallbackTest::RunTests().
void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::operator() | ( | T1 | a1, | |
T2 | a2, | |||
T3 | a3, | |||
T4 | a4, | |||
T5 | a5, | |||
T6 | a6, | |||
T7 | a7, | |||
T8 | a8 | |||
) | const [inline] |
Definition at line 273 of file traced-callback.h.
References ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::m_callbackList.
void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::operator() | ( | T1 | a1, | |
T2 | a2, | |||
T3 | a3, | |||
T4 | a4, | |||
T5 | a5, | |||
T6 | a6, | |||
T7 | a7 | |||
) | const [inline] |
Definition at line 260 of file traced-callback.h.
References ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::m_callbackList.
void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::operator() | ( | T1 | a1, | |
T2 | a2, | |||
T3 | a3, | |||
T4 | a4, | |||
T5 | a5, | |||
T6 | a6 | |||
) | const [inline] |
Definition at line 247 of file traced-callback.h.
References ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::m_callbackList.
void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::operator() | ( | T1 | a1, | |
T2 | a2, | |||
T3 | a3, | |||
T4 | a4, | |||
T5 | a5 | |||
) | const [inline] |
Definition at line 234 of file traced-callback.h.
References ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::m_callbackList.
void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::operator() | ( | T1 | a1, | |
T2 | a2, | |||
T3 | a3, | |||
T4 | a4 | |||
) | const [inline] |
Definition at line 221 of file traced-callback.h.
References ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::m_callbackList.
void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::operator() | ( | T1 | a1, | |
T2 | a2, | |||
T3 | a3 | |||
) | const [inline] |
Definition at line 208 of file traced-callback.h.
References ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::m_callbackList.
void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::operator() | ( | T1 | a1, | |
T2 | a2 | |||
) | const [inline] |
Definition at line 195 of file traced-callback.h.
References ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::m_callbackList.
void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::operator() | ( | T1 | a1 | ) | const [inline] |
Definition at line 182 of file traced-callback.h.
References ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::m_callbackList.
void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::operator() | ( | void | ) | const [inline] |
Definition at line 169 of file traced-callback.h.
References ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::m_callbackList.
CallbackList ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::m_callbackList [private] |
Definition at line 93 of file traced-callback.h.
Referenced by ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::Connect(), ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::ConnectWithoutContext(), ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::DisconnectWithoutContext(), and ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::operator()().