36 typedef bool (*
handler)(
const config &,
bool use_undo,
bool show, error_handler_function error_handler);
37 typedef std::map<std::string, handler>
map;
51 #define SYNCED_COMMAND_HANDLER_FUNCTION(pname, pcfg, use_undo, show, error_handler) \ 52 static bool synced_command_func_##pname(const config & pcfg, bool use_undo, bool show, synced_command::error_handler_function error_handler ); \ 53 static synced_command synced_command_action_##pname(#pname, &synced_command_func_##pname); \ 54 static bool synced_command_func_##pname(const config & pcfg, bool use_undo, bool show, synced_command::error_handler_function error_handler)
static map & registry()
using static function variable instead of static member variable to prevent static initialization fia...
synced_command(const std::string &tag, handler function)
std::map< std::string, handler > map
bool(* handler)(const config &, bool use_undo, bool show, error_handler_function error_handler)
std::function< void(const std::string &)> error_handler_function
A config object defines a single node in a WML file, with access to child nodes.
void show(const std::string &window_id, const t_string &message, const point &mouse, const SDL_Rect &source_rect)
Shows a tip.