Public Member Functions | |
filter_unit (const vconfig &cfg, bool first) | |
bool | operator() (const queued_event &event_info) const override |
Runs the filter and returns whether it passes on the given event. More... | |
void | serialize (config &cfg) const override |
Serializes the filter into a config, if possible. More... | |
bool | can_serialize () const override |
Returns true if it is possible to serialize the filter into a config. More... | |
Public Member Functions inherited from game_events::event_filter | |
virtual | ~event_filter ()=default |
event_filter ()=default | |
Private Attributes | |
unit_filter | suf_ |
bool | first_ |
Definition at line 224 of file handlers.cpp.
|
inline |
Definition at line 225 of file handlers.cpp.
|
inlineoverridevirtual |
Returns true if it is possible to serialize the filter into a config.
Reimplemented from game_events::event_filter.
Definition at line 236 of file handlers.cpp.
|
inlineoverridevirtual |
Runs the filter and returns whether it passes on the given event.
Implements game_events::event_filter.
Definition at line 226 of file handlers.cpp.
References unit_map::find(), first_, resources::gameboard, game_events::queued_event::loc1, game_events::queued_event::loc2, suf_, and game_board::units().
|
inlineoverridevirtual |
Serializes the filter into a config, if possible.
Reimplemented from game_events::event_filter.
Definition at line 232 of file handlers.cpp.
References config::add_child(), first_, suf_, and unit_filter::to_config().
|
private |
Definition at line 242 of file handlers.cpp.
Referenced by operator()(), and serialize().
|
private |
Definition at line 241 of file handlers.cpp.
Referenced by operator()(), and serialize().