Command line command.
More...
#include <cppassist/include/cppassist/cmdline/CommandLineCommand.h>
Command line command.
A command decribes a certain function that can be invoked by specifying the command name on the command line.
Example: myapp list
◆ CommandLineCommand()
cppassist::CommandLineCommand::CommandLineCommand |
( |
const std::string & |
name | ) |
|
Constructor.
- Parameters
-
[in] | name | Command name (e.g., "list") |
◆ ~CommandLineCommand()
cppassist::CommandLineCommand::~CommandLineCommand |
( |
| ) |
|
◆ name()
const std::string& cppassist::CommandLineCommand::name |
( |
| ) |
const |
Get command name.
- Returns
- Command name (e.g., "list")
◆ setName()
void cppassist::CommandLineCommand::setName |
( |
const std::string & |
name | ) |
|
Set command name.
- Parameters
-
[in] | name | Command name (e.g., "list") |
◆ activated()
bool cppassist::CommandLineCommand::activated |
( |
| ) |
const |
Check if command has been activated.
- Returns
true
if activated, else false
◆ setActivated()
void cppassist::CommandLineCommand::setActivated |
( |
bool |
activated | ) |
|
Set if command has been activated.
- Parameters
-
[in] | activated | true if activated, else false |
◆ m_name
std::string cppassist::CommandLineCommand::m_name |
|
protected |
Command name (e.g., "list")
◆ m_activated
bool cppassist::CommandLineCommand::m_activated |
|
protected |
true
if activated, else false
The documentation for this class was generated from the following file: