The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
gui2::event::tdispatcher_implementation::thas_handler Class Reference

A helper class to find out whether dispatcher has an handler for a certain event. More...

#include <dispatcher_private.hpp>

Public Member Functions

 thas_handler (const tdispatcher::tevent_type event_type, tdispatcher &dispatcher)
 Constructor. More...
 
template<class T >
bool oper (tevent event)
 Tests whether a handler for an event is available. More...
 

Private Attributes

tdispatcher::tevent_type event_type_
 
tdispatcherdispatcher_
 

Detailed Description

A helper class to find out whether dispatcher has an handler for a certain event.

Definition at line 120 of file dispatcher_private.hpp.

Constructor & Destructor Documentation

gui2::event::tdispatcher_implementation::thas_handler::thas_handler ( const tdispatcher::tevent_type  event_type,
tdispatcher dispatcher 
)
inline

Constructor.

Parameters
event_typeThe type of event to look for.
dispatcherThe dispatcher whose signal queue is used.

Definition at line 129 of file dispatcher_private.hpp.

Member Function Documentation

template<class T >
bool gui2::event::tdispatcher_implementation::thas_handler::oper ( tevent  event)
inline

Tests whether a handler for an event is available.

It tests for both the event and the event_type send in the constructor.

Template Parameters
TA key from an event set used to instantiate the proper event_signal function.
Parameters
eventThe event to get the signal for.
Returns
Whether or not the handler is found.

Definition at line 149 of file dispatcher_private.hpp.

References gui2::event::tdispatcher::child, dispatcher_, event_type_, gui2::event::tdispatcher::post, and gui2::event::tdispatcher::pre.

Member Data Documentation

tdispatcher& gui2::event::tdispatcher_implementation::thas_handler::dispatcher_
private

Definition at line 168 of file dispatcher_private.hpp.

Referenced by oper().

tdispatcher::tevent_type gui2::event::tdispatcher_implementation::thas_handler::event_type_
private

Definition at line 167 of file dispatcher_private.hpp.

Referenced by oper().


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