#include <OptionParser.H>
|  | 
| template<typename TYPE > | 
| int | getArg (string key, int argc, char *argv[], TYPE &ret, int i) | 
|  | 
| template<typename TYPE > | 
| void | convertArg (const char *arg, TYPE &ret) | 
|  | 
| int | getArgString (string key, int argc, char *argv[], string &ret, int i) | 
|  | 
Class to parse options from the command line. Example option forms on the command line are : 
binaryFile --opt=val -opt val
- Examples: 
- IIOMMapTest.C, IIOQueueTest.C, IIOTest.C, OptionParserTest.C, and ORBTest.C.
Definition at line 31 of file OptionParser.H.
◆ convertArg()
template<typename TYPE > 
  
  | 
        
          | void OptionParser::convertArg | ( | const char * | arg, |  
          |  |  | TYPE & | ret |  
          |  | ) |  |  |  | inline | 
 
Get the integer matching key from argc/argv 
- Parameters
- 
  
    | arg | The argument to convert |  | ret | [out] The value of the arg typecase to TYPE |  
 
- Template Parameters
- 
  
    | TYPE | The type of the output argument |  
 
Definition at line 58 of file OptionParser.H.
 
 
◆ getArg()
template<typename TYPE > 
  
  | 
        
          | int OptionParser::getArg | ( | string | key, |  
          |  |  | int | argc, |  
          |  |  | char * | argv[], |  
          |  |  | TYPE & | ret, |  
          |  |  | int | i |  
          |  | ) |  |  |  | inline | 
 
Get the integer matching key from argc/argv 
- Parameters
- 
  
    | key | The option key to search for |  | argc | The option count |  | argv | The option array of c strings |  | ret | [out] The value of the option matching key, if found, then it is set to that value, otherwise left the same |  | i | the arg number to start from |  
 
- Returns
- the location of the argument, if == i then not found 
- Template Parameters
- 
  
    | TYPE | The type of the output argument |  
 
- Examples: 
- IIOMMapTest.C, IIOQueueTest.C, IIOTest.C, OptionParserTest.C, and ORBTest.C.
Definition at line 43 of file OptionParser.H.
 
 
◆ getArgString()
  
  | 
        
          | int OptionParser::getArgString | ( | string | key, |  
          |  |  | int | argc, |  
          |  |  | char * | argv[], |  
          |  |  | string & | ret, |  
          |  |  | int | i |  
          |  | ) |  |  |  | inline | 
 
Get the string matching key from argc/argv 
- Parameters
- 
  
    | key | The option key to search for |  | argc | The option count |  | argv | The option array of c strings |  | ret | [out] The integer value of the option matchin key, if found, then it is set to that value, otherwise left the same |  | i | the arg number to start from |  
 
- Returns
- The location of the new argument, if == i then not found 
Definition at line 72 of file OptionParser.H.
 
 
The documentation for this class was generated from the following file: