Forward calls to a chain of Callback. More...
#include <traced-callback.h>
Collaboration diagram for ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >:Public Types | |
| typedef void(* | Uint32Callback) (const uint32_t value) |
| TracedCallback signature for POD. More... | |
Public Member Functions | |
| TracedCallback () | |
| Constructor. More... | |
| void | Connect (const CallbackBase &callback, std::string path) |
| Append a Callback to the chain with a context. More... | |
| void | ConnectWithoutContext (const CallbackBase &callback) |
| Append a Callback to the chain (without a context). More... | |
| void | Disconnect (const CallbackBase &callback, std::string path) |
| Remove from the chain a Callback which was connected with a context. More... | |
| void | DisconnectWithoutContext (const CallbackBase &callback) |
| Remove from the chain a Callback which was connected without a context. More... | |
Functors taking various numbers of arguments. | |
| void | operator() (void) const |
| Functor which invokes the chain of Callbacks. More... | |
| void | operator() (T1 a1) const |
| Functor which invokes the chain of Callbacks. More... | |
| void | operator() (T1 a1, T2 a2) const |
| Functor which invokes the chain of Callbacks. More... | |
| void | operator() (T1 a1, T2 a2, T3 a3) const |
| Functor which invokes the chain of Callbacks. More... | |
| void | operator() (T1 a1, T2 a2, T3 a3, T4 a4) const |
| Functor which invokes the chain of Callbacks. More... | |
| void | operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) const |
| Functor which invokes the chain of Callbacks. More... | |
| void | operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) const |
| Functor which invokes the chain of Callbacks. More... | |
| void | operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7) const |
| Functor which invokes the chain of Callbacks. More... | |
| void | operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8) const |
| Functor which invokes the chain of Callbacks. More... | |
Private Types | |
| typedef std::list< Callback< void, T1, T2, T3, T4, T5, T6, T7, T8 > > | CallbackList |
| Container type for holding the chain of Callbacks. More... | |
Private Attributes | |
| CallbackList | m_callbackList |
| The chain of Callbacks. More... | |
Forward calls to a chain of Callback.
An TracedCallback has almost exactly the same API as a normal Callback but instead of forwarding calls to a single function (as a Callback normally does), it forwards calls to a chain of Callback. Connect adds a Callback at the end of the chain of callbacks. Disconnect removes a Callback from the chain of callbacks.
This is a functor: the chain of Callbacks is invoked by calling one of the operator() forms with the appropriate number of arguments.
| T1 | Type of the first argument to the functor. |
| T2 | Type of the second argument to the functor. |
| T3 | Type of the third argument to the functor. |
| T4 | Type of the fourth argument to the functor. |
| T5 | Type of the fifth argument to the functor. |
| T6 | Type of the sixth argument to the functor. |
| T7 | Type of the seventh argument to the functor. |
| T8 | Type of the eighth argument to the functor. |
Definition at line 62 of file traced-callback.h.
|
private |
Container type for holding the chain of Callbacks.
| T1 | Type of the first argument to the functor. |
| T2 | Type of the second argument to the functor. |
| T3 | Type of the third argument to the functor. |
| T4 | Type of the fourth argument to the functor. |
| T5 | Type of the fifth argument to the functor. |
| T6 | Type of the sixth argument to the functor. |
| T7 | Type of the seventh argument to the functor. |
| T8 | Type of the eighth argument to the functor. |
Definition at line 237 of file traced-callback.h.
| typedef void(* ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::Uint32Callback) (const uint32_t value) |
TracedCallback signature for POD.
| [in] | value | Value of the traced variable. |
Definition at line 220 of file traced-callback.h.
| ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::TracedCallback | ( | ) |
Constructor.
Definition at line 255 of file traced-callback.h.
| void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::Connect | ( | const CallbackBase & | callback, |
| std::string | path | ||
| ) |
Append a Callback to the chain with a context.
The context string will be provided as the first argument to the Callback.
| callback | Callback to add to chain. |
| path | Context string to provide when invoking the Callback. |
Definition at line 275 of file traced-callback.h.
References ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::Assign(), and ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::Bind().
Referenced by ns3::TracedValue< ns3::SequenceNumber >::Connect().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::ConnectWithoutContext | ( | const CallbackBase & | callback | ) |
Append a Callback to the chain (without a context).
| callback | Callback to add to chain. |
Definition at line 264 of file traced-callback.h.
References ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::Assign().
Referenced by ns3::LteNetDevice::AddLinkChangeCallback(), ns3::WifiNetDevice::AddLinkChangeCallback(), ns3::SimpleNetDevice::AddLinkChangeCallback(), ns3::LrWpanNetDevice::AddLinkChangeCallback(), ns3::UanNetDevice::AddLinkChangeCallback(), ns3::FdNetDevice::AddLinkChangeCallback(), ns3::AlohaNoackNetDevice::AddLinkChangeCallback(), ns3::PointToPointNetDevice::AddLinkChangeCallback(), ns3::TapBridge::AddLinkChangeCallback(), ns3::CsmaNetDevice::AddLinkChangeCallback(), ns3::TracedValue< ns3::SequenceNumber >::ConnectWithoutContext(), and BasicTracedCallbackTestCase::DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::Disconnect | ( | const CallbackBase & | callback, |
| std::string | path | ||
| ) |
Remove from the chain a Callback which was connected with a context.
| callback | Callback to remove from the chain. |
| path | Context path which was used to connect the Callback. |
Definition at line 307 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::Config::DisconnectWithoutContext().
Referenced by ns3::TracedValue< ns3::SequenceNumber >::Disconnect().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::DisconnectWithoutContext | ( | const CallbackBase & | callback | ) |
Remove from the chain a Callback which was connected without a context.
| callback | Callback to remove from the chain. |
Definition at line 287 of file traced-callback.h.
Referenced by ns3::TracedValue< ns3::SequenceNumber >::DisconnectWithoutContext(), and BasicTracedCallbackTestCase::DoRun().
Here is the caller graph for this function:| void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::operator() | ( | void | ) | const |
Functor which invokes the chain of Callbacks.
Definition at line 319 of file traced-callback.h.
| void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::operator() | ( | T1 | a1 | ) | const |
Functor which invokes the chain of Callbacks.
| T1 | Type of the first argument to the functor. |
| a1 | The first argument to the functor. |
Definition at line 332 of file traced-callback.h.
| void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::operator() | ( | T1 | a1, |
| T2 | a2 | ||
| ) | const |
Functor which invokes the chain of Callbacks.
| T1 | Type of the first argument to the functor. |
| T2 | Type of the second argument to the functor. |
| a1 | The first argument to the functor. |
| a2 | The second argument to the functor. |
Definition at line 345 of file traced-callback.h.
| void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::operator() | ( | T1 | a1, |
| T2 | a2, | ||
| T3 | a3 | ||
| ) | const |
Functor which invokes the chain of Callbacks.
| T1 | Type of the first argument to the functor. |
| T2 | Type of the second argument to the functor. |
| T3 | Type of the third argument to the functor. |
| a1 | The first argument to the functor. |
| a2 | The second argument to the functor. |
| a3 | The third argument to the functor. |
Definition at line 358 of file traced-callback.h.
| void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::operator() | ( | T1 | a1, |
| T2 | a2, | ||
| T3 | a3, | ||
| T4 | a4 | ||
| ) | const |
Functor which invokes the chain of Callbacks.
| T1 | Type of the first argument to the functor. |
| T2 | Type of the second argument to the functor. |
| T3 | Type of the third argument to the functor. |
| T4 | Type of the fourth argument to the functor. |
| a1 | The first argument to the functor. |
| a2 | The second argument to the functor. |
| a3 | The third argument to the functor. |
| a4 | The fourth argument to the functor. |
Definition at line 371 of file traced-callback.h.
| void ns3::TracedCallback< T1, T2, T3, T4, T5, T6, T7, T8 >::operator() | ( | T1 | a1, |
| T2 | a2, | ||
| T3 | a3, | ||
| T4 | a4, | ||
| T5 | a5 | ||
| ) | const |
Functor which invokes the chain of Callbacks.
| T1 | Type of the first argument to the functor. |
| T2 | Type of the second argument to the functor. |
| T3 | Type of the third argument to the functor. |
| T4 | Type of the fourth argument to the functor. |
| T5 | Type of the fifth argument to the functor. |
| a1 | The first argument to the functor. |
| a2 | The second argument to the functor. |
| a3 | The third argument to the functor. |
| a4 | The fourth argument to the functor. |
| a5 | The fifth argument to the functor. |
Definition at line 384 of file traced-callback.h.
| 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 |
Functor which invokes the chain of Callbacks.
| T1 | Type of the first argument to the functor. |
| T2 | Type of the second argument to the functor. |
| T3 | Type of the third argument to the functor. |
| T4 | Type of the fourth argument to the functor. |
| T5 | Type of the fifth argument to the functor. |
| T6 | Type of the sixth argument to the functor. |
| a1 | The first argument to the functor. |
| a2 | The second argument to the functor. |
| a3 | The third argument to the functor. |
| a4 | The fourth argument to the functor. |
| a5 | The fifth argument to the functor. |
| a6 | The sixth argument to the functor. |
Definition at line 397 of file traced-callback.h.
| 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 |
Functor which invokes the chain of Callbacks.
| T1 | Type of the first argument to the functor. |
| T2 | Type of the second argument to the functor. |
| T3 | Type of the third argument to the functor. |
| T4 | Type of the fourth argument to the functor. |
| T5 | Type of the fifth argument to the functor. |
| T6 | Type of the sixth argument to the functor. |
| T7 | Type of the seventh argument to the functor. |
| a1 | The first argument to the functor. |
| a2 | The second argument to the functor. |
| a3 | The third argument to the functor. |
| a4 | The fourth argument to the functor. |
| a5 | The fifth argument to the functor. |
| a6 | The sixth argument to the functor. |
| a7 | The seventh argument to the functor. |
Definition at line 410 of file traced-callback.h.
| 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 |
Functor which invokes the chain of Callbacks.
| T1 | Type of the first argument to the functor. |
| T2 | Type of the second argument to the functor. |
| T3 | Type of the third argument to the functor. |
| T4 | Type of the fourth argument to the functor. |
| T5 | Type of the fifth argument to the functor. |
| T6 | Type of the sixth argument to the functor. |
| T7 | Type of the seventh argument to the functor. |
| T8 | Type of the eighth argument to the functor. |
| a1 | The first argument to the functor. |
| a2 | The second argument to the functor. |
| a3 | The third argument to the functor. |
| a4 | The fourth argument to the functor. |
| a5 | The fifth argument to the functor. |
| a6 | The sixth argument to the functor. |
| a7 | The seventh argument to the functor. |
| a8 | The eighth argument to the functor. |
Definition at line 423 of file traced-callback.h.
|
private |
The chain of Callbacks.
Definition at line 239 of file traced-callback.h.