AGXDynamics  2.31.1.0
agx::Event1< T1 > Class Template Reference

An event with one argument. More...

#include <Event.h>

+ Inheritance diagram for agx::Event1< T1 >:

Public Types

typedef VectorPOD< const CallbackType * > CallbackPtrVector
 
typedef Callback1< T1 > CallbackType
 

Public Member Functions

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

Protected Attributes

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

Detailed Description

template<typename T1>
class agx::Event1< T1 >

An event with one argument.

Definition at line 102 of file Event.h.

Member Typedef Documentation

◆ CallbackPtrVector

typedef VectorPOD< const CallbackType * > agx::EventT< Callback1< T1 > >::CallbackPtrVector
inherited

Definition at line 38 of file Event.h.

◆ CallbackType

typedef Callback1< T1 > agx::EventT< Callback1< T1 > >::CallbackType
inherited

Definition at line 37 of file Event.h.

Constructor & Destructor Documentation

◆ Event1()

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

Definition at line 253 of file Event.h.

Member Function Documentation

◆ addCallback()

void agx::EventT< Callback1< T1 > >::addCallback ( const Callback1< T1 > *  callback)
inherited

Add a callback to the event.

Definition at line 172 of file Event.h.

◆ addCallbackFirst()

void agx::EventT< Callback1< T1 > >::addCallbackFirst ( const Callback1< T1 > *  callback)
inherited

Add a callback to the front of the callback list.

Definition at line 190 of file Event.h.

◆ containsCallback()

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

Definition at line 223 of file Event.h.

◆ getCallbacks()

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

Definition at line 220 of file Event.h.

◆ getName()

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

Definition at line 169 of file Event.h.

◆ removeAllCallbacks()

void agx::EventT< Callback1< T1 > >::removeAllCallbacks ( )
inherited

Remove all callbacks.

Definition at line 217 of file Event.h.

◆ removeCallback()

bool agx::EventT< Callback1< T1 > >::removeCallback ( const Callback1< T1 > *  callback)
inherited

Definition at line 199 of file Event.h.

◆ trigger() [1/2]

template<typename T1 >
void agx::Event1< T1 >::trigger ( )

Trigger the event with the default argument.

Definition at line 256 of file Event.h.

◆ trigger() [2/2]

template<typename T1>
void agx::Event1< T1 >::trigger ( const T1 &  arg)

Trigger the event.

Definition at line 262 of file Event.h.

Member Data Documentation

◆ m_activeThread

Thread* agx::EventT< Callback1< T1 > >::m_activeThread
protectedinherited

Definition at line 82 of file Event.h.

◆ m_callbacks

CallbackPtrVector agx::EventT< Callback1< T1 > >::m_callbacks
protectedinherited

Definition at line 80 of file Event.h.

◆ m_iterationIndex

agx::UInt32 agx::EventT< Callback1< T1 > >::m_iterationIndex
protectedinherited

Definition at line 83 of file Event.h.

◆ m_name

Name agx::EventT< Callback1< T1 > >::m_name
protectedinherited

Definition at line 81 of file Event.h.


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