#include <map_command_handler.hpp>
Classes | |
struct | command |
Public Types | |
typedef void(Worker::* | command_handler )() |
typedef std::map< std::string, command > | command_map |
typedef std::map< std::string, std::string > | command_alias_map |
Public Member Functions | |
map_command_handler () | |
virtual | ~map_command_handler () |
bool | empty () const |
void | dispatch (std::string cmd) |
std::vector< std::string > | get_commands_list () const |
void | command_failed (const std::string &message, bool=false) |
Static Protected Member Functions | |
static void | set_help_on_unknown (bool value) |
static void | set_cmd_prefix (std::string value) |
static const std::vector < std::string > | get_aliases (const std::string &cmd) |
Protected Attributes | |
cmd_arg_parser | cap_ |
Static Private Attributes | |
static command_map | command_map_ |
static command_alias_map | command_alias_map_ |
static bool | help_on_unknown_ = true |
static bool | show_unavailable_ = false |
static std::string | cmd_prefix_ |
Definition at line 118 of file map_command_handler.hpp.
typedef std::map<std::string, std::string> events::map_command_handler< Worker >::command_alias_map |
Definition at line 144 of file map_command_handler.hpp.
typedef void(Worker::* events::map_command_handler< Worker >::command_handler)() |
Definition at line 121 of file map_command_handler.hpp.
typedef std::map<std::string, command> events::map_command_handler< Worker >::command_map |
Definition at line 143 of file map_command_handler.hpp.
|
inline |
Definition at line 146 of file map_command_handler.hpp.
|
inlinevirtual |
Definition at line 150 of file map_command_handler.hpp.
|
inlineprotectedvirtual |
Reimplemented in events::console_handler.
Definition at line 360 of file map_command_handler.hpp.
|
inline |
Definition at line 205 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::command_failed_need_arg().
|
inlineprotected |
Definition at line 256 of file map_command_handler.hpp.
|
inline |
Definition at line 157 of file map_command_handler.hpp.
Referenced by events::menu_handler::do_command(), and events::menu_handler::get_commands_list().
|
inline |
Definition at line 152 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::dispatch().
|
inlineprotected |
Definition at line 267 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::dispatch(), and events::map_command_handler< chat_command_handler >::help_command().
|
inlinestaticprotected |
Definition at line 372 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::help_command().
|
inlineprotectedvirtual |
Reimplemented in events::console_handler.
Definition at line 243 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::help().
|
inlineprotectedvirtual |
Reimplemented in events::console_handler.
Definition at line 252 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::command_failed(), events::map_command_handler< chat_command_handler >::dispatch(), and events::map_command_handler< chat_command_handler >::print_usage().
|
inlineprotected |
Definition at line 272 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::dispatch(), and events::map_command_handler< chat_command_handler >::help_command().
|
inlineprotected |
Definition at line 277 of file map_command_handler.hpp.
|
inlineprotectedvirtual |
Definition at line 228 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::help_command().
|
inline |
Definition at line 196 of file map_command_handler.hpp.
Referenced by events::menu_handler::get_commands_list().
|
inlineprotectedvirtual |
Reimplemented in events::console_handler.
Definition at line 248 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::dispatch().
|
inlineprotectedvirtual |
Reimplemented in events::console_handler, and events::chat_command_handler.
Definition at line 223 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::help().
|
inlineprotected |
Definition at line 282 of file map_command_handler.hpp.
|
inlineprotected |
Definition at line 312 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::help(), and events::map_command_handler< chat_command_handler >::print_usage().
|
protectedpure virtual |
Implemented in events::console_handler, and events::chat_command_handler.
Referenced by events::map_command_handler< chat_command_handler >::dispatch().
|
inlineprotected |
Definition at line 210 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::dispatch().
|
inlineprotectedvirtual |
Definition at line 234 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::dispatch(), and events::map_command_handler< chat_command_handler >::help().
|
inlineprotectedvirtual |
Definition at line 238 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::dispatch().
|
protectedpure virtual |
Implemented in events::console_handler, and events::chat_command_handler.
Referenced by events::map_command_handler< chat_command_handler >::command_failed(), events::map_command_handler< chat_command_handler >::dispatch(), events::map_command_handler< chat_command_handler >::help(), and events::map_command_handler< chat_command_handler >::help_command().
|
inlineprotected |
Definition at line 262 of file map_command_handler.hpp.
|
inlineprotectedvirtual |
Reimplemented in events::console_handler.
Definition at line 363 of file map_command_handler.hpp.
|
inlineprotectedvirtual |
Reimplemented in events::console_handler.
Definition at line 349 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::init_map_default().
|
inlinestaticprotected |
Definition at line 345 of file map_command_handler.hpp.
|
inlinestaticprotected |
Definition at line 340 of file map_command_handler.hpp.
|
protected |
Definition at line 337 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::get_arg(), events::map_command_handler< chat_command_handler >::get_cmd(), events::map_command_handler< chat_command_handler >::get_data(), and events::map_command_handler< chat_command_handler >::parse_cmd().
|
staticprivate |
Definition at line 388 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::dispatch(), events::map_command_handler< chat_command_handler >::help(), events::map_command_handler< chat_command_handler >::help_command(), and events::map_command_handler< chat_command_handler >::set_cmd_prefix().
|
staticprivate |
|
staticprivate |
Definition at line 384 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::assert_existence(), events::map_command_handler< chat_command_handler >::empty(), events::map_command_handler< chat_command_handler >::get_command(), events::map_command_handler< chat_command_handler >::get_commands_list(), events::map_command_handler< chat_command_handler >::help(), and events::map_command_handler< chat_command_handler >::register_command().
|
staticprivate |
Definition at line 386 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::dispatch(), and events::map_command_handler< chat_command_handler >::set_help_on_unknown().
|
staticprivate |
Definition at line 387 of file map_command_handler.hpp.
Referenced by events::map_command_handler< chat_command_handler >::help().