Public Member Functions | |
filter_formula (const std::string &formula) | |
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 | |
wfl::formula | formula_ |
Definition at line 290 of file handlers.cpp.
|
inline |
Definition at line 291 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 308 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 292 of file handlers.cpp.
References wfl::variant::as_bool(), data, wfl::formula::evaluate(), and formula_.
|
inlineoverridevirtual |
Serializes the filter into a config, if possible.
Reimplemented from game_events::event_filter.
Definition at line 299 of file handlers.cpp.
References formula_, config::has_attribute(), and wfl::formula::str().
|
private |
Definition at line 313 of file handlers.cpp.
Referenced by operator()(), and serialize().