clingo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Public Member Functions | List of all members
ProgramOptions::Option Class Reference

Represents one program option. More...

#include <program_options.h>

Inheritance diagram for ProgramOptions::Option:
Inheritance graph
Collaboration diagram for ProgramOptions::Option:
Collaboration graph

Public Member Functions

 Option (const std::string &longName, char shortName, const char *description, Value *value)
 
 ~Option ()
 
const std::string & name () const
 
char alias () const
 
Valuevalue () const
 
const char * description () const
 
const char * argName () const
 
bool assignDefault () const
 
std::size_t maxColumn () const
 
DescriptionLevel descLevel () const
 
- Public Member Functions inherited from ProgramOptions::detail::RefCountable
 RefCountable ()
 
int addRef ()
 
int release ()
 
int refCount () const
 

Detailed Description

Represents one program option.

An Option consists of a description (long name, short name, description), a (typed) value, and an optional default value.

Note
When printing an option, occurrences of D, I and A in its description are replaced with the option's default value, implicit value and the argument name, respectively.

Constructor & Destructor Documentation

ProgramOptions::Option::Option ( const std::string &  longName,
char  shortName,
const char *  description,
Value value 
)
Precondition
longName != ""
vd != 0
Parameters
longNamename (and unique key) of the option
shortNamepossible alias name
descriptiondescription of the option, used for printing help
valuevalue object to be associated with this option

Here is the call graph for this function:

ProgramOptions::Option::~Option ( )

Member Function Documentation

char ProgramOptions::Option::alias ( ) const
inline

Here is the call graph for this function:

const char* ProgramOptions::Option::argName ( ) const
inline

Here is the call graph for this function:

bool ProgramOptions::Option::assignDefault ( ) const

Here is the call graph for this function:

DescriptionLevel ProgramOptions::Option::descLevel ( ) const
inline

Here is the call graph for this function:

const char* ProgramOptions::Option::description ( ) const
inline
std::size_t ProgramOptions::Option::maxColumn ( ) const

Here is the call graph for this function:

const std::string& ProgramOptions::Option::name ( ) const
inline
Value* ProgramOptions::Option::value ( ) const
inline

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