abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Minisat::StringOption Class Reference

#include <Options.h>

Inherits Minisat::Option.

Public Member Functions

 StringOption (const char *c, const char *n, const char *d, const char *def=NULL)
 
 operator const char * (void) const
 
 operator const char *& (void)
 
StringOptionoperator= (const char *x)
 
virtual bool parse (const char *str)
 
virtual void help (bool verbose=false)
 

Static Public Member Functions

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

Data Fields

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

Private Attributes

const char * value
 

Detailed Description

Definition at line 307 of file Options.h.

Constructor & Destructor Documentation

Minisat::StringOption::StringOption ( const char *  c,
const char *  n,
const char *  d,
const char *  def = NULL 
)
inline

Definition at line 311 of file Options.h.

312  : Option(n, d, c, "<string>"), value(def) {}
const char * value
Definition: Options.h:309
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 ( )
inlinestaticinherited

Definition at line 58 of file Options.h.

58 { static const char* help_prefix_str = ""; return help_prefix_str; }
static vec<Option*>& Minisat::Option::getOptionList ( )
inlinestaticinherited

Definition at line 56 of file Options.h.

56 { static vec<Option*> options; return options; }
static const char*& Minisat::Option::getUsageString ( )
inlinestaticinherited

Definition at line 57 of file Options.h.

57 { static const char* usage_str; return usage_str; }
virtual void Minisat::StringOption::help ( bool  verbose = false)
inlinevirtual

Implements Minisat::Option.

Definition at line 328 of file Options.h.

328  {
329  fprintf(stderr, " -%-10s = %8s\n", name, type_name);
330  if (verbose){
331  fprintf(stderr, "\n %s\n", description);
332  fprintf(stderr, "\n");
333  }
334  }
const char * name
Definition: Options.h:51
const char * type_name
Definition: Options.h:54
const char * description
Definition: Options.h:52
Minisat::StringOption::operator const char * ( void  ) const
inline

Definition at line 314 of file Options.h.

314 { return value; }
const char * value
Definition: Options.h:309
Minisat::StringOption::operator const char *& ( void  )
inline

Definition at line 315 of file Options.h.

315 { return value; }
const char * value
Definition: Options.h:309
StringOption& Minisat::StringOption::operator= ( const char *  x)
inline

Definition at line 316 of file Options.h.

316 { value = x; return *this; }
const char * value
Definition: Options.h:309
virtual bool Minisat::StringOption::parse ( const char *  str)
inlinevirtual

Implements Minisat::Option.

Definition at line 318 of file Options.h.

318  {
319  const char* span = str;
320 
321  if (!match(span, "-") || !match(span, name) || !match(span, "="))
322  return false;
323 
324  value = span;
325  return true;
326  }
const char * name
Definition: Options.h:51
const char * value
Definition: Options.h:309
static bool match(B &in, const char *str)
Definition: ParseUtils.h:99

Field Documentation

const char* Minisat::Option::category
inherited

Definition at line 53 of file Options.h.

const char* Minisat::Option::description
inherited

Definition at line 52 of file Options.h.

const char* Minisat::Option::name
inherited

Definition at line 51 of file Options.h.

const char* Minisat::Option::type_name
inherited

Definition at line 54 of file Options.h.

const char* Minisat::StringOption::value
private

Definition at line 309 of file Options.h.


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