The Battle for Wesnoth  1.17.6+dev
Public Member Functions | Private Attributes | List of all members
lua_event_filter Struct Reference
Inheritance diagram for lua_event_filter:

Public Member Functions

 lua_event_filter (game_lua_kernel &lk, int idx, const config &args)
 
bool operator() (const game_events::queued_event &event_info) const override
 Runs the filter and returns whether it passes on the given event. More...
 
 ~lua_event_filter ()
 
void serialize (config &cfg) const override
 Serializes the filter into a config, if possible. More...
 
- Public Member Functions inherited from game_events::event_filter
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 Attributes

game_lua_kernellk
 
int ref_
 
vconfig args_
 

Detailed Description

Definition at line 3697 of file game_lua_kernel.cpp.

Constructor & Destructor Documentation

◆ lua_event_filter()

lua_event_filter::lua_event_filter ( game_lua_kernel lk,
int  idx,
const config args 
)
inline

Definition at line 3699 of file game_lua_kernel.cpp.

References game_lua_kernel::save_wml_event().

◆ ~lua_event_filter()

lua_event_filter::~lua_event_filter ( )
inline

Definition at line 3708 of file game_lua_kernel.cpp.

Member Function Documentation

◆ operator()()

bool lua_event_filter::operator() ( const game_events::queued_event event_info) const
inlineoverridevirtual

Runs the filter and returns whether it passes on the given event.

Implements game_events::event_filter.

Definition at line 3703 of file game_lua_kernel.cpp.

◆ serialize()

void lua_event_filter::serialize ( config cfg) const
inlineoverridevirtual

Serializes the filter into a config, if possible.

Reimplemented from game_events::event_filter.

Definition at line 3712 of file game_lua_kernel.cpp.

References config::add_child().

Member Data Documentation

◆ args_

vconfig lua_event_filter::args_
private

Definition at line 3718 of file game_lua_kernel.cpp.

◆ lk

game_lua_kernel& lua_event_filter::lk
private

Definition at line 3716 of file game_lua_kernel.cpp.

◆ ref_

int lua_event_filter::ref_
private

Definition at line 3717 of file game_lua_kernel.cpp.


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