|
lintel 0.2.0
|
#include <AbstractCommandLineMenu.h>
Public Member Functions | |
| AbstractCommandLineMenu (const std::vector< std::shared_ptr< CommandLineComponent > > &components) | |
| void | onShowMenu () |
| std::set< std::string > | allMenuEntriesOf () |
| bool | onMenu (const std::string &command) |
| bool | onExit () |
| void | printCommandList () |
| void | onCommand (const UserDto &userDto, const std::string &command, const std::vector< std::string > ¶meters) |
| std::vector< std::string > | allCommandsOf () |
| void | onHelp () |
| const std::shared_ptr< CommandLineComponent > & | currentOf () |
Manages a collection of CommandLineComponents and routes commands/menu navigation between them
|
explicit |
| components | the list of available CLI components |
| std::vector< std::string > lintel::AbstractCommandLineMenu::allCommandsOf | ( | ) |
| std::set< std::string > lintel::AbstractCommandLineMenu::allMenuEntriesOf | ( | ) |
| const std::shared_ptr< CommandLineComponent > & lintel::AbstractCommandLineMenu::currentOf | ( | ) |
| void lintel::AbstractCommandLineMenu::onCommand | ( | const UserDto & | userDto, |
| const std::string & | command, | ||
| const std::vector< std::string > & | parameters | ||
| ) |
Route command to the currently active component
| bool lintel::AbstractCommandLineMenu::onExit | ( | ) |
| void lintel::AbstractCommandLineMenu::onHelp | ( | ) |
Show help for the current component
| command | component name to navigate to |
| void lintel::AbstractCommandLineMenu::onShowMenu | ( | ) |
Show the main menu with all available components
| void lintel::AbstractCommandLineMenu::printCommandList | ( | ) |
Print the command list for the current component