Qore Programming Language Reference Manual  0.9.3.1
QC_GetOpt.dox.h
1 namespace Qore {
4 /***/
5 class GetOpt {
6 
7 public:
9 
37  constructor(hash<auto> options);
38 
39 public:
41 
43  copy();
44 
45 public:
47 
67 hash<auto> parse(reference<list<string>> pgm_args);
68 
69 public:
71 
88 hash<auto> parse(softlist<auto> pgm_args);
89 
90 public:
92 
112 hash<auto> parse2(reference<list<string>> pgm_args);
113 
114 public:
116 
136 hash<auto> parse2(softlist<auto> pgm_args);
137 
138 public:
140 
156 hash<auto> parse3(reference<list<string>> pgm_args);
157 
158 public:
160 
178 hash<auto> parse3(softlist<auto> pgm_args);
179 
180 public:
182 
207 static hash<auto> parse(hash<auto> opts, reference<list<string>> pgm_args);
208 
209 public:
211 
237 static hash<auto> parseEx(hash<auto> opts, reference<list<string>> pgm_args);
238 
239 public:
241 
267 static hash<auto> parseExit(hash<auto> opts, reference<list<string>> pgm_args);
268 };
269 };
constructor(hash< auto > options)
Creates the GetOpt object and sets the option hash with the single required argument.
hash< auto > parse(reference< list< string >> pgm_args)
Parses the parameter list according to the option hash passed to the constructor.
hash< auto > parse2(reference< list< string >> pgm_args)
Parses the parameter list according to the option hash passed to the constructor.
static hash< auto > parseEx(hash< auto > opts, reference< list< string >> pgm_args)
Parses the given options and returns a hash of the parsed options and throws and exception if there a...
hash< auto > parse3(reference< list< string >> pgm_args)
Parses the parameter list according to the option hash passed to the constructor and displays an expl...
copy()
Throws an exception; objects of this class cannot be copied.
static hash< auto > parseExit(hash< auto > opts, reference< list< string >> pgm_args)
Parses the given options and returns a hash of the parsed options; prints out an error message and ex...
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:2
The GetOpt class provides an easy way to process POSIX-style command-line options in Qore scripts/pro...
Definition: QC_GetOpt.dox.h:5