GetOpt.hpp File Reference

Abstraction of GNU C "getopt_long(3)". More...

`#include <string>`
`#include <vector>`
`#include <getopt.h>`
Include dependency graph for GetOpt.hpp:

## Data Structures

class | UI::Util::CLOption
| Most general class for a command line option. Use this class for a option without argument. More...
class | UI::Util::CLOptionArg
| Class representing a command line option with mandatory argument. More...
class | UI::Util::CLOptionOptArg
| Class representing a command line option with optional argument. More...
class | UI::Util::GetOpt
| Abstraction class for GNU getopt_long(3). More...

## Namespaces

namespace | UI
| Namespace for any Schlund+Partner C++ code.
namespace | UI::Util
| Namespace for ui-utilcpp.

## Detailed Description

Abstraction of GNU C "getopt_long(3)".

Author
  Schlund + Partner AG

Deprecated:
  Leagcy - don't use this for new code – use boost::program_options instead.

Synopsis:

#include <ui-utilcpp/GetOpt.hpp>
GetOpt.hpp
Abstraction of GNU C "getopt_long(3)".

     Notes:
     - A "command line option" has the form "--<nameLong>=<arg>" or "-<nameShort> <arg>".
     - Arg can be optional.
     - Parser used is GNU getoptAlong.

     Limitations / todos:
      - Currently, all c.l.options MUST have a short _and_ a long option.

     Usage (informal):
     - GetOpt getOpt(argc, argv)
     - { getOpt.set(...) }

- CLOption * opt0(getOpt.get("version" | 'v'))
  - getOpt.isValid(), opt0->isGiven(), ...