yosys-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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)
 

Static Protected Member Functions

static vec< Option * > & getOptionList ()
 
static const char *& getUsageString ()
 
static const char *& getHelpPrefixString ()
 

Protected Attributes

const char * name
 
const char * description
 
const char * category
 
const char * type_name
 

Private Attributes

bool value
 

Detailed Description

Definition at line 341 of file Options.h.

Constructor & Destructor Documentation

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

Definition at line 346 of file Options.h.

347  : Option(n, d, c, "<bool>"), value(v) {}
tuple n
Definition: fsm/generate.py:59
Option(const char *name_, const char *desc_, const char *cate_, const char *type_)
Definition: Options.h:67

Member Function Documentation

static const char*& Minisat::Option::getHelpPrefixString ( )
inlinestaticprotectedinherited

Definition at line 58 of file Options.h.

58 { static const char* help_prefix_str = ""; return help_prefix_str; }

+ Here is the caller graph for this function:

static vec<Option*>& Minisat::Option::getOptionList ( )
inlinestaticprotectedinherited

Definition at line 56 of file Options.h.

56 { static vec<Option*> options; return options; }

+ Here is the caller graph for this function:

static const char*& Minisat::Option::getUsageString ( )
inlinestaticprotectedinherited

Definition at line 57 of file Options.h.

57 { static const char* usage_str; return usage_str; }

+ Here is the caller graph for this function:

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

Implements Minisat::Option.

Definition at line 367 of file Options.h.

367  {
368 
369  fprintf(stderr, " -%s, -no-%s", name, name);
370 
371  for (uint32_t i = 0; i < 32 - strlen(name)*2; i++)
372  fprintf(stderr, " ");
373 
374  fprintf(stderr, " ");
375  fprintf(stderr, "(default: %s)\n", value ? "on" : "off");
376  if (verbose){
377  fprintf(stderr, "\n %s\n", description);
378  fprintf(stderr, "\n");
379  }
380  }
const char * name
Definition: Options.h:51
const char * description
Definition: Options.h:52
Minisat::BoolOption::operator bool ( void  ) const
inline

Definition at line 349 of file Options.h.

349 { return value; }
Minisat::BoolOption::operator bool & ( void  )
inline

Definition at line 350 of file Options.h.

350 { return value; }
BoolOption& Minisat::BoolOption::operator= ( bool  b)
inline

Definition at line 351 of file Options.h.

351 { value = b; return *this; }
virtual bool Minisat::BoolOption::parse ( const char *  str)
inlinevirtual

Implements Minisat::Option.

Definition at line 353 of file Options.h.

353  {
354  const char* span = str;
355 
356  if (match(span, "-")){
357  bool b = !match(span, "no-");
358 
359  if (strcmp(span, name) == 0){
360  value = b;
361  return true; }
362  }
363 
364  return false;
365  }
const char * name
Definition: Options.h:51
static bool match(B &in, const char *str)
Definition: ParseUtils.h:96

+ Here is the call graph for this function:

Field Documentation

const char* Minisat::Option::category
protectedinherited

Definition at line 53 of file Options.h.

const char* Minisat::Option::description
protectedinherited

Definition at line 52 of file Options.h.

const char* Minisat::Option::name
protectedinherited

Definition at line 51 of file Options.h.

const char* Minisat::Option::type_name
protectedinherited

Definition at line 54 of file Options.h.

bool Minisat::BoolOption::value
private

Definition at line 343 of file Options.h.


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