|
scsl 1.0.1
Shimmering Clarity Standard Library
|
Subcommander manager for programs. More...
#include <Commander.h>
Public Member Functions | |
| Commander () | |
| A Commander is initialized empty. | |
| bool | Register (Subcommand scmd) |
| Register adds the subcommand. It will be copied into the Commander. | |
| Subcommand::Status | Run (std::string command, std::vector< std::string > args) |
| Try to run a subcommand registered with this Commander. | |
Subcommander manager for programs.
Commander collects subcommands and can run the apppropriate one.
For example:
| scsl::Commander::Commander | ( | ) |
A Commander is initialized empty.
| bool scsl::Commander::Register | ( | Subcommand | scmd | ) |
Register adds the subcommand. It will be copied into the Commander.
| Subcommand::Status scsl::Commander::Run | ( | std::string | command, |
| std::vector< std::string > | args | ||
| ) |
Try to run a subcommand registered with this Commander.