
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 |
Protected Member Functions | |
| void | init_map_default () |
| virtual void | init_map ()=0 |
| virtual void | print (const std::string &title, const std::string &message)=0 |
| virtual std::string | get_flags_description () const |
| virtual std::string | get_command_flags_description (const command &) const |
| virtual bool | is_enabled (const command &) const |
| virtual void | parse_cmd (const std::string &cmd_string) |
| virtual std::string | get_arg (unsigned argn) const |
| virtual std::string | get_data (unsigned argn=1) const |
| virtual std::string | get_cmd () const |
| void | command_failed (const std::string &message) |
| void | command_failed_need_arg (int argn) |
| void | print_usage () |
| std::string | get_actual_cmd (const std::string &cmd) const |
| const command * | get_command (const std::string &cmd) const |
| command * | get_command (const std::string &cmd) |
| void | help () |
| bool | help_command (const std::string &acmd) |
| virtual void | register_command (const std::string &cmd, command_handler h, const std::string &help="", const std::string &usage="", const std::string &flags="") |
| virtual void | assert_existence (const std::string &cmd) |
| virtual void | register_alias (const std::string &to_cmd, const std::string &cmd) |
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 1970 of file menu_events.cpp.
| typedef std::map<std::string, std::string> events::map_command_handler< Worker >::command_alias_map |
Definition at line 1996 of file menu_events.cpp.
| typedef void(Worker::* events::map_command_handler< Worker >::command_handler)() |
Definition at line 1973 of file menu_events.cpp.
| typedef std::map<std::string, command> events::map_command_handler< Worker >::command_map |
Definition at line 1995 of file menu_events.cpp.
| events::map_command_handler< Worker >::map_command_handler | ( | ) | [inline] |
Definition at line 1998 of file menu_events.cpp.
| virtual events::map_command_handler< Worker >::~map_command_handler | ( | ) | [inline, virtual] |
Definition at line 2002 of file menu_events.cpp.
| virtual void events::map_command_handler< Worker >::assert_existence | ( | const std::string & | cmd | ) | [inline, protected, virtual] |
Reimplemented in events::console_handler.
Definition at line 2210 of file menu_events.cpp.
| void events::map_command_handler< Worker >::command_failed | ( | const std::string & | message | ) | [inline, protected] |
Definition at line 2103 of file menu_events.cpp.
Referenced by events::map_command_handler< chat_command_handler >::command_failed_need_arg().

| void events::map_command_handler< Worker >::command_failed_need_arg | ( | int | argn | ) | [inline, protected] |
Definition at line 2107 of file menu_events.cpp.
| void events::map_command_handler< Worker >::dispatch | ( | std::string | cmd | ) | [inline] |
Definition at line 2009 of file menu_events.cpp.
Referenced by events::menu_handler::do_command().

| bool events::map_command_handler< Worker >::empty | ( | ) | const [inline] |
Definition at line 2004 of file menu_events.cpp.
Referenced by events::map_command_handler< chat_command_handler >::dispatch().

| std::string events::map_command_handler< Worker >::get_actual_cmd | ( | const std::string & | cmd | ) | const [inline, protected] |
Definition at line 2118 of file menu_events.cpp.
Referenced by events::map_command_handler< chat_command_handler >::dispatch(), and events::map_command_handler< chat_command_handler >::help_command().

| static const std::vector<std::string> events::map_command_handler< Worker >::get_aliases | ( | const std::string & | cmd | ) | [inline, static, protected] |
Definition at line 2222 of file menu_events.cpp.
Referenced by events::map_command_handler< chat_command_handler >::help_command().

| virtual std::string events::map_command_handler< Worker >::get_arg | ( | unsigned | argn | ) | const [inline, protected, virtual] |
Reimplemented in events::console_handler.
Definition at line 2089 of file menu_events.cpp.
Referenced by events::map_command_handler< chat_command_handler >::help().

| virtual std::string events::map_command_handler< Worker >::get_cmd | ( | ) | const [inline, protected, virtual] |
Reimplemented in events::console_handler.
Definition at line 2098 of file menu_events.cpp.
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().

| const command* events::map_command_handler< Worker >::get_command | ( | const std::string & | cmd | ) | const [inline, protected] |
Definition at line 2123 of file menu_events.cpp.
Referenced by events::map_command_handler< chat_command_handler >::dispatch(), and events::map_command_handler< chat_command_handler >::help_command().

| command* events::map_command_handler< Worker >::get_command | ( | const std::string & | cmd | ) | [inline, protected] |
Definition at line 2128 of file menu_events.cpp.
| virtual std::string events::map_command_handler< Worker >::get_command_flags_description | ( | const command & | ) | const [inline, protected, virtual] |
Definition at line 2074 of file menu_events.cpp.
Referenced by events::map_command_handler< chat_command_handler >::help_command().

| std::vector<std::string> events::map_command_handler< Worker >::get_commands_list | ( | ) | const [inline] |
Definition at line 2046 of file menu_events.cpp.
Referenced by events::menu_handler::get_commands_list().

| virtual std::string events::map_command_handler< Worker >::get_data | ( | unsigned | argn = 1 |
) | const [inline, protected, virtual] |
Reimplemented in events::console_handler.
Definition at line 2094 of file menu_events.cpp.
Referenced by events::map_command_handler< chat_command_handler >::dispatch().

| virtual std::string events::map_command_handler< Worker >::get_flags_description | ( | ) | const [inline, protected, virtual] |
Reimplemented in events::chat_command_handler, and events::console_handler.
Definition at line 2069 of file menu_events.cpp.
Referenced by events::map_command_handler< chat_command_handler >::help().

| void events::map_command_handler< Worker >::help | ( | ) | [inline, protected] |
Definition at line 2133 of file menu_events.cpp.
Referenced by events::map_command_handler< chat_command_handler >::register_command().

| bool events::map_command_handler< Worker >::help_command | ( | const std::string & | acmd | ) | [inline, protected] |
Definition at line 2163 of file menu_events.cpp.
Referenced by events::map_command_handler< chat_command_handler >::help(), and events::map_command_handler< chat_command_handler >::print_usage().

| virtual void events::map_command_handler< Worker >::init_map | ( | ) | [protected, pure virtual] |
Implemented in events::chat_command_handler, and events::console_handler.
Referenced by events::map_command_handler< chat_command_handler >::dispatch().

| void events::map_command_handler< Worker >::init_map_default | ( | ) | [inline, protected] |
Definition at line 2056 of file menu_events.cpp.
Referenced by events::map_command_handler< chat_command_handler >::dispatch().

| virtual bool events::map_command_handler< Worker >::is_enabled | ( | const command & | ) | const [inline, protected, virtual] |
Definition at line 2080 of file menu_events.cpp.
Referenced by events::map_command_handler< chat_command_handler >::dispatch(), and events::map_command_handler< chat_command_handler >::help().

| virtual void events::map_command_handler< Worker >::parse_cmd | ( | const std::string & | cmd_string | ) | [inline, protected, virtual] |
Definition at line 2084 of file menu_events.cpp.
Referenced by events::map_command_handler< chat_command_handler >::dispatch().

| virtual void events::map_command_handler< Worker >::print | ( | const std::string & | title, | |
| const std::string & | message | |||
| ) | [protected, pure virtual] |
Implemented in events::chat_command_handler, and events::console_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().

| void events::map_command_handler< Worker >::print_usage | ( | ) | [inline, protected] |
Definition at line 2113 of file menu_events.cpp.
| virtual void events::map_command_handler< Worker >::register_alias | ( | const std::string & | to_cmd, | |
| const std::string & | cmd | |||
| ) | [inline, protected, virtual] |
Reimplemented in events::console_handler.
Definition at line 2213 of file menu_events.cpp.
| virtual void events::map_command_handler< Worker >::register_command | ( | const std::string & | cmd, | |
| command_handler | h, | |||
| const std::string & | help = "", |
|||
| const std::string & | usage = "", |
|||
| const std::string & | flags = "" | |||
| ) | [inline, protected, virtual] |
Reimplemented in events::console_handler.
Definition at line 2199 of file menu_events.cpp.
Referenced by events::map_command_handler< chat_command_handler >::init_map_default().

| static void events::map_command_handler< Worker >::set_cmd_prefix | ( | std::string | value | ) | [inline, static, protected] |
Definition at line 2195 of file menu_events.cpp.
| static void events::map_command_handler< Worker >::set_help_on_unknown | ( | bool | value | ) | [inline, static, protected] |
Definition at line 2190 of file menu_events.cpp.
cmd_arg_parser events::map_command_handler< Worker >::cap_ [protected] |
Definition at line 2187 of file menu_events.cpp.
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().
std::string events::map_command_handler< Worker >::cmd_prefix_ [static, private] |
Definition at line 2238 of file menu_events.cpp.
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().
map_command_handler< Worker >::command_alias_map events::map_command_handler< Worker >::command_alias_map_ [static, private] |
map_command_handler< Worker >::command_map events::map_command_handler< Worker >::command_map_ [static, private] |
Definition at line 2234 of file menu_events.cpp.
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().
bool events::map_command_handler< Worker >::help_on_unknown_ = true [static, private] |
Definition at line 2236 of file menu_events.cpp.
Referenced by events::map_command_handler< chat_command_handler >::dispatch(), and events::map_command_handler< chat_command_handler >::set_help_on_unknown().
bool events::map_command_handler< Worker >::show_unavailable_ = false [static, private] |
Definition at line 2237 of file menu_events.cpp.
Referenced by events::map_command_handler< chat_command_handler >::help().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:20:11 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |