ENH: Add a method to remove remaining arguments
This commit is contained in:
parent
5999a81bcd
commit
5e56c7c201
|
@ -358,6 +358,17 @@ void CommandLineArguments::GetRemainingArguments(int* argc, char*** argv)
|
||||||
*argv = args;
|
*argv = args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
void CommandLineArguments::DeleteRemainingArguments(int argc, char*** argv)
|
||||||
|
{
|
||||||
|
int cc;
|
||||||
|
for ( cc = 0; cc < argc; ++ cc )
|
||||||
|
{
|
||||||
|
delete [] *argv[cc];
|
||||||
|
}
|
||||||
|
delete [] *argv;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void CommandLineArguments::AddCallback(const char* argument, ArgumentTypeEnum type,
|
void CommandLineArguments::AddCallback(const char* argument, ArgumentTypeEnum type,
|
||||||
CallbackType callback, void* call_data, const char* help)
|
CallbackType callback, void* call_data, const char* help)
|
||||||
|
|
|
@ -170,6 +170,7 @@ public:
|
||||||
* delete[] on it.
|
* delete[] on it.
|
||||||
*/
|
*/
|
||||||
void GetRemainingArguments(int* argc, char*** argv);
|
void GetRemainingArguments(int* argc, char*** argv);
|
||||||
|
void DeleteRemainingArguments(int argc, char*** argv);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return string containing help. If the argument is specified, only return
|
* Return string containing help. If the argument is specified, only return
|
||||||
|
|
Loading…
Reference in New Issue