Owns the command-line parser and coordinates the domain objects that carry out each command. More...
#include <orchestrator.hpp>
Public Member Functions | |
| Orchestrator (Orchestrator &&)=delete | |
| Orchestrator (const Orchestrator &)=delete | |
| Orchestrator & | operator= (Orchestrator &&)=delete |
| Orchestrator & | operator= (const Orchestrator &)=delete |
| ExitCode | run (int argc, char **argv) |
| Parses the command line and dispatches to the requested command, catching every exception at this single point. | |
Owns the command-line parser and coordinates the domain objects that carry out each command.
The Orchestrator registers every planned subcommand up front, even before it is implemented, so that the command surface described in the design document is always visible through notex --help; a command without an implementation yet simply reports that it is not available. It holds the state shared across a single invocation, such as the global --yes and --verbose flags, and is the only class in the program that knows about command-line parsing.
Definition at line 34 of file orchestrator.hpp.
| notex::Orchestrator::Orchestrator | ( | ) |
Definition at line 29 of file orchestrator.cpp.
| ExitCode notex::Orchestrator::run | ( | int | argc, |
| char ** | argv ) |
Parses the command line and dispatches to the requested command, catching every exception at this single point.
| argc | Argument count, as received by main. |
| argv | Argument vector, as received by main. |
Definition at line 676 of file orchestrator.cpp.
References notex::ui::error(), notex::FAILURE, notex::SUCCESS, and notex::USAGE_ERROR.