Pin
|
Public Member Functions | |
COMMAND_LINE_ARGUMENTS () | |
COMMAND_LINE_ARGUMENTS (INT argc, const CHAR *const *argv, const CHAR *delimiter=NULL) | |
COMMAND_LINE_ARGUMENTS (const std::string &commandLine) | |
COMMAND_LINE_ARGUMENTS (const COMMAND_LINE_ARGUMENTS &source) | |
COMMAND_LINE_ARGUMENTS & | operator= (const COMMAND_LINE_ARGUMENTS &source) |
COMMAND_LINE_ARGUMENTS & | Insert (const COMMAND_LINE_ARGUMENTS &right, INT pos=-1) |
COMMAND_LINE_ARGUMENTS & | Insert (const std::string &arg, INT pos=-1) |
COMMAND_LINE_ARGUMENTS & | InsertAsOneToken (const std::string &arg, INT pos=-1) |
INT | FindArgument (const std::string &argStr) const |
BOOL | RemoveArguments (const std::string &argStr, INT numOfArgs) |
INT | Argc () const |
const CHAR *const * | Argv () const |
std::string | String () const |
~COMMAND_LINE_ARGUMENTS () | |
class that represents command line arguments
|
inline |
Empty Constructor
|
inline |
Constructor. Construct an object from argc, argv and delimiter Example1: argc = 6, argv = {ab bc cd de ef de}, delimiter = "de" => the object will contain: argc = 4, argv = {ab bc cd de} Example2: argc = 6, argv = {ab bc cd de ef de}, delimiter = NULL => the object will contain: argc = 6, argv = {ab bc cd de ef de} Example3: argc = 6, argv = {ab bc cd de ef de}, delimiter = "fg" => the object will contain: argc = 6, argv = {ab bc cd de ef de}
[in] | argc | argc for the command line arguments object |
[in] | argv | argv for the command line arguments object |
[in] | delimiter | remove any argv argument AFTER the delimiter. If it was not found, nothing will be removed |
|
inline |
Constructor. Construct an object from a string using MS CRT Parsing rules (For more details see GetCmdArg() documentation)
NOTE: Use this function only for original application's command line
[in] | commandLine | original application's command line represented as string |
|
inline |
Copy Constructor. Construct an object from another object
[in] | source | source object |
|
inline |
Destructor
|
inline |
|
inline |
INT LEVEL_BASE::COMMAND_LINE_ARGUMENTS::FindArgument | ( | const std::string & | argStr | ) | const |
Find an argument by name
[in] | argStr | - argument to be found |
COMMAND_LINE_ARGUMENTS& LEVEL_BASE::COMMAND_LINE_ARGUMENTS::Insert | ( | const COMMAND_LINE_ARGUMENTS & | right, |
INT | pos = -1 |
||
) |
Insert a set of command line arguments into this set of arguments.
[in] | args | Arguments to be inserted. |
[in] | pos | Arguments are inserted before the argument with this position. If pos is -1, they are appended to the end. |
COMMAND_LINE_ARGUMENTS& LEVEL_BASE::COMMAND_LINE_ARGUMENTS::Insert | ( | const std::string & | arg, |
INT | pos = -1 |
||
) |
Insert a single argument into this set of arguments.
[in] | arg | Argument to be inserted. |
[in] | pos | The argument is inserted before the argument with this position. If pos is -1, it is appended to the end. |
COMMAND_LINE_ARGUMENTS& LEVEL_BASE::COMMAND_LINE_ARGUMENTS::InsertAsOneToken | ( | const std::string & | arg, |
INT | pos = -1 |
||
) |
Insert a single argument into this set of arguments. Don't try to tokenize (split) the added argument to several arguments.
[in] | arg | Argument to be inserted. |
[in] | pos | The argument is inserted before the argument with this position. If pos is -1, it is appended to the end. |
|
inline |
Assignment operator
[in] | source | source object |
BOOL LEVEL_BASE::COMMAND_LINE_ARGUMENTS::RemoveArguments | ( | const std::string & | argStr, |
INT | numOfArgs | ||
) |
Looks for argument equal to argStr; remove "numOfArgs" arguments starting from the found argument
[in] | argStr | - argument to be found, |
[in] | numOfArgs | - numer of arguments that should be removed starting from the found argument |
std::string LEVEL_BASE::COMMAND_LINE_ARGUMENTS::String | ( | ) | const |