AGXDynamics  2.31.1.0
agx::Event2< T1, T2 > Class Template Reference

An event with two arguments. More...

#include <Event.h>

+ Inheritance diagram for agx::Event2< T1, T2 >:

Public Types

typedef VectorPOD< const CallbackType * > CallbackPtrVector
 
typedef Callback2< T1, T2 > CallbackType
 

Public Member Functions

 Event2 (const agx::Name &name=agx::Name(), const T1 &defaultArg=T1())
 
void addCallback (const Callback2< T1, T2 > *callback)
 Add a callback to the event. More...
 
void addCallbackFirst (const Callback2< T1, T2 > *callback)
 Add a callback to the front of the callback list. More...
 
bool containsCallback (const Callback2< T1, T2 > *callback) const
 
const CallbackPtrVector & getCallbacks () const
 
const agx::Name & getName () const
 
void removeAllCallbacks ()
 Remove all callbacks. More...
 
bool removeCallback (const Callback2< T1, T2 > *callback)
 
void trigger (const T2 &arg2)
 Trigger the event with default first argument. More...
 
void trigger (const T1 &arg1, const T2 &arg2)
 Trigger the event. More...
 

Protected Attributes

Thread * m_activeThread
 
CallbackPtrVector m_callbacks
 
agx::UInt32 m_iterationIndex
 
Name m_name
 

Detailed Description

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

An event with two arguments.

Definition at line 121 of file Event.h.

Member Typedef Documentation

◆ CallbackPtrVector

typedef VectorPOD< const CallbackType * > agx::EventT< Callback2< T1, T2 > >::CallbackPtrVector
inherited

Definition at line 38 of file Event.h.

◆ CallbackType

typedef Callback2< T1, T2 > agx::EventT< Callback2< T1, T2 > >::CallbackType
inherited

Definition at line 37 of file Event.h.

Constructor & Destructor Documentation

◆ Event2()

template<typename T1, typename T2 >
agx::Event2< T1, T2 >::Event2 ( const agx::Name &  name = agx::Name(),
const T1 &  defaultArg = T1() 
)

Definition at line 283 of file Event.h.

Member Function Documentation

◆ addCallback()

void agx::EventT< Callback2< T1, T2 > >::addCallback ( const Callback2< T1, T2 > *  callback)
inherited

Add a callback to the event.

Definition at line 172 of file Event.h.

◆ addCallbackFirst()

void agx::EventT< Callback2< T1, T2 > >::addCallbackFirst ( const Callback2< T1, T2 > *  callback)
inherited

Add a callback to the front of the callback list.

Definition at line 190 of file Event.h.

◆ containsCallback()

bool agx::EventT< Callback2< T1, T2 > >::containsCallback ( const Callback2< T1, T2 > *  callback) const
inherited
Returns
True if the callback is registered with this event.

Definition at line 223 of file Event.h.

◆ getCallbacks()

const EventT< Callback2< T1, T2 > >::CallbackPtrVector & agx::EventT< Callback2< T1, T2 > >::getCallbacks ( ) const
inherited
Returns
The list of registered callbacks.

Definition at line 220 of file Event.h.

◆ getName()

const Name & agx::EventT< Callback2< T1, T2 > >::getName ( ) const
inherited
Returns
The name of the event.

Definition at line 169 of file Event.h.

◆ removeAllCallbacks()

void agx::EventT< Callback2< T1, T2 > >::removeAllCallbacks ( )
inherited

Remove all callbacks.

Definition at line 217 of file Event.h.

◆ removeCallback()

bool agx::EventT< Callback2< T1, T2 > >::removeCallback ( const Callback2< T1, T2 > *  callback)
inherited

Definition at line 199 of file Event.h.

◆ trigger() [1/2]

template<typename T1 , typename T2>
void agx::Event2< T1, T2 >::trigger ( const T2 &  arg2)

Trigger the event with default first argument.

Definition at line 286 of file Event.h.

◆ trigger() [2/2]

template<typename T1, typename T2>
void agx::Event2< T1, T2 >::trigger ( const T1 &  arg1,
const T2 &  arg2 
)

Trigger the event.

Definition at line 293 of file Event.h.

Member Data Documentation

◆ m_activeThread

Thread* agx::EventT< Callback2< T1, T2 > >::m_activeThread
protectedinherited

Definition at line 82 of file Event.h.

◆ m_callbacks

CallbackPtrVector agx::EventT< Callback2< T1, T2 > >::m_callbacks
protectedinherited

Definition at line 80 of file Event.h.

◆ m_iterationIndex

agx::UInt32 agx::EventT< Callback2< T1, T2 > >::m_iterationIndex
protectedinherited

Definition at line 83 of file Event.h.

◆ m_name

Name agx::EventT< Callback2< T1, T2 > >::m_name
protectedinherited

Definition at line 81 of file Event.h.


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