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

- Class List
- Class Hierarchy
- Class Members

# schroot::options_base Class Reference

Basic schroot command-line options. More...

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

Inheritance diagram for schroot::options_base:

[legend]
Collaboration diagram for schroot::options_base:

[legend]
List of all members.

## Public Types
typedef std::tr1::shared_ptr< options_base > | ptr
| A shared_ptr to an options_base object.
| ACTION_SESSION_AUTO
| Begin, run and end a session.
| ACTION_SESSION_BEGIN
| Begin a session.
| ACTION_SESSION_RECOVER
| Recover an existing session.
| ACTION_SESSION_RUN
| Run an existing session.
| ACTION_SESSION_END
| End an existing session.
| ACTION_HELP
| Display program help.
| ACTION_VERSION
| Display program version.
| ACTION_LIST
| Display a list of chroots.
| ACTION_INFO
| Display chroot information.
| ACTION_LOCATION
| Display chroot location information.
| ACTION_CONFIG
| Display chroot configuration.
enum | action_type { ACTION_SESSION_AUTO, ACTION_SESSION_BEGIN, ACTION_SESSION_RECOVER, ACTION_SESSION_RUN, ACTION_SESSION_END, ACTION_HELP, ACTION_VERSION, ACTION_LIST, ACTION_INFO, ACTION_LOCATION, ACTION_CONFIG }
| The action to perform. More...
## Public Member Functions
| options_base ()
| The constructor.
virtual | ~options_base ()
| The destructor.
## Public Attributes
action_type | action
| The action to perform.
sbuild::string_list | chroots
| Chroots to use.
std::string | chroot_path
| Chroot to print path.
sbuild::string_list | command
| Command to run.
std::string | directory
| Directory to use.
std::string | user
| User to run as.
bool | preserve
| Preserve environment.
bool | all
| Use all chroots and sessions.
bool | all_chroots
| Use all chroots.
bool | all_sessions
| Use all sessions.
bool | load_chroots
| Load chroots.
bool | load_sessions
| Load sessions.
bool | session_force
| Force session operations.
## Protected Member Functions
void | set_action (action_type action)
| Set action.
bool | all_used () const
| Check if any of the --all options have been used.
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 | chroot
| Chroot options group.
boost::program_options::options_description | chrootenv
| Chroot environment options group.
boost::program_options::options_description | session
| Session options group.

## Detailed Description

Basic schroot command-line options.

This is specialised by the frontends to suit their particular command-line options and behaviour. This class contains functionality and options common to all schroot programs (schroot, dchroot, dchroot-dsa).

## Member Typedef Documentation

typedef std::tr1::shared_ptr<options_base> schroot::options_base::ptr

A shared_ptr to an options_base object.

Reimplemented from schroot_base::options.

## Member Enumeration Documentation

enum schroot::options_base::action_type

The action to perform.

Enumerator:

  ACTION_SESSION_AUTO | Begin, run and end a session.
  ACTION_SESSION_BEGIN | Begin a session.
  ACTION_SESSION_RECOVER | Recover an existing session.
  ACTION_SESSION_RUN | Run an existing session.
  ACTION_SESSION_END | End an existing session.
  ACTION_HELP | Display program help.
  ACTION_VERSION | Display program version.
  ACTION_LIST | Display a list of chroots.
  ACTION_INFO | Display chroot information.
  ACTION_LOCATION | Display chroot location information.
  ACTION_CONFIG | Display chroot configuration.

## Constructor & Destructor Documentation

options_base::options_base | ( |  | ) |

The constructor.

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

The destructor.

## Member Function Documentation

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

Add option groups to container groups.

Reimplemented from schroot_base::options.

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

Add options to option groups.

Reimplemented from schroot_base::options.

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

bool schroot::options_base::all_used | ( |  | ) | const`[inline, protected]`

Check if any of the --all options have been used.

Returns:
  true if any of the options have been used, otherwise false.

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

Check actions after parsing.

Reimplemented from schroot_base::options.

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

Check options after parsing.

Reimplemented from schroot_base::options.

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

void options_base::set_action | ( | action_type | action | ) | `[protected]`

Set action.

This detects if an action has already been set (only one action may be specified at once).

Parameters:

  | action | the action to set.

## Member Data Documentation

action_type schroot::options_base::action

The action to perform.

bool schroot::options_base::all

Use all chroots and sessions.

bool schroot::options_base::all_chroots

Use all chroots.

bool schroot::options_base::all_sessions

Use all sessions.

boost::program_options::options_description schroot::options_base::chroot`[protected]`

Chroot options group.

std::string schroot::options_base::chroot_path

Chroot to print path.

boost::program_options::options_description schroot::options_base::chrootenv`[protected]`

Chroot environment options group.

sbuild::string_list schroot::options_base::chroots

Chroots to use.

sbuild::string_list schroot::options_base::command

Command to run.

std::string schroot::options_base::directory

Directory to use.

bool schroot::options_base::load_chroots

Load chroots.

bool schroot::options_base::load_sessions

Load sessions.

bool schroot::options_base::preserve

Preserve environment.

boost::program_options::options_description schroot::options_base::session`[protected]`

Session options group.

bool schroot::options_base::session_force

Force session operations.

std::string schroot::options_base::user

User to run as.

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

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