A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::CallbackComponent< T, false > Class Template Reference

Partial specialization of class CallbackComponent with isComparable equal to false. More...

#include "callback.h"

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

Public Member Functions

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

Detailed Description

template<typename T>
class ns3::CallbackComponent< T, false >

Partial specialization of class CallbackComponent with isComparable equal to false.

This is required to handle callable objects (such as lambdas and objects returned by std::function and std::bind) that do not provide the equality operator. Given that these objects cannot be compared and the only purpose of the class CallbackComponent is to compare values, no object is stored in this specialized class.

Template Parameters
TThe type of the callback component.

Definition at line 190 of file callback.h.

Constructor & Destructor Documentation

◆ CallbackComponent()

template<typename T >
ns3::CallbackComponent< T, false >::CallbackComponent ( const T & t)
inline

Constructor.

Parameters
[in]tThe value of the callback component

Definition at line 198 of file callback.h.

Member Function Documentation

◆ IsEqual()

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

Equality test between functions.

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

Implements ns3::CallbackComponentBase.

Definition at line 208 of file callback.h.


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