#include <schroot-options-base.h>
Inheritance diagram for schroot::options_base:
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_HELP | |
Display program help. | |
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_HELP, ACTION_VERSION, ACTION_LIST, ACTION_INFO, ACTION_LOCATION, ACTION_CONFIG } |
The action to perform. More... | |
Public Member Functions | |
options_base () | |
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 | 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. | |
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 () |
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 |
Session options group. |
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).
typedef std::tr1::shared_ptr<options_base> schroot::options_base::ptr |
The action to perform.
options_base::options_base | ( | ) |
The constructor.
options_base::~options_base | ( | ) | [virtual] |
The destructor.
void options_base::add_option_groups | ( | ) | [protected, virtual] |
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.
bool schroot::options_base::all_used | ( | ) | const [inline, protected] |
Check if any of the --all options have been used.
void options_base::check_actions | ( | ) | [protected, virtual] |
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.
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).
action | the action to set. |
The action to perform.
Use all chroots and sessions.
Use all chroots.
Use all sessions.
boost::program_options::options_description schroot::options_base::chroot [protected] |
Chroot options group.
std::string schroot::options_base::chroot_path |
Chroot to print path.
boost::program_options::options_description schroot::options_base::chrootenv [protected] |
Chroot environment options group.
Chroots to use.
Command to run.
std::string schroot::options_base::directory |
Directory to use.
Load chroots.
Load sessions.
Preserve environment.
boost::program_options::options_description schroot::options_base::session [protected] |
Session options group.
Force session operations.
std::string schroot::options_base::user |
User to run as.