#include <Options.h>
Definition at line 183 of file Options.h.
◆ IntOption()
Definition at line 190 of file Options.h.
Option(const char *name_, const char *desc_, const char *cate_, const char *type_)
◆ help()
| virtual void Minisat::IntOption::help |
( |
bool | verbose = false | ) |
|
|
inlinevirtual |
Implements Minisat::Option.
Definition at line 220 of file Options.h.
220 {
223 fprintf(stderr, "imin");
224 else
225 fprintf(stderr,
"%4d",
range.begin);
226
227 fprintf(stderr, " .. ");
229 fprintf(stderr, "imax");
230 else
231 fprintf(stderr,
"%4d",
range.end);
232
233 fprintf(stderr,
"] (default: %d)\n",
value);
234 if (verbose){
236 fprintf(stderr, "\n");
237 }
238 }
◆ operator int32_t()
| Minisat::IntOption::operator int32_t |
( |
void | | ) |
const |
|
inline |
◆ operator int32_t &()
| Minisat::IntOption::operator int32_t & |
( |
void | | ) |
|
|
inline |
◆ operator=()
| IntOption & Minisat::IntOption::operator= |
( |
int32_t | x | ) |
|
|
inline |
◆ parse()
| virtual bool Minisat::IntOption::parse |
( |
const char * | str | ) |
|
|
inlinevirtual |
Implements Minisat::Option.
Definition at line 197 of file Options.h.
197 {
198 const char* span = str;
199
200 if (!match(span,
"-") || !match(span,
name) || !match(span,
"="))
201 return false;
202
203 char* end;
204 int32_t tmp = strtol(span, &end, 10);
205
206 if (end == NULL)
207 return false;
208 else if (tmp >
range.end){
209 fprintf(stderr,
"ERROR! value <%s> is too large for option \"%s\".\n", span,
name);
211 }
else if (tmp <
range.begin){
212 fprintf(stderr,
"ERROR! value <%s> is too small for option \"%s\".\n", span,
name);
214
216
217 return true;
218 }
◆ range
◆ value
| int32_t Minisat::IntOption::value |
|
protected |
The documentation for this class was generated from the following file: