Call a function of type ph_argtable_funcptr when parsing. This maps a switch to a function. The function is invoked when the switch is present. There should be no parameters passed to the function. It is generally used to call a usage function. For example, supposing the function “void usage()” exists and one would like to call it when the “--help” switch is supplied. The following code would take care of providing for this functionality:
Parameter pointer type: ph_argtable_funcptr
int main (int argc, char *argv )
rc = table.add(“--help”, (void *)&usage,phARG_FUNC);
CHECK_RC(rc,NULL,”table.add failed to add –help switch”);
rc = table.parse(argc,argv);
Definition at line 133 of file phArgTable.h.