125 |
125 |
126 ///Add a new integer type option |
126 ///Add a new integer type option |
127 |
127 |
128 ///\param name The name of the option. The leading '-' must be omitted. |
128 ///\param name The name of the option. The leading '-' must be omitted. |
129 ///\param help A help string. |
129 ///\param help A help string. |
130 ///\retval value The value of the argument will be written to this variable. |
130 ///\param value A default value for the option |
131 ///\param obl Indicate if the option is mandatory. |
131 ///\param obl Indicate if the option is mandatory. |
132 ArgParser &intOption(const std::string &name, |
132 ArgParser &intOption(const std::string &name, |
133 const std::string &help, |
133 const std::string &help, |
134 int value=0, bool obl=false); |
134 int value=0, bool obl=false); |
135 |
135 |
136 ///Add a new floating point type option |
136 ///Add a new floating point type option |
137 |
137 |
138 ///\param name The name of the option. The leading '-' must be omitted. |
138 ///\param name The name of the option. The leading '-' must be omitted. |
139 ///\param help A help string. |
139 ///\param help A help string. |
140 ///\retval value The value of the argument will be written to this variable. |
140 ///\param value A default value for the option |
141 ///\param obl Indicate if the option is mandatory. |
141 ///\param obl Indicate if the option is mandatory. |
142 ArgParser &doubleOption(const std::string &name, |
142 ArgParser &doubleOption(const std::string &name, |
143 const std::string &help, |
143 const std::string &help, |
144 double value=0, bool obl=false); |
144 double value=0, bool obl=false); |
145 |
145 |
146 ///Add a new bool type option |
146 ///Add a new bool type option |
147 |
147 |
148 ///\param name The name of the option. The leading '-' must be omitted. |
148 ///\param name The name of the option. The leading '-' must be omitted. |
149 ///\param help A help string. |
149 ///\param help A help string. |
150 ///\retval value The value of the argument will be written to this variable. |
150 ///\param value A default value for the option |
151 ///\param obl Indicate if the option is mandatory. |
151 ///\param obl Indicate if the option is mandatory. |
152 ////\note A mandatory bool obtion is of very little use.) |
152 ////\note A mandatory bool obtion is of very little use.) |
153 ArgParser &boolOption(const std::string &name, |
153 ArgParser &boolOption(const std::string &name, |
154 const std::string &help, |
154 const std::string &help, |
155 bool value=false, bool obl=false); |
155 bool value=false, bool obl=false); |
156 |
156 |
157 ///Add a new string type option |
157 ///Add a new string type option |
158 |
158 |
159 ///\param name The name of the option. The leading '-' must be omitted. |
159 ///\param name The name of the option. The leading '-' must be omitted. |
160 ///\param help A help string. |
160 ///\param help A help string. |
161 ///\retval value The value of the argument will be written to this variable. |
161 ///\param value A default value for the option |
162 ///\param obl Indicate if the option is mandatory. |
162 ///\param obl Indicate if the option is mandatory. |
163 ArgParser &stringOption(const std::string &name, |
163 ArgParser &stringOption(const std::string &name, |
164 const std::string &help, |
164 const std::string &help, |
165 std::string value="", bool obl=false); |
165 std::string value="", bool obl=false); |
166 |
166 |
172 |
172 |
173 ///Add a new integer type option with a storage reference |
173 ///Add a new integer type option with a storage reference |
174 |
174 |
175 ///\param name The name of the option. The leading '-' must be omitted. |
175 ///\param name The name of the option. The leading '-' must be omitted. |
176 ///\param help A help string. |
176 ///\param help A help string. |
|
177 ///\param obl Indicate if the option is mandatory. |
177 ///\retval ref The value of the argument will be written to this variable. |
178 ///\retval ref The value of the argument will be written to this variable. |
178 ///\param obl Indicate if the option is mandatory. |
|
179 ArgParser &refOption(const std::string &name, |
179 ArgParser &refOption(const std::string &name, |
180 const std::string &help, |
180 const std::string &help, |
181 int &ref, bool obl=false); |
181 int &ref, bool obl=false); |
182 |
182 |
183 ///Add a new floating type option with a storage reference |
183 ///Add a new floating type option with a storage reference |
184 |
184 |
185 ///\param name The name of the option. The leading '-' must be omitted. |
185 ///\param name The name of the option. The leading '-' must be omitted. |
186 ///\param help A help string. |
186 ///\param help A help string. |
|
187 ///\param obl Indicate if the option is mandatory. |
187 ///\retval ref The value of the argument will be written to this variable. |
188 ///\retval ref The value of the argument will be written to this variable. |
188 ///\param obl Indicate if the option is mandatory. |
|
189 ArgParser &refOption(const std::string &name, |
189 ArgParser &refOption(const std::string &name, |
190 const std::string &help, |
190 const std::string &help, |
191 double &ref, bool obl=false); |
191 double &ref, bool obl=false); |
192 |
192 |
193 ///Add a new bool type option with a storage reference |
193 ///Add a new bool type option with a storage reference |
194 |
194 |
195 ///\param name The name of the option. The leading '-' must be omitted. |
195 ///\param name The name of the option. The leading '-' must be omitted. |
196 ///\param help A help string. |
196 ///\param help A help string. |
|
197 ///\param obl Indicate if the option is mandatory. |
197 ///\retval ref The value of the argument will be written to this variable. |
198 ///\retval ref The value of the argument will be written to this variable. |
198 ///\param obl Indicate if the option is mandatory. |
|
199 ////\note A mandatory bool obtion is of very little use.) |
199 ////\note A mandatory bool obtion is of very little use.) |
200 ArgParser &refOption(const std::string &name, |
200 ArgParser &refOption(const std::string &name, |
201 const std::string &help, |
201 const std::string &help, |
202 bool &ref, bool obl=false); |
202 bool &ref, bool obl=false); |
203 |
203 |