clingo
|
A list of options logically grouped under a caption. More...
#include <program_options.h>
Public Types | |
typedef std::vector< SharedOptPtr > | OptionList |
typedef OptionList::const_iterator | option_iterator |
Public Member Functions | |
OptionGroup (const std::string &caption="", DescriptionLevel descLevel=desc_level_default) | |
~OptionGroup () | |
const std::string & | caption () const |
Returns the caption of this group. More... | |
std::size_t | size () const |
bool | empty () const |
option_iterator | begin () const |
option_iterator | end () const |
DescriptionLevel | descLevel () const |
OptionInitHelper | addOptions () |
Returns an object that can be used to add options. More... | |
void | addOption (std::auto_ptr< Option > option) |
Adds option to this group. More... | |
void | setDescriptionLevel (DescriptionLevel level) |
void | format (OptionOutput &out, size_t maxW, DescriptionLevel level=desc_level_default) const |
Creates a formated description of all options with level() <= level in this group. More... | |
std::size_t | maxColumn (DescriptionLevel level) const |
Friends | |
class | OptionContext |
A list of options logically grouped under a caption.
The class provides a logical grouping of options that is mainly useful for printing help.
typedef OptionList::const_iterator ProgramOptions::OptionGroup::option_iterator |
typedef std::vector<SharedOptPtr> ProgramOptions::OptionGroup::OptionList |
ProgramOptions::OptionGroup::OptionGroup | ( | const std::string & | caption = "" , |
DescriptionLevel | descLevel = desc_level_default |
||
) |
Creates a new group of options under the given caption.
ProgramOptions::OptionGroup::~OptionGroup | ( | ) |
void ProgramOptions::OptionGroup::addOption | ( | std::auto_ptr< Option > | option | ) |
Adds option to this group.
OptionInitHelper ProgramOptions::OptionGroup::addOptions | ( | ) |
Returns an object that can be used to add options.
|
inline |
|
inline |
Returns the caption of this group.
|
inline |
|
inline |
|
inline |
void ProgramOptions::OptionGroup::format | ( | OptionOutput & | out, |
size_t | maxW, | ||
DescriptionLevel | level = desc_level_default |
||
) | const |
Creates a formated description of all options with level() <= level in this group.
std::size_t ProgramOptions::OptionGroup::maxColumn | ( | DescriptionLevel | level | ) | const |
|
inline |
|
inline |
|
friend |