|
|
| int argcnt | argcnt |
| opt cont[UVMAXOPT] | cont[UVMAXOPT] |
| int maxargs | maxargs |
| uvProgArgs ( int argc, char *argv[] )
| uvProgArgs |
constructor
argc : the from main function transfered argc value
@p *argv[] : the from main function transfered argv value
| ~uvProgArgs ()
| ~uvProgArgs |
destructor
the destructor frees all malloced strings
| void initArgArray ()
| initArgArray |
[protected]
initializes the array. In fact all entries (option and argument) are set to 0.
| void freeArgArray ()
| freeArgArray |
[protected]
frees all malloced data (options and arguments).
| void fillArgArray ( char *argv[] )
| fillArgArray |
[protected]
fills the array.
The array is filled with the array data and ardcnt is incremented. If an option (e.g. -f) is followed by an argument (e.g. /tmp/abc) both are stroed in one array entry (option and argument). If either only argument or option is given, the other entry is filled up with a single 0x0 (empty string).
@p *argv : the argument array.
This leads to the following example
The call
memtrace -f /tmp/abc -t 250 -d /opt/QtPalmtop/bin/qphoto -show
fills the array as follows ...
popts.cont[0].option == "-f", popts.cont[0].argument == "/tmp/abc"
popts.cont[1].option == "-t", popts.cont[0].argument == "250"
popts.cont[2].option == "-d", popts.cont[0].argument == ""
popts.cont[3].option == "", popts.cont[0].argument == "/opt/QtPalmtop/bin/qphoto"
popts.cont[0].option == "-show", popts.cont[0].argument == ""
|
| Generated by: sc on schomep4 on Sun Nov 23 16:54:46 2003, using kdoc 2.0a54. |