The Battle for Wesnoth  1.19.7+dev
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
actions::undo_event Class Reference

#include <undo_action.hpp>

Inheritance diagram for actions::undo_event:

Public Member Functions

 undo_event (int fcn_idx, const config &args, const game_events::queued_event &ctx)
 
 undo_event (const config &cmds, const game_events::queued_event &ctx)
 
 undo_event (const config &cfg)
 
virtual bool undo (int side)
 Undoes this action. More...
 
virtual void write (config &cfg) const
 Writes this into the provided config. More...
 
virtual const char * get_type () const
 
- Public Member Functions inherited from actions::undo_action
 undo_action ()
 
virtual ~undo_action ()
 

Static Public Member Functions

static const char * get_type_impl ()
 

Private Member Functions

 undo_event (const config &first, const config &second, const config &weapons, const config &cmds)
 

Private Attributes

utils::optional< int > lua_idx
 
config commands
 
config data
 
map_location loc1
 
map_location loc2
 
map_location filter_loc1
 
map_location filter_loc2
 
std::size_t uid1
 
std::size_t uid2
 
std::string id1
 
std::string id2
 

Detailed Description

Definition at line 98 of file undo_action.hpp.

Constructor & Destructor Documentation

◆ undo_event() [1/4]

actions::undo_event::undo_event ( int  fcn_idx,
const config args,
const game_events::queued_event ctx 
)

◆ undo_event() [2/4]

actions::undo_event::undo_event ( const config cmds,
const game_events::queued_event ctx 
)

◆ undo_event() [3/4]

actions::undo_event::undo_event ( const config cfg)

Definition at line 145 of file undo_action.cpp.

◆ undo_event() [4/4]

actions::undo_event::undo_event ( const config first,
const config second,
const config weapons,
const config cmds 
)
private

Definition at line 131 of file undo_action.cpp.

Member Function Documentation

◆ get_type()

virtual const char* actions::undo_event::get_type ( ) const
inlinevirtual

Implements actions::undo_action.

Definition at line 112 of file undo_action.hpp.

References get_type_impl().

◆ get_type_impl()

static const char* actions::undo_event::get_type_impl ( )
inlinestatic

Definition at line 111 of file undo_action.hpp.

Referenced by get_type().

◆ undo()

bool actions::undo_event::undo ( int  side)
virtual

◆ write()

void actions::undo_event::write ( config cfg) const
virtual

Writes this into the provided config.

Reimplemented from actions::undo_action.

Definition at line 209 of file undo_action.cpp.

References config::add_child(), and actions::undo_action::write().

Member Data Documentation

◆ commands

config actions::undo_event::commands
private

Definition at line 118 of file undo_action.hpp.

◆ data

config actions::undo_event::data
private

Definition at line 118 of file undo_action.hpp.

◆ filter_loc1

map_location actions::undo_event::filter_loc1
private

Definition at line 119 of file undo_action.hpp.

◆ filter_loc2

map_location actions::undo_event::filter_loc2
private

Definition at line 119 of file undo_action.hpp.

◆ id1

std::string actions::undo_event::id1
private

Definition at line 121 of file undo_action.hpp.

Referenced by undo_event().

◆ id2

std::string actions::undo_event::id2
private

Definition at line 121 of file undo_action.hpp.

Referenced by undo_event().

◆ loc1

map_location actions::undo_event::loc1
private

Definition at line 119 of file undo_action.hpp.

◆ loc2

map_location actions::undo_event::loc2
private

Definition at line 119 of file undo_action.hpp.

◆ lua_idx

utils::optional<int> actions::undo_event::lua_idx
private

Definition at line 117 of file undo_action.hpp.

◆ uid1

std::size_t actions::undo_event::uid1
private

Definition at line 120 of file undo_action.hpp.

Referenced by undo_event().

◆ uid2

std::size_t actions::undo_event::uid2
private

Definition at line 120 of file undo_action.hpp.

Referenced by undo_event().


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