The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Namespaces | Macros
action_base.hpp File Reference

Base class for editor actions. More...

#include "editor/editor_common.hpp"
Include dependency graph for action_base.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  editor::editor_action
 Base class for all editor actions. More...
 
struct  editor::editor_action_exception
 

Namespaces

 editor
 Manage the empty-palette in the editor.
 

Macros

#define IMPLEMENT_ACTION(id)
 Helper macro to implement common action methods. More...
 

Detailed Description

Base class for editor actions.

An action is constructed in response to a user command, then executed on the map. An undo action is returned by default via pointer, caller-owned). It is possible to call an action without creating the undo action. Actions report failure via exceptions. Code that only deals with actions polymorphically should only need to include this header file.

Definition in file action_base.hpp.

Macro Definition Documentation

#define IMPLEMENT_ACTION (   id)
Value:
\
const std::string& editor_action_##id::get_name() const \
{ \
static const std::string name(#id); \
return name; \
} \
\
editor_action_##id* editor_action_##id::clone() const \
{ \
return new editor_action_##id(*this); \
} \
std::vector< char_t > string
static const char * name(const std::vector< SDL_Joystick * > &joysticks, const size_t index)
Definition: joystick.cpp:48

Helper macro to implement common action methods.

Definition at line 124 of file action_base.hpp.