Inheritance diagram for phArgTable:
If a switch isn't provided, the pointer to the variable is not altered. When any of the variables are passed as the pointer parameter, they should be referenced using the “&” operator to get their local address. For example, “int value” should be passed to the add method as such: “&value”.
All arguments are parsed in the order which they are supplied on the command line. If there are multiple instances of the same switch string within the table, the first switch added will be used.
This is not meant to be a complicated mechanism for parsing the command line. A list of strings to look for in the arguments is built using phArgTable::add. Generally this class is used near the begining of the main function and main's arguments (argc and argv) are passed to the phArgTable::parse method.
Definition at line 225 of file phArgTable.h.
Public Member Functions
|int||parse (int argc, char *argv)|
|int||add (const char *switch_string, void *pointer, int type)|
|Copyright (C) 2002 - 2007||
Philip D.S. Thoren ( firstname.lastname@example.org )
University Of Massachusetts at Lowell