schroot::options Class Reference

schroot command-line options. More...

#include <schroot-options.h>

Collaboration diagram for schroot::options:

Collaboration graph
[legend]
List of all members.

Public Types

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 (int argc, char *argv[])
 The constructor.
virtual ~options ()
 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.
bool dchroot_compat
 dchroot(1) compatibility mode.

Private Member Functions

void set_action (action_type action)
 Set action.
bool all_used () const
 Check if any of the --all options have been used.

Detailed Description

schroot command-line options.


Member Enumeration Documentation

enum schroot::options::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::options int  argc,
char *  argv[]
 

The constructor.

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

options::~options  )  [virtual]
 

The destructor.


Member Function Documentation

bool schroot::options::all_used  )  const [inline, private]
 

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

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

void options::set_action action_type  action  )  [private]
 

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::action
 

The action to perform.

bool schroot::options::all
 

Use all chroots and sessions.

bool schroot::options::all_chroots
 

Use all chroots.

bool schroot::options::all_sessions
 

Use all sessions.

std::string schroot::options::chroot_path
 

Chroot to print path.

sbuild::string_list schroot::options::chroots
 

Chroots to use.

sbuild::string_list schroot::options::command
 

Command to run.

bool schroot::options::dchroot_compat
 

dchroot(1) compatibility mode.

bool schroot::options::load_chroots
 

Load chroots.

bool schroot::options::load_sessions
 

Load sessions.

bool schroot::options::preserve
 

Preserve environment.

bool schroot::options::quiet
 

Quiet messages.

bool schroot::options::session_force
 

Force session operations.

std::string schroot::options::user
 

User to run as.

bool schroot::options::verbose
 

Verbose messages.


The documentation for this class was generated from the following files:
Generated on Sun Mar 19 12:08:58 2006 for schroot by  doxygen 1.4.6