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.
 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_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_VERSION, ACTION_LIST, ACTION_INFO,
  ACTION_LOCATION, ACTION_CONFIG
}
 The action to perform. More...

Public Member Functions

 options_base (int argc, char *argv[])
 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 user
 User to run as.
bool preserve
 Preserve environment.
bool quiet
 Quiet messages.
bool verbose
 Verbose messages.
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 ()
virtual void parse_options (int argc, char *argv[])
virtual void check_options ()
virtual void check_actions ()

Protected Attributes

boost::program_options::options_description general
boost::program_options::options_description chroot
boost::program_options::options_description chrootenv
boost::program_options::options_description session
boost::program_options::options_description hidden
boost::program_options::positional_options_description positional
boost::program_options::options_description visible
boost::program_options::options_description global
boost::program_options::variables_map vm

Detailed Description

Basic schroot command-line options.

This is specialised by the frontends to suit their particular command-line options and behaviour.


Member Typedef Documentation

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

A shared_ptr to an options_base object.


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_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 ( int  argc,
char *  argv[] 
)

The constructor.

Parameters:
argc the number of arguments.
argv the list of arguments.

options_base::~options_base (  )  [virtual]

The destructor.


Member Function Documentation

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

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]

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

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

void options_base::parse_options ( int  argc,
char *  argv[] 
) [protected, virtual]

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]

std::string schroot::options_base::chroot_path

Chroot to print path.

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

sbuild::string_list schroot::options_base::chroots

Chroots to use.

sbuild::string_list schroot::options_base::command

Command to run.

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

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

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

bool schroot::options_base::load_chroots

Load chroots.

bool schroot::options_base::load_sessions

Load sessions.

boost::program_options::positional_options_description schroot::options_base::positional [protected]

bool schroot::options_base::preserve

Preserve environment.

bool schroot::options_base::quiet

Quiet messages.

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

bool schroot::options_base::session_force

Force session operations.

std::string schroot::options_base::user

User to run as.

bool schroot::options_base::verbose

Verbose messages.

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

boost::program_options::variables_map schroot::options_base::vm [protected]


The documentation for this class was generated from the following files:
Generated on Mon Jun 26 12:56:19 2006 for schroot by  doxygen 1.4.7