Creates an instance of command class C.
More...
#include <CommandInstaller.h>
|
| CommandInstaller (CommandBank &bank=getCommandBank()) |
|
template<class CMD > |
Command & | install (const std::string &name, char alias=0) |
| Install command initialized and stored by command bank.
|
|
template<class CMD > |
Command & | install (char alias=0) |
| Install external command.
|
|
template<class CMD > |
Command & | install (CMD &cmdExt, const std::string &name, char alias=0) |
| Install external command.
|
|
template<class CMD > |
Command & | install (CMD &cmdExt, char alias=0) |
| Install external command.
|
|
|
static const CommandSection & | getSection () |
|
static char | getPrefix () |
| Return the character used as prefix for the commands in this section.
|
|
template<class CMD > |
static Command & | installShared (const std::string &name, char alias=0) |
| Install to shared (global) CommandBank.
|
|
template<class CMD > |
static Command & | installShared (char alias=0) |
| Install to shared (global) CommandBank.
|
|
template<char PREFIX = 0, class SECTION = GeneralSection>
class drain::CommandInstaller< PREFIX, SECTION >
Creates an instance of command class C.
- Template Parameters
-
C | - command Creates an instance of command class C, deriving command name from the class name and prefixing if desired. |
PREFIX | - optional prefix, added to lower-case initialized |
SECTIONS | - command sections flags |
◆ install() [1/2]
template<char PREFIX = 0, class SECTION = GeneralSection>
template<class CMD >
Command & install |
( |
CMD & |
cmdExt, |
|
|
char |
alias = 0 |
|
) |
| |
|
inline |
Install external command.
Use this method if bank based command is inapplicable. This is the case if the command constructor needs other objects upon initialization that cannot be assigned as default values in constructors.
◆ install() [2/2]
template<char PREFIX = 0, class SECTION = GeneralSection>
template<class CMD >
Command & install |
( |
CMD & |
cmdExt, |
|
|
const std::string & |
name, |
|
|
char |
alias = 0 |
|
) |
| |
|
inline |
Install external command.
Use this method if bank based command is inapplicable. This is the case if the command constructor needs other objects upon initialization that cannot be assigned as default values in constructors.
The documentation for this class was generated from the following file: