![]() |
Jopnal Engine
alpha 0.4
Simple Component Based 2D/3D Game Engine
|
#include <CommandHandler.hpp>
Public Member Functions | |
template<typename Func , typename Parser > | |
void | bind (const std::string &command, const Func &func, const Parser &parser, const Message::Result result) |
Bind a new free function using a custom parser. More... | |
template<typename Ret , typename... FuncArgs> | |
void | bind (const std::string &command, const std::function< Ret(FuncArgs...)> &func, const Message::Result result) |
Bind a new free function. More... | |
template<typename Ret , typename... FuncArgs> | |
void | bind (const std::string &command, Ret(*func)(FuncArgs...), const Message::Result result) |
Bind a new free function. More... | |
template<typename Func , typename Parser > | |
void | bindMember (const std::string &command, const Func &func, const Parser &parser, const Message::Result result) |
Bind a new member function. More... | |
template<typename Ret , typename Class , typename... FuncArgs> | |
void | bindMember (const std::string &command, const std::function< Ret(Class &, FuncArgs...)> &func, const Message::Result result) |
Bind a new member function. More... | |
template<typename Ret , typename Class , typename... FuncArgs> | |
void | bindMember (const std::string &command, Ret(Class::*func)(FuncArgs...), const Message::Result result) |
Bind a new member function. More... | |
template<typename Ret , typename Class , typename... FuncArgs> | |
void | bindMember (const std::string &command, Ret(Class::*func)(FuncArgs...) const, const Message::Result result) |
Bind a new const member function. More... | |
Message::Result | execute (const std::string &command, void *instance) |
Execute a command. More... | |
Definition at line 47 of file CommandHandler.hpp.
void jop::CommandHandler::bind | ( | const std::string & | command, |
const Func & | func, | ||
const Parser & | parser, | ||
const Message::Result | result | ||
) |
Bind a new free function using a custom parser.
command | The command name |
func | The function to bind |
parser | The parser to use |
result | The message result this function should return |
void jop::CommandHandler::bind | ( | const std::string & | command, |
const std::function< Ret(FuncArgs...)> & | func, | ||
const Message::Result | result | ||
) |
Bind a new free function.
command | The command name |
func | The function object to bind |
result | The message result this function should return |
void jop::CommandHandler::bind | ( | const std::string & | command, |
Ret(*)(FuncArgs...) | func, | ||
const Message::Result | result | ||
) |
Bind a new free function.
command | The command name |
func | The function pointer to bind |
result | The message result this function should return |
void jop::CommandHandler::bindMember | ( | const std::string & | command, |
const Func & | func, | ||
const Parser & | parser, | ||
const Message::Result | result | ||
) |
Bind a new member function.
command | The command name |
func | The function to bind |
parser | The parser to use |
result | The message result this function should return |
void jop::CommandHandler::bindMember | ( | const std::string & | command, |
const std::function< Ret(Class &, FuncArgs...)> & | func, | ||
const Message::Result | result | ||
) |
Bind a new member function.
command | The command name |
func | The function object to bind |
result | The message result this function should return |
void jop::CommandHandler::bindMember | ( | const std::string & | command, |
Ret(Class::*)(FuncArgs...) | func, | ||
const Message::Result | result | ||
) |
Bind a new member function.
command | The command name |
func | The function pointer to bind |
result | The message result this function should return |
void jop::CommandHandler::bindMember | ( | const std::string & | command, |
Ret(Class::*)(FuncArgs...) const | func, | ||
const Message::Result | result | ||
) |
Bind a new const member function.
command | The command name |
func | The function pointer to bind |
result | The message result this function should return |
Message::Result jop::CommandHandler::execute | ( | const std::string & | command, |
void * | instance | ||
) |
Execute a command.
command | The command name |
instance | The class instance to call the command on. Can be nullptr to only consider free functions |