CallbackImpl class with varying numbers of argument types. More...
#include "callback.h"
Public Member Functions | |
CallbackImpl (std::function< R(UArgs...)> func, const CallbackComponentVector &components) | |
Constructor. More... | |
const CallbackComponentVector & | GetComponents () const |
Get the vector of callback components. More... | |
const std::function< R(UArgs...)> & | GetFunction () const |
Get the stored function. More... | |
std::string | GetTypeid () const override |
Get the name of this object type. More... | |
bool | IsEqual (Ptr< const CallbackImplBase > other) const override |
Equality test. More... | |
R | operator() (UArgs... uargs) const |
Function call operator. More... | |
Public Member Functions inherited from ns3::CallbackImplBase | |
virtual | ~CallbackImplBase () |
Virtual destructor. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< CallbackImplBase > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o[[maybe_unused]]) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o[[maybe_unused]]) |
Assignment operator. More... | |
void | Ref () const |
Increment the reference count. More... | |
void | Unref () const |
Decrement the reference count. More... | |
Static Public Member Functions | |
static std::string | DoGetTypeid () |
Get the name of this object type. More... | |
Private Attributes | |
std::vector< std::shared_ptr< CallbackComponentBase > > | m_components |
Stores the original callable object and the bound arguments, if any. More... | |
std::function< R(UArgs...)> | m_func |
Stores the callable object associated with this callback (as a lambda) More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from ns3::CallbackImplBase | |
static std::string | Demangle (const std::string &mangled) |
template<typename T > | |
static std::string | GetCppTypeid () |
Helper to get the C++ typeid as a string. More... | |
CallbackImpl class with varying numbers of argument types.
R | [explicit] The return type of the Callback. |
UArgs | [explicit] The types of any arguments to the Callback. |
Definition at line 241 of file callback.h.
|
inline |
Constructor.
func | the callable object |
components | the callback components (callable object and bound arguments) |
Definition at line 250 of file callback.h.
|
inlinestatic |
Get the name of this object type.
Definition at line 328 of file callback.h.
Referenced by ns3::Callback< R, UArgs >::Assign(), and ns3::CallbackImpl< R, UArgs >::GetTypeid().
|
inline |
Get the vector of callback components.
Definition at line 269 of file callback.h.
References ns3::CallbackImpl< R, UArgs >::m_components.
|
inline |
Get the stored function.
Definition at line 260 of file callback.h.
References ns3::CallbackImpl< R, UArgs >::m_func.
|
inlineoverridevirtual |
Get the name of this object type.
Implements ns3::CallbackImplBase.
Definition at line 322 of file callback.h.
References ns3::CallbackImpl< R, UArgs >::DoGetTypeid().
|
inlineoverridevirtual |
Equality test.
true
if we are equal Implements ns3::CallbackImplBase.
Definition at line 285 of file callback.h.
References ns3::CallbackImpl< R, UArgs >::m_components, and ns3::PeekPointer().
|
inline |
Function call operator.
uargs | The arguments to the Callback. |
Definition at line 280 of file callback.h.
References ns3::CallbackImpl< R, UArgs >::m_func.
|
private |
Stores the original callable object and the bound arguments, if any.
Definition at line 351 of file callback.h.
Referenced by ns3::CallbackImpl< R, UArgs >::GetComponents(), and ns3::CallbackImpl< R, UArgs >::IsEqual().
|
private |
Stores the callable object associated with this callback (as a lambda)
Definition at line 348 of file callback.h.
Referenced by ns3::CallbackImpl< R, UArgs >::GetFunction(), and ns3::CallbackImpl< R, UArgs >::operator()().