#include <synced_commands.hpp>
Public Types | |
| typedef std::function< void(const std::string &, bool)> | error_handler_function |
| typedef bool(* | handler )(const config &, bool use_undo, bool show, error_handler_function error_handler) |
| typedef std::map< std::string, handler > | map |
Public Member Functions | |
| synced_command (const std::string &tag, handler function) | |
Static Public Member Functions | |
| static map & | registry () |
| using static function variable instead of static member variable to prevent static initialization fiasco when used in other files. More... | |
Definition at line 24 of file synced_commands.hpp.
| typedef std::function<void(const std::string&, bool)> synced_command::error_handler_function |
Definition at line 33 of file synced_commands.hpp.
| typedef bool(* synced_command::handler)(const config &, bool use_undo, bool show, error_handler_function error_handler) |
Definition at line 38 of file synced_commands.hpp.
| typedef std::map<std::string, handler> synced_command::map |
Definition at line 39 of file synced_commands.hpp.
| synced_command::synced_command | ( | const std::string & | tag, |
| handler | function | ||
| ) |
| [in] | tag | The replay tag for this action. |
| [in] | function | The callback for this action. |
Definition at line 51 of file synced_commands.cpp.
References gui2::event::find(), and registry().
|
static |
using static function variable instead of static member variable to prevent static initialization fiasco when used in other files.
Definition at line 57 of file synced_commands.cpp.
Referenced by synced_context::run(), synced_context::run_in_synced_context_if_not_already(), and synced_command().
1.8.8