wibble::commandline::OptionGroup Class Reference

Group related commandline options. More...

`#include <options.h>`

Inheritance diagram for wibble::commandline::OptionGroup:
[legend]
Collaboration diagram for wibble::commandline::OptionGroup:
[legend]

## Public Member Functions

Option * | add (Option *o)
template<typename T >
T * | create (const std::string &name, char shortName, const std::string &longName, const std::string &usage=std::string(), const std::string &description=std::string())
| Create a new option. More...
template<typename T >
T * | add (const std::string &name, char shortName, const std::string &longName, const std::string &usage=std::string(), const std::string &description=std::string())
| Create a new option and add it to this group. More...
Public Member Functions inherited from wibble::commandline::Managed
virtual | ~Managed ()

## Public Attributes

std::vector< Option * > | options
std::string | description
bool | hidden

## Protected Member Functions

| OptionGroup (MemoryManager *mman=0, const std::string &description=std::string())

## Friends

class | Engine

## Detailed Description

Group related commandline options.

## Constructor & Destructor Documentation

wibble::commandline::OptionGroup::OptionGroup | ( | MemoryManager * | mman = `0`,
|  | const std::string & | description = `std::string()`
| ) |  |

inline protected

## Member Function Documentation

Option* wibble::commandline::OptionGroup::add | ( | Option * | o | ) |

inline

References options.

Referenced by add(), TestCommandlineDoc::basic(), TestCommandlineEngine::creationShortcuts(), wibble::commandline::StandardParser::StandardParser(), wibble::commandline::StandardParserWithManpage::StandardParserWithManpage(), and withCommands().

template<typename T >

T* wibble::commandline::OptionGroup::add | ( | const std::string & | name,
|  | char | shortName,
|  | const std::string & | longName,
|  | const std::string & | usage = `std::string()`,
|  | const std::string & | description = `std::string()`
| ) |  |

inline

Create a new option and add it to this group.

References add(), description, and usage().

template<typename T >

T* wibble::commandline::OptionGroup::create | ( | const std::string & | name,
|  | char | shortName,
|  | const std::string & | longName,
|  | const std::string & | usage = `std::string()`,
|  | const std::string & | description = `std::string()`
| ) |  |

inline

Create a new option.

References wibble::commandline::MemoryManager::add(), and usage().

## Friends And Related Function Documentation

friend class Engine

friend

## Member Data Documentation

std::string wibble::commandline::OptionGroup::description

Referenced by add().

bool wibble::commandline::OptionGroup::hidden

std::vector<Option*> wibble::commandline::OptionGroup::options

Referenced by add().

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

- options.h