|
EvEmu
0.8.4
11 September 2021
|
#include "CommandDispatcher.h"

Classes | |
| class | CommandRecord |
Public Types | |
| typedef PyResult(* | CommandFunc )(Client *who, CommandDB *db, PyServiceMgr *services, const Seperator &args) |
Public Member Functions | |
| CommandDispatcher (PyServiceMgr &services) | |
| virtual | ~CommandDispatcher () |
| void | Close () |
| PyResult | Execute (Client *from, const char *msg) |
| void | AddCommand (const char *cmd, const char *desc, int64 required_role, CommandFunc function) |
| void | ListCommands () |
Protected Attributes | |
| PyServiceMgr & | m_services |
| CommandDB | m_db |
| std::map< std::string, CommandRecord * > | m_commands |
Definition at line 12 of file CommandDispatcher.h.
| typedef PyResult(* CommandDispatcher::CommandFunc)(Client *who, CommandDB *db, PyServiceMgr *services, const Seperator &args) |
Definition at line 15 of file CommandDispatcher.h.
| CommandDispatcher::CommandDispatcher | ( | PyServiceMgr & | services | ) |
Definition at line 34 of file CommandDispatcher.cpp.
References m_commands.
|
virtual |
Definition at line 40 of file CommandDispatcher.cpp.
References m_commands, and SafeDelete().

| void CommandDispatcher::AddCommand | ( | const char * | cmd, |
| const char * | desc, | ||
| int64 | required_role, | ||
| CommandFunc | function | ||
| ) |
Definition at line 89 of file CommandDispatcher.cpp.
References m_commands, and SafeDelete().

| void CommandDispatcher::Close | ( | ) |
Definition at line 107 of file CommandDispatcher.cpp.
References m_commands, and SafeDelete().
Referenced by main().


Definition at line 46 of file CommandDispatcher.cpp.
References _log, UserError::AddFormatValue(), Seperator::arg(), Seperator::argCount(), CommandDispatcher::CommandRecord::command, CommandDispatcher::CommandRecord::function, Client::GetAccountRole(), Client::GetName(), m_commands, m_db, m_services, and CommandDispatcher::CommandRecord::required_role.
Referenced by LSCService::ExecuteCommand(), and SlashService::SlashCommand().


| void CommandDispatcher::ListCommands | ( | ) |
Definition at line 98 of file CommandDispatcher.cpp.
References m_commands, and sLog.
Referenced by ConsoleCommand::Process().

|
protected |
Definition at line 42 of file CommandDispatcher.h.
Referenced by AddCommand(), Close(), CommandDispatcher(), Execute(), ListCommands(), and ~CommandDispatcher().
|
protected |
Definition at line 40 of file CommandDispatcher.h.
Referenced by Execute().
|
protected |
Definition at line 39 of file CommandDispatcher.h.
Referenced by Execute().