schroot::Options Class Reference

schroot command-line options. More...

#include <schroot-options.h>

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

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.


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.

sbuild::string_list schroot::Options::chroots
 

Chroots to use.

sbuild::string_list schroot::Options::command
 

Command to run.

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 Wed Feb 1 11:43:55 2006 for schroot by  doxygen 1.4.6