Drag[en]gine Game Engine
1.21
|
Command line arguments. More...
#include <deCmdLineArgs.h>
Public Member Functions | |
Constructors and Destructors | |
deCmdLineArgs () | |
Create a new command line object. More... | |
deCmdLineArgs (const deCmdLineArgs ©) | |
Create a copy of an argument list. More... | |
~deCmdLineArgs () | |
Clean up the command line object. More... | |
Management | |
int | GetCount () const |
Number of arguments. More... | |
const decString & | GetArgument (int index) const |
Argument at index. More... | |
int | IndexOfArgument (const char *argument) const |
Index of first matching argument or -1 if not found. More... | |
bool | HasArgument (const char *argument) const |
Determine if argument exists. More... | |
void | AddArgument (const char *argument) |
Add an argument. More... | |
void | RemoveArgument (int index) |
Remove an argument from index. More... | |
void | RemoveAllArguments () |
Remove all arguments. More... | |
void | AddArgsSplit (const char *commandLine) |
Add arguments parsed from a string command line. More... | |
Operators | |
deCmdLineArgs & | operator= (const deCmdLineArgs ©) |
Copy an argument list to this argument list. More... | |
Command line arguments.
Basically wraps a string list with some additional helper methods.
deCmdLineArgs::deCmdLineArgs | ( | ) |
Create a new command line object.
deCmdLineArgs::deCmdLineArgs | ( | const deCmdLineArgs & | copy | ) |
Create a copy of an argument list.
deCmdLineArgs::~deCmdLineArgs | ( | ) |
Clean up the command line object.
void deCmdLineArgs::AddArgsSplit | ( | const char * | commandLine | ) |
Add arguments parsed from a string command line.
Arguments are considered separated by a white space. Quoted text strings are considered one argument.
deeInvalidParam | commandLine is NULL. |
void deCmdLineArgs::AddArgument | ( | const char * | argument | ) |
Add an argument.
deeInvalidParam | argument is NULL. |
const decString& deCmdLineArgs::GetArgument | ( | int | index | ) | const |
Argument at index.
deeInvalidParam | index is less than 0 or larger than GetCount()-1. |
int deCmdLineArgs::GetCount | ( | ) | const |
Number of arguments.
bool deCmdLineArgs::HasArgument | ( | const char * | argument | ) | const |
Determine if argument exists.
deeInvalidParam | argument is NULL. |
int deCmdLineArgs::IndexOfArgument | ( | const char * | argument | ) | const |
Index of first matching argument or -1 if not found.
deeInvalidParam | argument is NULL. |
deCmdLineArgs& deCmdLineArgs::operator= | ( | const deCmdLineArgs & | copy | ) |
Copy an argument list to this argument list.
void deCmdLineArgs::RemoveAllArguments | ( | ) |
Remove all arguments.
void deCmdLineArgs::RemoveArgument | ( | int | index | ) |
Remove an argument from index.
deeInvalidParam | index is less than 0 or larger than GetCount()-1. |