schroot::options_base Class Reference

Basic schroot command-line options. More...

#include <schroot-options-base.h>

Inheritance diagram for schroot::options_base:

Inheritance graph
[legend]
Collaboration diagram for schroot::options_base:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::tr1::shared_ptr<
options_base
ptr
 A shared_ptr to an options_base object.

Public Member Functions

 options_base ()
 The constructor.
virtual ~options_base ()
 The destructor.

Public Attributes

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.
std::string session_name
 Session name.
bool session_force
 Force session operations.

Static Public Attributes

static const action_type ACTION_SESSION_AUTO
 Begin, run and end a session.
static const action_type ACTION_SESSION_BEGIN
 Begin a session.
static const action_type ACTION_SESSION_RECOVER
 Recover an existing session.
static const action_type ACTION_SESSION_RUN
 Run an existing session.
static const action_type ACTION_SESSION_END
 End an existing session.
static const action_type ACTION_LIST
 Display a list of chroots.
static const action_type ACTION_INFO
 Display chroot information.
static const action_type ACTION_LOCATION
 Display chroot location information.
static const action_type ACTION_CONFIG
 Display chroot configuration.

Protected Member Functions

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_actions
 Session actions group.
boost::program_options::options_description session_options
 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).

Definition at line 50 of file schroot-options-base.h.


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.

Definition at line 73 of file schroot-options-base.h.


Constructor & Destructor Documentation

options_base::options_base (  ) 

The constructor.

Definition at line 46 of file schroot-options-base.cc.

options_base::~options_base (  )  [virtual]

The destructor.

Definition at line 64 of file schroot-options-base.cc.


Member Function Documentation

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.

Definition at line 116 of file schroot-options-base.h.

Referenced by check_actions(), dchroot::options::check_options(), and dchroot_dsa::options::check_options().

Here is the caller graph for this function:

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.

Definition at line 69 of file schroot-options-base.cc.

References schroot_base::options::action, ACTION_CONFIG, ACTION_INFO, ACTION_LIST, ACTION_LOCATION, ACTION_SESSION_AUTO, ACTION_SESSION_BEGIN, ACTION_SESSION_END, ACTION_SESSION_RECOVER, ACTION_SESSION_RUN, schroot_base::options::actions, schroot_base::options::add_options(), chroot, chroots, command, schroot_base::options::hidden, and schroot_base::options::positional.

Referenced by schroot::options::add_options(), dchroot::options::add_options(), and dchroot_dsa::options::add_options().

Here is the caller graph for this function:

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

Add option groups to container groups.

Reimplemented from schroot_base::options.

Definition at line 105 of file schroot-options-base.cc.

References schroot_base::options::add_option_groups(), chroot, chrootenv, schroot_base::options::global, session_actions, session_options, and schroot_base::options::visible.

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.

Definition at line 150 of file schroot-options-base.cc.

References ACTION_CONFIG, ACTION_INFO, ACTION_LIST, schroot_base::options::check_options(), and schroot_base::options::vm.

Referenced by schroot::options::check_options(), dchroot::options::check_options(), and dchroot_dsa::options::check_options().

Here is the caller graph for this function:

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

Check actions after parsing.

Reimplemented from schroot_base::options.

Definition at line 164 of file schroot-options-base.cc.

References ACTION_CONFIG, schroot_base::options::ACTION_HELP, ACTION_INFO, ACTION_LIST, ACTION_LOCATION, ACTION_SESSION_AUTO, ACTION_SESSION_BEGIN, ACTION_SESSION_END, ACTION_SESSION_RECOVER, ACTION_SESSION_RUN, schroot_base::options::ACTION_VERSION, all, all_chroots, all_sessions, all_used(), schroot_base::options::check_actions(), load_chroots, load_sessions, sbuild::log_info(), and sbuild::log_warning().


Member Data Documentation

const options_base::action_type options_base::ACTION_SESSION_AUTO [static]

Begin, run and end a session.

Definition at line 54 of file schroot-options-base.h.

Referenced by add_options(), check_actions(), and schroot::options::check_options().

const options_base::action_type options_base::ACTION_SESSION_BEGIN [static]

Begin a session.

Definition at line 56 of file schroot-options-base.h.

Referenced by add_options(), check_actions(), schroot::options::check_options(), and schroot::main_base::run_impl().

const options_base::action_type options_base::ACTION_SESSION_RECOVER [static]

Recover an existing session.

Definition at line 58 of file schroot-options-base.h.

Referenced by add_options(), check_actions(), schroot::options::check_options(), and schroot::main_base::run_impl().

const options_base::action_type options_base::ACTION_SESSION_RUN [static]

Run an existing session.

Definition at line 60 of file schroot-options-base.h.

Referenced by add_options(), check_actions(), schroot::options::check_options(), and schroot::main_base::run_impl().

const options_base::action_type options_base::ACTION_SESSION_END [static]

End an existing session.

Definition at line 62 of file schroot-options-base.h.

Referenced by add_options(), check_actions(), schroot::options::check_options(), and schroot::main_base::run_impl().

const options_base::action_type options_base::ACTION_LIST [static]

Display a list of chroots.

Definition at line 64 of file schroot-options-base.h.

Referenced by add_options(), check_actions(), check_options(), dchroot_dsa::options::check_options(), and schroot::main_base::run_impl().

const options_base::action_type options_base::ACTION_INFO [static]

Display chroot information.

Definition at line 66 of file schroot-options-base.h.

Referenced by add_options(), check_actions(), check_options(), dchroot_dsa::options::check_options(), and schroot::main_base::run_impl().

const options_base::action_type options_base::ACTION_LOCATION [static]

Display chroot location information.

Definition at line 68 of file schroot-options-base.h.

Referenced by add_options(), check_actions(), schroot::options::check_options(), dchroot::options::check_options(), dchroot_dsa::options::check_options(), and schroot::main_base::run_impl().

const options_base::action_type options_base::ACTION_CONFIG [static]

Display chroot configuration.

Definition at line 70 of file schroot-options-base.h.

Referenced by add_options(), check_actions(), check_options(), dchroot_dsa::options::check_options(), and schroot::main_base::run_impl().

sbuild::string_list schroot::options_base::chroots

Chroots to use.

Definition at line 82 of file schroot-options-base.h.

Referenced by add_options().

std::string schroot::options_base::chroot_path

Chroot to print path.

Definition at line 84 of file schroot-options-base.h.

Referenced by dchroot::options::add_options().

sbuild::string_list schroot::options_base::command

Command to run.

Definition at line 86 of file schroot-options-base.h.

Referenced by add_options(), and dchroot_dsa::options::check_options().

std::string schroot::options_base::directory

Directory to use.

Definition at line 88 of file schroot-options-base.h.

Referenced by schroot::options::add_options(), dchroot::options::add_options(), and dchroot_dsa::options::add_options().

std::string schroot::options_base::user

User to run as.

Definition at line 90 of file schroot-options-base.h.

bool schroot::options_base::preserve

Preserve environment.

Definition at line 92 of file schroot-options-base.h.

Referenced by dchroot_dsa::options::check_options().

bool schroot::options_base::all

Use all chroots and sessions.

Definition at line 94 of file schroot-options-base.h.

Referenced by check_actions(), and dchroot::options::check_options().

bool schroot::options_base::all_chroots

Use all chroots.

Definition at line 96 of file schroot-options-base.h.

Referenced by check_actions(), schroot::options::check_options(), and dchroot::options::check_options().

bool schroot::options_base::all_sessions

Use all sessions.

Definition at line 98 of file schroot-options-base.h.

Referenced by check_actions(), schroot::options::check_options(), and dchroot::options::check_options().

bool schroot::options_base::load_chroots

Load chroots.

Definition at line 100 of file schroot-options-base.h.

Referenced by check_actions().

bool schroot::options_base::load_sessions

Load sessions.

Definition at line 102 of file schroot-options-base.h.

Referenced by check_actions().

std::string schroot::options_base::session_name

Session name.

Definition at line 104 of file schroot-options-base.h.

Referenced by schroot::options::add_options().

bool schroot::options_base::session_force

Force session operations.

Definition at line 106 of file schroot-options-base.h.

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

Chroot options group.

Definition at line 134 of file schroot-options-base.h.

Referenced by add_option_groups(), schroot::options::add_options(), add_options(), dchroot::options::add_options(), and dchroot_dsa::options::add_options().

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

Chroot environment options group.

Definition at line 136 of file schroot-options-base.h.

Referenced by add_option_groups(), schroot::options::add_options(), dchroot::options::add_options(), and dchroot_dsa::options::add_options().

boost::program_options::options_description schroot::options_base::session_actions [protected]

Session actions group.

Definition at line 138 of file schroot-options-base.h.

Referenced by add_option_groups(), and schroot::options::add_options().

boost::program_options::options_description schroot::options_base::session_options [protected]

Session options group.

Definition at line 140 of file schroot-options-base.h.

Referenced by add_option_groups(), and schroot::options::add_options().


The documentation for this class was generated from the following files:
Generated on Sun Jul 8 21:24:30 2007 for schroot by  doxygen 1.5.2