This is a dynamic wrapper for any filter type, specified via [insert_tag]. More...
Public Member Functions | |
filter_dynamic (const std::string &tag, const std::string &var) | |
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... | |
![]() | |
virtual | ~event_filter ()=default |
event_filter ()=default | |
Private Attributes | |
std::string | tag_ |
std::string | var_ |
This is a dynamic wrapper for any filter type, specified via [insert_tag].
It loads the filter contents from a variable and forwards it to the appropriate filter class.
Definition at line 312 of file handlers.cpp.
|
inline |
Definition at line 313 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 329 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 314 of file handlers.cpp.
References variable_info< V >::as_container(), variable_info< V >::exists_as_container(), resources::gamedata, and game_events::make_filter().
|
inlineoverridevirtual |
Serializes the filter into a config, if possible.
Reimplemented from game_events::event_filter.
Definition at line 323 of file handlers.cpp.
References config::add_child().
|
private |
Definition at line 334 of file handlers.cpp.
|
private |
Definition at line 334 of file handlers.cpp.