The Battle for Wesnoth  1.17.10+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

int ref_
vconfig args_

Detailed Description

Definition at line 3695 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 

Definition at line 3697 of file game_lua_kernel.cpp.

References game_lua_kernel::save_wml_event().

◆ ~lua_event_filter()

lua_event_filter::~lua_event_filter ( )

Definition at line 3706 of file game_lua_kernel.cpp.

Member Function Documentation

◆ operator()()

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

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

Implements game_events::event_filter.

Definition at line 3701 of file game_lua_kernel.cpp.

◆ serialize()

void lua_event_filter::serialize ( config cfg) const

Serializes the filter into a config, if possible.

Reimplemented from game_events::event_filter.

Definition at line 3710 of file game_lua_kernel.cpp.

References config::add_child().

Member Data Documentation

◆ args_

vconfig lua_event_filter::args_

Definition at line 3716 of file game_lua_kernel.cpp.

◆ lk

game_lua_kernel& lua_event_filter::lk

Definition at line 3714 of file game_lua_kernel.cpp.

◆ ref_

int lua_event_filter::ref_

Definition at line 3715 of file game_lua_kernel.cpp.

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