GlPortal Class Reference  0.1.1
Source code documentation of the free and open 3D action puzzle game.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Data Structures | Public Types | Public Member Functions | Private Attributes
radix::EventDispatcher Class Reference

#include <external/RadixEngine/include/radix/core/event/EventDispatcher.hpp>

Data Structures

class  CallbackHolder
 

Public Types

using Callback = std::function< void(const Event &)>
 
using CallbackList = std::list< Callback >
 
using ObserverMap = std::unordered_map< EventType, CallbackList >
 
using CallbackPointer = std::pair< EventType, CallbackList::iterator >
 

Public Member Functions

 EventDispatcher ()
 
CallbackHolder addObserver (EventType type, const Callback &method)
 
CallbackPointer addObserverRaw (EventType type, const Callback &method)
 
void removeObserver (const CallbackPointer &ptr)
 
template<class... CPTypes>
void removeObserver (CallbackPointer cb0, const CPTypes &...cbN)
 
CallbackHolder observeWildcard (const Callback &method)
 
CallbackPointer observeWildcardRaw (const Callback &method)
 
void unobserveWildcard (const CallbackPointer &ptr)
 
void dispatch (const Event &event)
 

Private Attributes

ObserverMap observerMap
 
CallbackList wildcardObservers
 

Member Typedef Documentation

using radix::EventDispatcher::Callback = std::function<void(const Event&)>
using radix::EventDispatcher::CallbackPointer = std::pair<EventType, CallbackList::iterator>

Constructor & Destructor Documentation

radix::EventDispatcher::EventDispatcher ( )

Member Function Documentation

EventDispatcher::CallbackHolder radix::EventDispatcher::addObserver ( EventType  type,
const Callback &  method 
)
EventDispatcher::CallbackPointer radix::EventDispatcher::addObserverRaw ( EventType  type,
const Callback &  method 
)
void radix::EventDispatcher::dispatch ( const Event &  event)
EventDispatcher::CallbackHolder radix::EventDispatcher::observeWildcard ( const Callback &  method)
EventDispatcher::CallbackPointer radix::EventDispatcher::observeWildcardRaw ( const Callback &  method)
void radix::EventDispatcher::removeObserver ( const CallbackPointer &  ptr)
template<class... CPTypes>
void radix::EventDispatcher::removeObserver ( CallbackPointer  cb0,
const CPTypes &...  cbN 
)
inline
void radix::EventDispatcher::unobserveWildcard ( const CallbackPointer &  ptr)

Field Documentation

ObserverMap radix::EventDispatcher::observerMap
private
CallbackList radix::EventDispatcher::wildcardObservers
private

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