The Battle for Wesnoth  1.19.7+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 4179 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 4181 of file game_lua_kernel.cpp.

References lk, ref_, and game_lua_kernel::save_wml_event().

◆ ~lua_event_filter()

lua_event_filter::~lua_event_filter ( )
inline

Definition at line 4190 of file game_lua_kernel.cpp.

References game_lua_kernel::clear_wml_event(), lk, and ref_.

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 4185 of file game_lua_kernel.cpp.

References args_, lk, ref_, and game_lua_kernel::run_wml_event().

◆ 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 4194 of file game_lua_kernel.cpp.

References config::add_child().

Member Data Documentation

◆ args_

vconfig lua_event_filter::args_
private

Definition at line 4200 of file game_lua_kernel.cpp.

Referenced by operator()().

◆ lk

game_lua_kernel& lua_event_filter::lk
private

Definition at line 4198 of file game_lua_kernel.cpp.

Referenced by lua_event_filter(), operator()(), and ~lua_event_filter().

◆ ref_

int lua_event_filter::ref_
private

Definition at line 4199 of file game_lua_kernel.cpp.

Referenced by lua_event_filter(), operator()(), and ~lua_event_filter().


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