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:
Paul Beckingham 2011-06-04 14:30:45 -04:00
parent 644d027a87
commit b4c1e47ab4
4 changed files with 366 additions and 23 deletions

View file

@ -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;