ENH: Add access to last argument parsed

This commit is contained in:
Andy Cedilnik 2004-09-29 07:56:25 -04:00
parent a58b87378d
commit 7488e43d69
2 changed files with 12 additions and 0 deletions

View File

@ -485,6 +485,12 @@ const char* CommandLineArguments::GetArgv0()
return this->Internals->Argv0.c_str(); return this->Internals->Argv0.c_str();
} }
//----------------------------------------------------------------------------
unsigned int CommandLineArguments::GetLastArgument()
{
return this->Internals->LastArgument + 1;
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void CommandLineArguments::GenerateHelp() void CommandLineArguments::GenerateHelp()
{ {

View File

@ -142,6 +142,12 @@ public:
*/ */
const char* GetArgv0(); const char* GetArgv0();
/**
* Get index of the last argument parsed. This is the last argument that was
* parsed ok in the original argc/argv list.
*/
unsigned int GetLastArgument();
protected: protected:
void GenerateHelp(); void GenerateHelp();