Represents a single filter condition on an event. More...
#include <handlers.hpp>
Public Member Functions | |
virtual bool | operator() (const queued_event &event_info) const =0 |
Runs the filter and returns whether it passes on the given event. More... | |
virtual void | serialize (config &cfg) const |
Serializes the filter into a config, if possible. More... | |
virtual bool | can_serialize () const |
Returns true if it is possible to serialize the filter into a config. More... | |
virtual | ~event_filter ()=default |
event_filter ()=default | |
Private Member Functions | |
event_filter (const event_filter &)=delete | |
event_filter & | operator= (const event_filter &)=delete |
Represents a single filter condition on an event.
Definition at line 38 of file handlers.hpp.
|
virtualdefault |
|
default |
|
privatedelete |
|
virtual |
Returns true if it is possible to serialize the filter into a config.
Reimplemented in game_events::filter_dynamic, game_events::filter_formula, game_events::filter_attack, game_events::filter_unit, game_events::filter_side, and game_events::filter_condition.
Definition at line 183 of file handlers.cpp.
Referenced by game_events::event_handler::write_config().
|
pure virtual |
Runs the filter and returns whether it passes on the given event.
Implemented in game_events::filter_dynamic, game_events::filter_formula, game_events::filter_attack, game_events::filter_unit, game_events::filter_side, game_events::filter_condition, and lua_event_filter.
|
privatedelete |
|
virtual |
Serializes the filter into a config, if possible.
Reimplemented in lua_event_filter, game_events::filter_dynamic, game_events::filter_formula, game_events::filter_attack, game_events::filter_unit, game_events::filter_side, and game_events::filter_condition.
Definition at line 178 of file handlers.cpp.
References WRN_NG.