AGX Dynamics 2.42.3.0
Loading...
Searching...
No Matches
agx::Callback2< T1, T2 > Class Template Reference

Templated callback with two arguments. More...

#include <Callback.h>

Public Types

typedef std::function< void(T1, T2)> CallbackFunction
 

Public Member Functions

 Callback2 ()
 
 Callback2 (const CallbackFunction &func, bool repeatEnable=true)
 
template<class ClassT >
 Callback2 (void(ClassT::*fun)(), ClassT *obj, bool repeatEnable=true)
 
template<class ClassT >
 Callback2 (void(ClassT::*fun)(T1), ClassT *obj, bool repeatEnable=true)
 
template<class ClassT >
 Callback2 (void(ClassT::*fun)(T1, T2), ClassT *obj, bool repeatEnable=true)
 
const CallbackFunction & implementation () const
 Return the std representation.
 
bool isRepeating () const
 
bool isValid () const
 
 operator const CallbackFunction & () const
 
void operator() (T1 arg1, T2 arg2) const
 Execute the callback.
 
void run (T1 arg1, T2 arg2) const
 

Detailed Description

template<typename T1, typename T2>
class agx::Callback2< T1, T2 >

Templated callback with two arguments.

Definition at line 139 of file Callback.h.

Member Typedef Documentation

◆ CallbackFunction

template<typename T1 , typename T2 >
typedef std::function<void (T1, T2)> agx::Callback2< T1, T2 >::CallbackFunction

Definition at line 142 of file Callback.h.

Constructor & Destructor Documentation

◆ Callback2() [1/5]

template<typename T1 , typename T2 >
agx::Callback2< T1, T2 >::Callback2

Definition at line 337 of file Callback.h.

◆ Callback2() [2/5]

template<typename T1 , typename T2 >
agx::Callback2< T1, T2 >::Callback2 ( const CallbackFunction &  func,
bool  repeatEnable = true 
)

Definition at line 339 of file Callback.h.

◆ Callback2() [3/5]

template<typename T1 , typename T2 >
template<class ClassT >
agx::Callback2< T1, T2 >::Callback2 ( void(ClassT::*)(T1, T2)  fun,
ClassT *  obj,
bool  repeatEnable = true 
)

Definition at line 327 of file Callback.h.

◆ Callback2() [4/5]

template<typename T1 , typename T2 >
template<class ClassT >
agx::Callback2< T1, T2 >::Callback2 ( void(ClassT::*)(T1)  fun,
ClassT *  obj,
bool  repeatEnable = true 
)

Definition at line 331 of file Callback.h.

◆ Callback2() [5/5]

template<typename T1 , typename T2 >
template<class ClassT >
agx::Callback2< T1, T2 >::Callback2 ( void(ClassT::*)()  fun,
ClassT *  obj,
bool  repeatEnable = true 
)

Definition at line 334 of file Callback.h.

Member Function Documentation

◆ implementation()

template<typename T1 , typename T2 >
const Callback2< T1, T2 >::CallbackFunction & agx::Callback2< T1, T2 >::implementation

Return the std representation.

Definition at line 352 of file Callback.h.

◆ isRepeating()

template<typename T1 , typename T2 >
bool agx::Callback2< T1, T2 >::isRepeating
Returns
True if the callback is repeating (when added to an agx::Event)

Definition at line 355 of file Callback.h.

Referenced by agx::Event2< T1, T2 >::trigger().

◆ isValid()

template<typename T1 , typename T2 >
bool agx::Callback2< T1, T2 >::isValid
Returns
True if the callback is non-void

Definition at line 361 of file Callback.h.

◆ operator const CallbackFunction &()

template<typename T1 , typename T2 >
agx::Callback2< T1, T2 >::operator const CallbackFunction & ( ) const

◆ operator()()

template<typename T1 , typename T2 >
void agx::Callback2< T1, T2 >::operator() ( T1  arg1,
T2  arg2 
) const

Execute the callback.

Definition at line 342 of file Callback.h.

◆ run()

template<typename T1 , typename T2 >
void agx::Callback2< T1, T2 >::run ( T1  arg1,
T2  arg2 
) const

Definition at line 345 of file Callback.h.

References agxAssert.

Referenced by agx::Event2< T1, T2 >::trigger().


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