#include <CommandObject.h>

Public Types | |
| typedef void(T::* | CommandFunction )(const std::string &argument) |
| The type of the function to bind on. | |
Public Member Functions | |
| CommandObject (const char *name, CommandFunction command, bool fullname=false) | |
| Construct a CommandObject, binding the specified function to the specified name. | |
| ~CommandObject () | |
| Destructor, a noop. | |
| void | Run (T *owner, const std::string &argument) const |
| Execute the stored function with the specified owner and argument. | |
| const char * | getName () const |
| Return the name of the bound function. | |
| bool | fullName () const |
| Whether, when performing a lookup on this function, only the full alias should be allowed. | |
Protected Attributes | |
| const char * | m_name |
| The name of the bound function. | |
| CommandFunction | m_command |
| The bound function. | |
| bool | m_fullName |
| Whether only the full alias should be allowed. | |
A binding is made to a name, allowing some sort of reflection later on.
Definition at line 39 of file CommandObject.h.
| typedef void(T::* CommandObject< T >::CommandFunction)(const std::string &argument) |
The type of the function to bind on.
Reimplemented in CommandInfoObject< T >.
Definition at line 42 of file CommandObject.h.
| CommandObject< T >::CommandObject | ( | const char * | name, | |
| CommandFunction | command, | |||
| bool | fullname = false | |||
| ) | [inline] |
Construct a CommandObject, binding the specified function to the specified name.
Definition at line 79 of file CommandObject.h.
| CommandObject< T >::~CommandObject | ( | ) | [inline] |
| void CommandObject< T >::Run | ( | T * | owner, | |
| const std::string & | argument | |||
| ) | const [inline] |
Execute the stored function with the specified owner and argument.
Definition at line 93 of file CommandObject.h.
| const char * CommandObject< T >::getName | ( | ) | const [inline] |
| bool CommandObject< T >::fullName | ( | ) | const [inline] |
Whether, when performing a lookup on this function, only the full alias should be allowed.
Definition at line 73 of file CommandObject.h.
const char* CommandObject< T >::m_name [protected] |
CommandFunction CommandObject< T >::m_command [protected] |
bool CommandObject< T >::m_fullName [protected] |
1.5.3