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

#include <Options.h>

Inheritance diagram for Gluco::StringOption:
Collaboration diagram for Gluco::StringOption:

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)
 
- Public Member Functions inherited from Gluco::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 Gluco::Option
static vec< Option * > & getOptionList ()
 
static const char *& getUsageString ()
 
static const char *& getHelpPrefixString ()
 
- Public Attributes inherited from Gluco::Option
const char * name
 
const char * description
 
const char * category
 
const char * type_name
 

Detailed Description

Definition at line 310 of file Options.h.

Constructor & Destructor Documentation

◆ StringOption()

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

Definition at line 314 of file Options.h.

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

Member Function Documentation

◆ help()

virtual void Gluco::StringOption::help ( bool verbose = false)
inlinevirtual

Implements Gluco::Option.

Definition at line 331 of file Options.h.

331 {
332 fprintf(stderr, " -%-10s = %8s\n", name, type_name);
333 if (verbose){
334 fprintf(stderr, "\n %s\n", description);
335 fprintf(stderr, "\n");
336 }
337 }
const char * name
Definition Options.h:55
const char * description
Definition Options.h:56
const char * type_name
Definition Options.h:58

◆ operator const char *()

Gluco::StringOption::operator const char * ( void ) const
inline

Definition at line 317 of file Options.h.

317{ return value; }

◆ operator const char *&()

Gluco::StringOption::operator const char *& ( void )
inline

Definition at line 318 of file Options.h.

318{ return value; }

◆ operator=()

StringOption & Gluco::StringOption::operator= ( const char * x)
inline

Definition at line 319 of file Options.h.

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

◆ parse()

virtual bool Gluco::StringOption::parse ( const char * str)
inlinevirtual

Implements Gluco::Option.

Definition at line 321 of file Options.h.

321 {
322 const char* span = str;
323
324 if (!match(span, "-") || !match(span, name) || !match(span, "="))
325 return false;
326
327 value = span;
328 return true;
329 }

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