- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# schroot_base::options Class Reference

Basic schroot command-line options. More...

`#include <schroot-base-options.h>`

Inheritance diagram for schroot_base::options:

[legend]
Collaboration diagram for schroot_base::options:

[legend]
List of all members.

## Public Types
typedef std::tr1::shared_ptr< options > | ptr
| A shared_ptr to an options object.
## Public Member Functions
| options ()
| The constructor.
virtual | ~options ()
| The destructor.
void | parse (int argc, char *argv[])
| Parse the command-line options.
boost::program_options::options_description const & | get_visible_options () const
| Get the visible options group.
## Public Attributes
bool | quiet
| Quiet messages.
bool | verbose
| Verbose messages.
## Protected Member Functions
virtual void | add_options ()
| Add options to option groups.
virtual void | add_option_groups ()
| Add option groups to container groups.
virtual void | check_options ()
| Check options after parsing.
virtual void | check_actions ()
| Check actions after parsing.
## Protected Attributes
boost::program_options::options_description | general
| General options group.
boost::program_options::options_description | hidden
| Hidden options group.
boost::program_options::positional_options_description | positional
| Positional options group.
boost::program_options::options_description | visible
| Visible options container (used for --help).
boost::program_options::options_description | global
| Global options container (used for parsing).
boost::program_options::variables_map | vm
| Variables map, filled during parsing.
## Private Attributes
std::string | debug_level
| Debug level string.

## Detailed Description

Basic schroot command-line options.

This is specialised by the frontends to suit their particular command-line options and behaviour. This class implements the functionality common to all options parsing classes.

## Member Typedef Documentation

typedef std::tr1::shared_ptr<options> schroot_base::options::ptr

A shared_ptr to an options object.

Reimplemented in schroot_listmounts::options, schroot::options_base, and schroot_releaselock::options.

## Constructor & Destructor Documentation

options::options | ( |  | ) |

The constructor.

Reimplemented in schroot_listmounts::options, schroot::options, schroot_releaselock::options, dchroot::options, and dchroot_dsa::options.

options::~options | ( |  | ) | `[virtual]`

The destructor.

Reimplemented in schroot_listmounts::options, schroot::options, schroot_releaselock::options, dchroot::options, and dchroot_dsa::options.

## Member Function Documentation

void options::add_option_groups | ( |  | ) | `[protected, virtual]`

Add option groups to container groups.

Reimplemented in schroot_listmounts::options, schroot::options_base, and schroot_releaselock::options.

void options::add_options | ( |  | ) | `[protected, virtual]`

Add options to option groups.

Reimplemented in schroot_listmounts::options, schroot::options_base, schroot::options, schroot_releaselock::options, dchroot::options, and dchroot_dsa::options.

void options::check_actions | ( |  | ) | `[protected, virtual]`

Check actions after parsing.

Reimplemented in schroot::options_base.

void options::check_options | ( |  | ) | `[protected, virtual]`

Check options after parsing.

Reimplemented in schroot_listmounts::options, schroot::options_base, schroot::options, schroot_releaselock::options, dchroot::options, and dchroot_dsa::options.

boost::program_options::options_description const & options::get_visible_options | ( |  | ) | const

Get the visible options group.

This options group contains all the options visible to the user.

Returns:
  the options_description.

void options::parse | ( | int | argc,
|  | char * | argv[] |
| ) |  |  |

Parse the command-line options.

Parameters:

  | argc | the number of arguments
  | argv | argument vector

## Member Data Documentation

std::string schroot_base::options::debug_level`[private]`

Debug level string.

boost::program_options::options_description schroot_base::options::general`[protected]`

General options group.

boost::program_options::options_description schroot_base::options::global`[protected]`

Global options container (used for parsing).

boost::program_options::options_description schroot_base::options::hidden`[protected]`

Hidden options group.

boost::program_options::positional_options_description schroot_base::options::positional`[protected]`

Positional options group.

bool schroot_base::options::quiet

Quiet messages.

bool schroot_base::options::verbose

Verbose messages.

boost::program_options::options_description schroot_base::options::visible`[protected]`

Visible options container (used for --help).

boost::program_options::variables_map schroot_base::options::vm`[protected]`

Variables map, filled during parsing.

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

- schroot/schroot-base-options.h
- schroot/schroot-base-options.cc