ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
Minisat::BoolOption Class Reference

#include <Options.h>

Inheritance diagram for Minisat::BoolOption:
Collaboration diagram for Minisat::BoolOption:

Public Member Functions

 BoolOption (const char *c, const char *n, const char *d, bool v)
 
 operator bool (void) const
 
 operator bool & (void)
 
BoolOptionoperator= (bool b)
 
virtual bool parse (const char *str)
 
virtual void help (bool verbose=false)
 
- Public Member Functions inherited from Minisat::Option
 Option (const char *name_, const char *desc_, const char *cate_, const char *type_)
 
virtual ~Option ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Minisat::Option
static vec< Option * > & getOptionList ()
 
static const char *& getUsageString ()
 
static const char *& getHelpPrefixString ()
 
- Public Attributes inherited from Minisat::Option
const char * name
 
const char * description
 
const char * category
 
const char * type_name
 

Detailed Description

Definition at line 344 of file Options.h.

Constructor & Destructor Documentation

◆ BoolOption()

Minisat::BoolOption::BoolOption ( const char * c,
const char * n,
const char * d,
bool v )
inline

Definition at line 349 of file Options.h.

350 : Option(n, d, c, "<bool>"), value(v) {}
Option(const char *name_, const char *desc_, const char *cate_, const char *type_)
Definition Options.h:69
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ help()

virtual void Minisat::BoolOption::help ( bool verbose = false)
inlinevirtual

Implements Minisat::Option.

Definition at line 370 of file Options.h.

370 {
371
372 fprintf(stderr, " -%s, -no-%s", name, name);
373
374 for (uint32_t i = 0; i < 32 - strlen(name)*2; i++)
375 fprintf(stderr, " ");
376
377 fprintf(stderr, " ");
378 fprintf(stderr, "(default: %s)\n", value ? "on" : "off");
379 if (verbose){
380 fprintf(stderr, "\n %s\n", description);
381 fprintf(stderr, "\n");
382 }
383 }
unsigned int uint32_t
Definition Fxch.h:32
const char * name
Definition Options.h:53
const char * description
Definition Options.h:54
int strlen()
Here is the call graph for this function:

◆ operator bool()

Minisat::BoolOption::operator bool ( void ) const
inline

Definition at line 352 of file Options.h.

352{ return value; }

◆ operator bool &()

Minisat::BoolOption::operator bool & ( void )
inline

Definition at line 353 of file Options.h.

353{ return value; }

◆ operator=()

BoolOption & Minisat::BoolOption::operator= ( bool b)
inline

Definition at line 354 of file Options.h.

354{ value = b; return *this; }
Here is the call graph for this function:

◆ parse()

virtual bool Minisat::BoolOption::parse ( const char * str)
inlinevirtual

Implements Minisat::Option.

Definition at line 356 of file Options.h.

356 {
357 const char* span = str;
358
359 if (match(span, "-")){
360 bool b = !match(span, "no-");
361
362 if (strcmp(span, name) == 0){
363 value = b;
364 return true; }
365 }
366
367 return false;
368 }
int strcmp()
Here is the call graph for this function:

The documentation for this class was generated from the following file: