The Battle for Wesnoth  1.17.6+dev
Public Member Functions | Private Member Functions | List of all members
game_events::event_filter Struct Referenceabstract

Represents a single filter condition on an event. More...

#include <handlers.hpp>

Inheritance diagram for game_events::event_filter:

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_filteroperator= (const event_filter &)=delete
 

Detailed Description

Represents a single filter condition on an event.

Definition at line 39 of file handlers.hpp.

Constructor & Destructor Documentation

◆ ~event_filter()

virtual game_events::event_filter::~event_filter ( )
virtualdefault

◆ event_filter() [1/2]

game_events::event_filter::event_filter ( )
default

◆ event_filter() [2/2]

game_events::event_filter::event_filter ( const event_filter )
privatedelete

Member Function Documentation

◆ can_serialize()

bool game_events::event_filter::can_serialize ( ) const
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 176 of file handlers.cpp.

Referenced by game_events::event_handler::write_config().

◆ operator()()

virtual bool game_events::event_filter::operator() ( const queued_event event_info) const
pure virtual

◆ operator=()

event_filter& game_events::event_filter::operator= ( const event_filter )
privatedelete

◆ serialize()

void game_events::event_filter::serialize ( config cfg) const
virtual

The documentation for this struct was generated from the following files: