Callback template class. More...
#include <callback.h>
Public Member Functions | |
template<typename FUNCTOR > | |
Callback (FUNCTOR const &functor, bool, bool) | |
template<typename OBJ_PTR , typename MEM_PTR > | |
Callback (OBJ_PTR const &objPtr, MEM_PTR mem_ptr) | |
Callback (Ptr< CallbackImpl< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > > const &impl) | |
void | Assign (const CallbackBase &other) |
template<typename T > | |
Callback< R, T2, T3, T4, T5, T6, T7, T8, T9 > | Bind (T a) |
bool | CheckType (const CallbackBase &other) const |
bool | IsEqual (const CallbackBase &other) const |
bool | IsNull (void) const |
void | Nullify (void) |
R | operator() (void) const |
R | operator() (T1 a1) const |
R | operator() (T1 a1, T2 a2) const |
R | operator() (T1 a1, T2 a2, T3 a3) const |
R | operator() (T1 a1, T2 a2, T3 a3, T4 a4) const |
R | operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) const |
R | operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) const |
R | operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7) const |
R | operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8) const |
R | operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9) const |
Public Member Functions inherited from ns3::CallbackBase | |
Ptr< CallbackImplBase > | GetImpl (void) const |
Private Member Functions | |
void | DoAssign (Ptr< const CallbackImplBase > other) |
bool | DoCheckType (Ptr< const CallbackImplBase > other) const |
CallbackImpl< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > * | DoPeekImpl (void) const |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::CallbackBase | |
CallbackBase (Ptr< CallbackImplBase > impl) | |
Static Protected Member Functions inherited from ns3::CallbackBase | |
static std::string | Demangle (const std::string &mangled) |
Protected Attributes inherited from ns3::CallbackBase | |
Ptr< CallbackImplBase > | m_impl |
Callback template class.
This class template implements the Functor Design Pattern. It is used to declare the type of a Callback:
Callback instances are built with the MakeCallback template functions. Callback instances have POD semantics: the memory they allocate is managed automatically, without user intervention which allows you to pass around Callback instances by value.
Sample code which shows how to use this class template as well as the function templates MakeCallback :
Definition at line 369 of file callback.h.