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).


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.


Constructor & Destructor Documentation

options_base::options_base (  ) 

The constructor.

options_base::~options_base (  )  [virtual]

The destructor.


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.

References all, all_chroots, and all_sessions.

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]

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

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

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


Member Data Documentation

Begin, run and end a session.

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

Chroot to print path.

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

Command to run.

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

User to run as.

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

Load chroots.

Referenced by check_actions().

Load sessions.

Referenced by check_actions().

Session name.

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

Force session operations.

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

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

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

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

Session actions group.

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

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

Session options group.

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


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

Generated on Mon May 5 09:27:50 2008 for schroot by  doxygen 1.5.5