14 #ifndef SYNCED_COMMANDS_H_INCLUDED
15 #define SYNCED_COMMANDS_H_INCLUDED
38 typedef bool (*
handler)(
const config &,
bool use_undo,
bool show, error_handler_function error_handler);
39 typedef std::map<std::string, handler>
map;
53 #define SYNCED_COMMAND_HANDLER_FUNCTION(pname, pcfg, use_undo, show, error_handler) \
54 static bool synced_command_func_##pname(const config & pcfg, bool use_undo, bool show, synced_command::error_handler_function error_handler ); \
55 static synced_command synced_command_action_##pname(#pname, &synced_command_func_##pname); \
56 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)
void show(CVideo &video, const std::string &window_id, const t_string &message, const tpoint &mouse)
Shows a tip.
std::function< void(const std::string &, bool)> error_handler_function
A config object defines a single node in a WML file, with access to child nodes.
GLsizei const GLcharARB ** string