Argument Parsing
- Added argument categorization, and a colorful diagnostic output in debug mode. - Localized all argument parsing in Arguments object, while still allowing specific commands to choose which elements are parsed from the command line.
This commit is contained in:
@@ -120,6 +120,9 @@ void Context::initialize (int argc, const char** argv)
|
||||
// Instantiate built-in command objects.
|
||||
Command::factory (commands);
|
||||
|
||||
// Finally categorize all arguments.
|
||||
args.categorize ();
|
||||
|
||||
// TODO Instantiate extension command objects.
|
||||
// TODO Instantiate default command object.
|
||||
|
||||
@@ -145,7 +148,7 @@ void Context::initialize (int argc, const char** argv)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int Context::run ()
|
||||
{
|
||||
Timer timer ("Context::run");
|
||||
Timer t ("Context::run");
|
||||
|
||||
int rc;
|
||||
std::string output;
|
||||
|
||||
Reference in New Issue
Block a user