Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CommandInstaller< PREFIX, SECTION > Class Template Reference

Creates an instance of command class C. More...

#include <CommandInstaller.h>

Inheritance diagram for CommandInstaller< PREFIX, SECTION >:
Inheritance graph
[legend]
Collaboration diagram for CommandInstaller< PREFIX, SECTION >:
Collaboration graph
[legend]

Public Member Functions

 CommandInstaller (CommandBank &bank=getCommandBank())
 
template<class CMD >
Commandinstall (const std::string &name, char alias=0)
 Install command initialized and stored by command bank.
 
template<class CMD >
Commandinstall (char alias=0)
 Install external command.
 
template<class CMD >
Commandinstall (CMD &cmdExt, const std::string &name, char alias=0)
 Install external command.
 
template<class CMD >
Commandinstall (CMD &cmdExt, char alias=0)
 Install external command.
 

Static Public Member Functions

static const CommandSectiongetSection ()
 
static char getPrefix ()
 Return the character used as prefix for the commands in this section.
 
template<class CMD >
static CommandinstallShared (const std::string &name, char alias=0)
 Install to shared (global) CommandBank.
 
template<class CMD >
static CommandinstallShared (char alias=0)
 Install to shared (global) CommandBank.
 

Public Attributes

CommandBankcmdBank
 

Detailed Description

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

Member Function Documentation

◆ 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: