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. | |
const CallbackComponentVector & | GetComponents () const |
Get the vector of callback components. | |
const std::function< R(UArgs...)> & | GetFunction () const |
Get the stored function. | |
std::string | GetTypeid () const override |
Get the name of this object type. | |
bool | IsEqual (Ptr< const CallbackImplBase > other) const override |
Equality test. | |
R | operator() (UArgs... uargs) const |
Function call operator. | |
Public Member Functions inherited from ns3::CallbackImplBase | |
virtual | ~CallbackImplBase () |
Virtual destructor. | |
Public Member Functions inherited from ns3::SimpleRefCount< CallbackImplBase > | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
Static Public Member Functions | |
static std::string | DoGetTypeid () |
Get the name of this object type. | |
Private Attributes | |
std::vector< std::shared_ptr< CallbackComponentBase > > | m_components |
Stores the original callable object and the bound arguments, if any. | |
std::function< R(UArgs...)> | m_func |
Stores the callable object associated with this callback (as a lambda) | |
Additional Inherited Members | |
Static Protected Member Functions inherited from ns3::CallbackImplBase | |
template<typename T > | |
static std::string | GetCppTypeid () |
Helper to get the C++ typeid as a string. | |
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 225 of file callback.h.
|
inline |
Constructor.
func | the callable object |
components | the callback components (callable object and bound arguments) |
Definition at line 234 of file callback.h.
|
inlinestatic |
Get the name of this object type.
Definition at line 312 of file callback.h.
References ns3::CallbackImplBase::GetCppTypeid().
Referenced by ns3::Callback< R, UArgs >::Assign(), and ns3::CallbackImpl< R, UArgs >::GetTypeid().
|
inline |
Get the vector of callback components.
Definition at line 253 of file callback.h.
References ns3::CallbackImpl< R, UArgs >::m_components.
|
inline |
Get the stored function.
Definition at line 244 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 306 of file callback.h.
References ns3::CallbackImpl< R, UArgs >::DoGetTypeid().
|
inlineoverridevirtual |
Equality test.
true
if we are equal Implements ns3::CallbackImplBase.
Definition at line 269 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 264 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 335 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 332 of file callback.h.
Referenced by ns3::CallbackImpl< R, UArgs >::GetFunction(), and ns3::CallbackImpl< R, UArgs >::operator()().