A Discrete-Event Network Simulator
API
ns3::CallbackComponent< T, isComparable > Class Template Reference

Stores a component of a callback, i.e., the callable object or a bound argument. More...

#include "callback.h"

+ Inheritance diagram for ns3::CallbackComponent< T, isComparable >:
+ Collaboration diagram for ns3::CallbackComponent< T, isComparable >:

Public Member Functions

 CallbackComponent (const T &t)
 Constructor. More...
 
bool IsEqual (std::shared_ptr< const CallbackComponentBase > other) const override
 Equality test between the values of two components. More...
 
- Public Member Functions inherited from ns3::CallbackComponentBase
virtual ~CallbackComponentBase ()
 Virtual destructor. More...
 

Private Attributes

m_comp
 the value of the callback component More...
 

Detailed Description

template<typename T, bool isComparable = true>
class ns3::CallbackComponent< T, isComparable >

Stores a component of a callback, i.e., the callable object or a bound argument.

The purpose of this class is to test the equality of the components of two callbacks.

Template Parameters
TThe type of the callback component.
isComparablewhether this callback component can be compared to others of the same type

Definition at line 163 of file callback.h.

Constructor & Destructor Documentation

◆ CallbackComponent()

template<typename T , bool isComparable = true>
ns3::CallbackComponent< T, isComparable >::CallbackComponent ( const T &  t)
inline

Constructor.

Parameters
[in]tThe value of the callback component

Definition at line 171 of file callback.h.

Member Function Documentation

◆ IsEqual()

template<typename T , bool isComparable = true>
bool ns3::CallbackComponent< T, isComparable >::IsEqual ( std::shared_ptr< const CallbackComponentBase other) const
inlineoverridevirtual

Equality test between the values of two components.

Parameters
[in]otherCallbackComponentBase Ptr
Returns
true if we are equal

Implements ns3::CallbackComponentBase.

Definition at line 182 of file callback.h.

References ns3::CallbackComponent< T, isComparable >::m_comp.

Member Data Documentation

◆ m_comp

template<typename T , bool isComparable = true>
T ns3::CallbackComponent< T, isComparable >::m_comp
private

the value of the callback component

Definition at line 191 of file callback.h.

Referenced by ns3::CallbackComponent< T, isComparable >::IsEqual().


The documentation for this class was generated from the following file: