The Battle for Wesnoth  1.15.1+dev
Public Member Functions | List of all members
gui2::event::event_in_set Class Reference

Helper class to do a runtime test whether an event is in a set. More...

Public Member Functions

template<class T >
bool oper (ui_event)
 If found we get executed to set the result. More...
 

Detailed Description

Helper class to do a runtime test whether an event is in a set.

The class is supposed to be used in combination with find function. This function is used in the fire functions to make sure an event is send to the proper handler. If not there will be a run-time assertion failure. This makes developing and testing the code easier, a wrong handler terminates Wesnoth instead of silently not working.

Definition at line 115 of file dispatcher.cpp.

Member Function Documentation

◆ oper()

template<class T >
bool gui2::event::event_in_set::oper ( ui_event  )
inline

If found we get executed to set the result.

Since we need to return true if found we always return true.

Definition at line 124 of file dispatcher.cpp.


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