Public Member Functions | Private Member Functions | List of all members
karto::BasicEvent< TArgs > Class Template Reference

#include <Event.h>

Inheritance diagram for karto::BasicEvent< TArgs >:
Inheritance graph
[legend]

Public Member Functions

 BasicEvent ()
 
virtual ~BasicEvent ()
 
- Public Member Functions inherited from karto::AbstractEvent< TArgs >
 AbstractEvent ()
 
 AbstractEvent (const DefaultStrategy< TArgs > &rStrategy)
 
void Clear ()
 
void Disable ()
 
void Enable ()
 
kt_bool IsEmpty () const
 
kt_bool IsEnabled () const
 
void Notify (const void *pSender, TArgs &rArgs)
 
void operator() (const void *pSender, TArgs &args)
 
void operator+= (const AbstractDelegate< TArgs > &rDelegate)
 
void operator-= (const AbstractDelegate< TArgs > &rDelegate)
 
virtual ~AbstractEvent ()
 

Private Member Functions

 BasicEvent (const BasicEvent &e)
 
BasicEventoperator= (const BasicEvent &e)
 

Additional Inherited Members

- Protected Attributes inherited from karto::AbstractEvent< TArgs >
kt_bool m_Enabled
 
Mutex m_Mutex
 
DefaultStrategy< TArgs > m_Strategy
 

Detailed Description

template<class TArgs>
class karto::BasicEvent< TArgs >

A BasicEvent uses internally a DefaultStrategy which invokes delegates in an arbitrary manner. Note that an object can only register one method to a BasicEvent. Subsequent registrations will overwrite the existing delegate.

BasicEvent<int> event;
MyClass myObject;
event += karto::delegate(&myObject, &MyClass::myMethod1);
event += karto::delegate(&myObject, &MyClass::myMethod2);

The second registration will overwrite the first one. The reason is simply that function pointers can only be compared by equality but not by lower than.

Definition at line 990 of file Event.h.

Constructor & Destructor Documentation

template<class TArgs>
karto::BasicEvent< TArgs >::BasicEvent ( )
inline

Definition at line 993 of file Event.h.

template<class TArgs>
virtual karto::BasicEvent< TArgs >::~BasicEvent ( )
inlinevirtual

Definition at line 997 of file Event.h.

template<class TArgs>
karto::BasicEvent< TArgs >::BasicEvent ( const BasicEvent< TArgs > &  e)
private

Member Function Documentation

template<class TArgs>
BasicEvent& karto::BasicEvent< TArgs >::operator= ( const BasicEvent< TArgs > &  e)
private

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


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Tue Nov 7 2017 06:02:36