diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-09-29 07:56:25 -0400 |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-09-29 07:56:25 -0400 |
commit | 7488e43d6951402246d83f47bbe1ebce9f05e71e (patch) | |
tree | 844c446d12c795de48045900217d75d0e9bf5ef2 /Source/kwsys | |
parent | a58b87378db8023245b8117f37972270e785cf6e (diff) | |
download | cmake-7488e43d6951402246d83f47bbe1ebce9f05e71e.tar.gz |
ENH: Add access to last argument parsed
Diffstat (limited to 'Source/kwsys')
-rw-r--r-- | Source/kwsys/CommandLineArguments.cxx | 6 | ||||
-rw-r--r-- | Source/kwsys/CommandLineArguments.hxx.in | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Source/kwsys/CommandLineArguments.cxx b/Source/kwsys/CommandLineArguments.cxx index 388feb2ec5..a21779104b 100644 --- a/Source/kwsys/CommandLineArguments.cxx +++ b/Source/kwsys/CommandLineArguments.cxx @@ -486,6 +486,12 @@ const char* CommandLineArguments::GetArgv0() } //---------------------------------------------------------------------------- +unsigned int CommandLineArguments::GetLastArgument() +{ + return this->Internals->LastArgument + 1; +} + +//---------------------------------------------------------------------------- void CommandLineArguments::GenerateHelp() { kwsys_ios::ostringstream str; diff --git a/Source/kwsys/CommandLineArguments.hxx.in b/Source/kwsys/CommandLineArguments.hxx.in index 630de5966c..a3bfc3f107 100644 --- a/Source/kwsys/CommandLineArguments.hxx.in +++ b/Source/kwsys/CommandLineArguments.hxx.in @@ -142,6 +142,12 @@ public: */ 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: void GenerateHelp(); |