Public Member Functions | Private Attributes
ProgramOptions::Option Class Reference

Represents one program option. More...

#include <program_options.h>

Inheritance diagram for ProgramOptions::Option:
Inheritance graph
[legend]

List of all members.

Public Member Functions

char alias () const
const char * argName () const
bool assignDefault () const
DescriptionLevel descLevel () const
const char * description () const
std::size_t maxColumn () const
const std::string & name () const
 Option (const std::string &longName, char shortName, const char *description, Value *value)
Valuevalue () const
 ~Option ()

Private Attributes

const char * description_
std::string name_
Valuevalue_

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.

Definition at line 45 of file program_options.h.


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

Definition at line 186 of file program_options.cpp.

Definition at line 195 of file program_options.cpp.


Member Function Documentation

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

Definition at line 61 of file program_options.h.

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

Definition at line 64 of file program_options.h.

Definition at line 219 of file program_options.cpp.

Definition at line 67 of file program_options.h.

const char* ProgramOptions::Option::description ( ) const [inline]

Definition at line 63 of file program_options.h.

std::size_t ProgramOptions::Option::maxColumn ( ) const

Definition at line 198 of file program_options.cpp.

const std::string& ProgramOptions::Option::name ( ) const [inline]

Definition at line 60 of file program_options.h.

Value* ProgramOptions::Option::value ( ) const [inline]

Definition at line 62 of file program_options.h.


Member Data Documentation

const char* ProgramOptions::Option::description_ [private]

Definition at line 70 of file program_options.h.

std::string ProgramOptions::Option::name_ [private]

Definition at line 69 of file program_options.h.

Definition at line 71 of file program_options.h.


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


clasp
Author(s): Benjamin Kaufmann
autogenerated on Thu Aug 27 2015 12:41:41