The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Static Public Member Functions | Static Private Attributes | List of all members
game_events::wml_action Class Reference

#include <action_wml.hpp>

Public Types

typedef void(* handler )(const queued_event &, const vconfig &)
 
typedef std::map< std::string,
handler
map
 

Public Member Functions

 wml_action (const std::string &tag, handler function)
 Using this constructor for a static object outside action_wml.cpp will likely lead to a static initialization fiasco. More...
 

Static Public Member Functions

static map::const_iterator begin ()
 The first registered action. More...
 
static map::const_iterator end ()
 One past the last registered action. More...
 
static const mapregistry ()
 

Static Private Attributes

static map registry_
 Tracks the known action handlers. More...
 

Detailed Description

Definition at line 49 of file action_wml.hpp.

Member Typedef Documentation

typedef void(* game_events::wml_action::handler)(const queued_event &, const vconfig &)

Definition at line 51 of file action_wml.hpp.

Definition at line 52 of file action_wml.hpp.

Constructor & Destructor Documentation

game_events::wml_action::wml_action ( const std::string tag,
handler  function 
)

Using this constructor for a static object outside action_wml.cpp will likely lead to a static initialization fiasco.

Parameters
[in]tagThe WML tag for this action.
[in]functionThe callback for this action.

Definition at line 215 of file action_wml.cpp.

References registry_.

Member Function Documentation

static map::const_iterator game_events::wml_action::begin ( )
inlinestatic

The first registered action.

Definition at line 59 of file action_wml.hpp.

References registry_.

static map::const_iterator game_events::wml_action::end ( )
inlinestatic

One past the last registered action.

Definition at line 61 of file action_wml.hpp.

References registry_.

static const map& game_events::wml_action::registry ( )
inlinestatic

Definition at line 62 of file action_wml.hpp.

References registry_.

Referenced by game_lua_kernel::game_lua_kernel().

Member Data Documentation

wml_action::map game_events::wml_action::registry_
staticprivate

Tracks the known action handlers.

Definition at line 65 of file action_wml.hpp.

Referenced by begin(), end(), registry(), and wml_action().


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