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

#include <Options.h>

Inherited by Minisat::BoolOption, Minisat::DoubleOption, Minisat::IntOption, and Minisat::StringOption.

Data Structures

struct  OptionLt
 

Public Member Functions

 Option (const char *name_, const char *desc_, const char *cate_, const char *type_)
 
virtual ~Option ()
 
virtual bool parse (const char *str)=0
 
virtual void help (bool verbose=false)=0
 

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
 

Friends

int parseOptions (int &argc, char **argv, bool strict)
 
int printUsageAndExit (int argc, char **argv, bool verbose)
 
void setUsageHelp (const char *str)
 
void setHelpPrefixStr (const char *str)
 

Detailed Description

Definition at line 48 of file Options.h.

Constructor & Destructor Documentation

Minisat::Option::Option ( const char *  name_,
const char *  desc_,
const char *  cate_,
const char *  type_ 
)
inline

Definition at line 67 of file Options.h.

70  :
71  name (name_)
72  , description(desc_)
73  , category (cate_)
74  , type_name (type_)
75  {
76  getOptionList().push(this);
77  }
const char * name
Definition: Options.h:51
static vec< Option * > & getOptionList()
Definition: Options.h:56
const char * category
Definition: Options.h:53
const char * type_name
Definition: Options.h:54
const char * description
Definition: Options.h:52
virtual Minisat::Option::~Option ( )
inlinevirtual

Definition at line 80 of file Options.h.

80 {}

Member Function Documentation

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

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 ( )
inlinestatic

Definition at line 56 of file Options.h.

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

Definition at line 57 of file Options.h.

57 { static const char* usage_str; return usage_str; }
virtual void Minisat::Option::help ( bool  verbose = false)
pure virtual
virtual bool Minisat::Option::parse ( const char *  str)
pure virtual

Friends And Related Function Documentation

int parseOptions ( int &  argc,
char **  argv,
bool  strict 
)
friend
int printUsageAndExit ( int  argc,
char **  argv,
bool  verbose 
)
friend
void setHelpPrefixStr ( const char *  str)
friend
void setUsageHelp ( const char *  str)
friend

Field Documentation

const char* Minisat::Option::category

Definition at line 53 of file Options.h.

const char* Minisat::Option::description

Definition at line 52 of file Options.h.

const char* Minisat::Option::name

Definition at line 51 of file Options.h.

const char* Minisat::Option::type_name

Definition at line 54 of file Options.h.


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