- ::initialize captures all args.
This commit is contained in:
Paul Beckingham 2014-10-13 23:23:45 -04:00
parent df54b8ee43
commit 64d4d659ef
2 changed files with 14 additions and 0 deletions

View file

@ -54,3 +54,13 @@ void CLI::entity (const std::string& name, const std::string& value)
}
////////////////////////////////////////////////////////////////////////////////
// Capture the original, intact command line arguments. These will not be
// modified.
void CLI::initialize (int argc, const char** argv)
{
_program = argv[0];
for (int i = 1; i < argc; ++i)
_args.push_back (argv[i]);
}
////////////////////////////////////////////////////////////////////////////////