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

Implementations of action WML tags, other than those implemented in Lua, and excluding conditional action WML. More...

#include "game_events/action_wml.hpp"
#include "game_events/conditional_wml.hpp"
#include "game_events/pump.hpp"
#include "actions/attack.hpp"
#include "actions/create.hpp"
#include "actions/move.hpp"
#include "actions/vision.hpp"
#include "ai/manager.hpp"
#include "fake_unit_ptr.hpp"
#include "filesystem.hpp"
#include "game_classification.hpp"
#include "game_display.hpp"
#include "preferences/game.hpp"
#include "gettext.hpp"
#include "gui/dialogs/transient_message.hpp"
#include "gui/widgets/window.hpp"
#include "log.hpp"
#include "map/map.hpp"
#include "map/exception.hpp"
#include "map/label.hpp"
#include "pathfind/teleport.hpp"
#include "pathfind/pathfind.hpp"
#include "persist_var.hpp"
#include "play_controller.hpp"
#include "recall_list_manager.hpp"
#include "replay.hpp"
#include "random.hpp"
#include "mouse_handler_base.hpp"
#include "resources.hpp"
#include "scripting/game_lua_kernel.hpp"
#include "side_filter.hpp"
#include "sound.hpp"
#include "soundsource.hpp"
#include "synced_context.hpp"
#include "synced_user_choice.hpp"
#include "team.hpp"
#include "terrain/filter.hpp"
#include "units/unit.hpp"
#include "units/animation_component.hpp"
#include "units/udisplay.hpp"
#include "units/filter.hpp"
#include "wml_exception.hpp"
#include "whiteboard/manager.hpp"
#include <boost/regex.hpp>
Include dependency graph for action_wml.cpp:

Go to the source code of this file.

Namespaces

 game_events
 Domain specific events.
 

Macros

#define DBG_NG   LOG_STREAM(debug, log_engine)
 
#define LOG_NG   LOG_STREAM(info, log_engine)
 
#define WRN_NG   LOG_STREAM(warn, log_engine)
 
#define ERR_NG   LOG_STREAM(err, log_engine)
 
#define DBG_DP   LOG_STREAM(debug, log_display)
 
#define LOG_DP   LOG_STREAM(info, log_display)
 
#define LOG_WML   LOG_STREAM(info, log_wml)
 
#define WRN_WML   LOG_STREAM(warn, log_wml)
 
#define ERR_WML   LOG_STREAM(err, log_wml)
 
#define ERR_CF   LOG_STREAM(err, log_config)
 
#define WML_HANDLER_FUNCTION(pname, pei, pcfg)
 WML_HANDLER_FUNCTION macro handles auto registration for wml handlers. More...
 

Functions

 game_events::WML_HANDLER_FUNCTION (clear_global_variable,, pcfg)
 Experimental data persistence. More...
 
static void game_events::on_replay_error (const std::string &message, bool)
 
 game_events::WML_HANDLER_FUNCTION (do_command,, cfg)
 
 game_events::WML_HANDLER_FUNCTION (get_global_variable,, pcfg)
 Experimental data persistence. More...
 
 game_events::WML_HANDLER_FUNCTION (modify_turns,, cfg)
 
 game_events::WML_HANDLER_FUNCTION (move_unit_fake,, cfg)
 Moving a 'unit' - i.e. More...
 
 game_events::WML_HANDLER_FUNCTION (move_units_fake,, cfg)
 
 game_events::WML_HANDLER_FUNCTION (recall,, cfg)
 If we should recall units that match a certain description. More...
 
 game_events::WML_HANDLER_FUNCTION (replace_map,, cfg)
 Experimental map replace. More...
 
 game_events::WML_HANDLER_FUNCTION (set_global_variable,, pcfg)
 Experimental data persistence. More...
 
 game_events::WML_HANDLER_FUNCTION (set_variables,, cfg)
 
 game_events::WML_HANDLER_FUNCTION (store_relative_direction,, cfg)
 Store the relative direction from one hex to another in a WML variable. More...
 
 game_events::WML_HANDLER_FUNCTION (store_rotate_map_location,, cfg)
 Store the rotation of one hex around another in a WML variable. More...
 
 game_events::WML_HANDLER_FUNCTION (store_time_of_day,, cfg)
 Store time of day config in a WML variable. More...
 
 game_events::WML_HANDLER_FUNCTION (terrain_mask,, cfg)
 Creating a mask of the terrain. More...
 
 game_events::WML_HANDLER_FUNCTION (tunnel,, cfg)
 
 game_events::WML_HANDLER_FUNCTION (unit,, cfg)
 If we should spawn a new unit on the map somewhere. More...
 
 game_events::WML_HANDLER_FUNCTION (on_undo, event_info, cfg)
 
 game_events::WML_HANDLER_FUNCTION (on_redo,,)
 

Variables

static lg::log_domain log_engine ("engine")
 
static lg::log_domain log_display ("display")
 
static lg::log_domain log_wml ("wml")
 
static lg::log_domain log_config ("config")
 

Detailed Description

Implementations of action WML tags, other than those implemented in Lua, and excluding conditional action WML.

Definition in file action_wml.cpp.

Macro Definition Documentation

#define DBG_DP   LOG_STREAM(debug, log_display)

Definition at line 75 of file action_wml.cpp.

#define DBG_NG   LOG_STREAM(debug, log_engine)

Definition at line 69 of file action_wml.cpp.

Referenced by game_events::WML_HANDLER_FUNCTION().

#define ERR_CF   LOG_STREAM(err, log_config)

Definition at line 84 of file action_wml.cpp.

#define ERR_NG   LOG_STREAM(err, log_engine)
#define ERR_WML   LOG_STREAM(err, log_wml)

Definition at line 81 of file action_wml.cpp.

Referenced by game_events::WML_HANDLER_FUNCTION().

#define LOG_DP   LOG_STREAM(info, log_display)

Definition at line 76 of file action_wml.cpp.

#define LOG_NG   LOG_STREAM(info, log_engine)

Definition at line 70 of file action_wml.cpp.

Referenced by game_events::WML_HANDLER_FUNCTION().

#define LOG_WML   LOG_STREAM(info, log_wml)

Definition at line 79 of file action_wml.cpp.

Referenced by game_events::WML_HANDLER_FUNCTION().

#define WML_HANDLER_FUNCTION (   pname,
  pei,
  pcfg 
)
Value:
static void wml_func_##pname(const queued_event &pei, const vconfig &pcfg); \
static wml_action wml_action_##pname(#pname, &wml_func_##pname); \
static void wml_func_##pname(const queued_event& pei, const vconfig& pcfg)
A variable-expanding proxy for the config class.
Definition: variable.hpp:42

WML_HANDLER_FUNCTION macro handles auto registration for wml handlers.

Parameters
pnamewml tag name
peithe variable name of the queued_event object inside the function
pcfgthe variable name of the config object inside the function

You are warned! This is evil macro magic!

The following code registers a [foo] tag:

1 // comment out unused parameters to prevent compiler warnings
2 WML_HANDLER_FUNCTION(foo, event_info, cfg)
3 {
4  // code for foo
5 }

Generated code looks like this:

1 void wml_func_foo(...);
2 static wml_action wml_action_foo("foo", &wml_func_foo);
3 void wml_func_foo(...)
4 {
5  // code for foo
6 }

Definition at line 251 of file action_wml.cpp.

#define WRN_NG   LOG_STREAM(warn, log_engine)

Definition at line 71 of file action_wml.cpp.

Referenced by game_events::WML_HANDLER_FUNCTION().

#define WRN_WML   LOG_STREAM(warn, log_wml)

Definition at line 80 of file action_wml.cpp.

Variable Documentation

std::string filename_
lg::log_domain log_config("config")
static
lg::log_domain log_display("display")
static
lg::log_domain log_engine("engine")
static
lg::log_domain log_wml("wml")
static