#include <schroot-options-base.h>


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. | |
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 |
| options_base::options_base | ( | ) |
The constructor.
| options_base::~options_base | ( | ) | [virtual] |
The destructor.
| void options_base::add_option_groups | ( | ) | [protected, virtual] |
Add option groups to container groups.
Reimplemented from schroot_base::options.
References chroot, chrootenv, schroot_base::options::global, session_actions, session_options, and schroot_base::options::visible.
| 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.
References schroot_base::options::action, ACTION_CONFIG, ACTION_INFO, ACTION_LIST, ACTION_LOCATION, ACTION_SESSION_AUTO, ACTION_SESSION_BEGIN, ACTION_SESSION_END, ACTION_SESSION_RECOVER, ACTION_SESSION_RUN, schroot_base::options::actions, chroot, chroots, command, schroot_base::options::hidden, and schroot_base::options::positional.
| bool schroot::options_base::all_used | ( | ) | const [inline, protected] |
Check if any of the --all options have been used.
References all, all_chroots, and all_sessions.
Referenced by check_actions(), dchroot::options::check_options(), and dchroot_dsa::options::check_options().

| void options_base::check_actions | ( | ) | [protected, virtual] |
Check actions after parsing.
Reimplemented from schroot_base::options.
References schroot_base::options::action, ACTION_CONFIG, schroot_base::options::ACTION_HELP, ACTION_INFO, ACTION_LIST, ACTION_LOCATION, ACTION_SESSION_AUTO, ACTION_SESSION_BEGIN, ACTION_SESSION_END, ACTION_SESSION_RECOVER, ACTION_SESSION_RUN, schroot_base::options::ACTION_VERSION, all, all_chroots, all_sessions, all_used(), chroots, load_chroots, load_sessions, sbuild::log_info(), sbuild::log_warning(), schroot_base::options::quiet, and schroot_base::options::verbose.
| 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.
References schroot_base::options::action, ACTION_CONFIG, ACTION_INFO, ACTION_LIST, and schroot_base::options::vm.
const options_base::action_type options_base::ACTION_CONFIG [static] |
Display chroot configuration.
Referenced by add_options(), check_actions(), check_options(), dchroot_dsa::options::check_options(), and schroot::main_base::run_impl().
const options_base::action_type options_base::ACTION_INFO [static] |
Display chroot information.
Referenced by add_options(), check_actions(), check_options(), dchroot_dsa::options::check_options(), and schroot::main_base::run_impl().
const options_base::action_type options_base::ACTION_LIST [static] |
Display a list of chroots.
Referenced by add_options(), check_actions(), check_options(), dchroot_dsa::options::check_options(), and schroot::main_base::run_impl().
const options_base::action_type options_base::ACTION_LOCATION [static] |
Display chroot location information.
Referenced by add_options(), check_actions(), schroot::options::check_options(), dchroot::options::check_options(), dchroot_dsa::options::check_options(), and schroot::main_base::run_impl().
const options_base::action_type options_base::ACTION_SESSION_AUTO [static] |
Begin, run and end a session.
Referenced by add_options(), check_actions(), and schroot::options::check_options().
const options_base::action_type options_base::ACTION_SESSION_BEGIN [static] |
Begin a session.
Referenced by add_options(), check_actions(), schroot::options::check_options(), and schroot::main_base::run_impl().
const options_base::action_type options_base::ACTION_SESSION_END [static] |
End an existing session.
Referenced by add_options(), check_actions(), schroot::options::check_options(), and schroot::main_base::run_impl().
const options_base::action_type options_base::ACTION_SESSION_RECOVER [static] |
Recover an existing session.
Referenced by add_options(), check_actions(), schroot::options::check_options(), and schroot::main_base::run_impl().
const options_base::action_type options_base::ACTION_SESSION_RUN [static] |
Run an existing session.
Referenced by add_options(), check_actions(), schroot::options::check_options(), and schroot::main_base::run_impl().
Use all chroots and sessions.
Referenced by all_used(), check_actions(), schroot::options::check_options(), dchroot::options::check_options(), and dchroot_dsa::options::check_options().
Use all chroots.
Referenced by all_used(), check_actions(), schroot::options::check_options(), dchroot::options::check_options(), and dchroot_dsa::options::check_options().
Use all sessions.
Referenced by all_used(), check_actions(), schroot::options::check_options(), dchroot::options::check_options(), and dchroot_dsa::options::check_options().
boost::program_options::options_description schroot::options_base::chroot [protected] |
Chroot options group.
Referenced by add_option_groups(), schroot::options::add_options(), add_options(), dchroot::options::add_options(), and dchroot_dsa::options::add_options().
| std::string schroot::options_base::chroot_path |
boost::program_options::options_description schroot::options_base::chrootenv [protected] |
Chroot environment options group.
Referenced by add_option_groups(), schroot::options::add_options(), dchroot::options::add_options(), and dchroot_dsa::options::add_options().
Chroots to use.
Referenced by add_options(), check_actions(), dchroot::options::check_options(), and dchroot_dsa::options::check_options().
| std::string schroot::options_base::directory |
Directory to use.
Referenced by schroot::options::add_options(), dchroot::options::add_options(), and dchroot_dsa::options::add_options().
Preserve environment.
Referenced by schroot::options::check_options(), dchroot::options::check_options(), and dchroot_dsa::options::check_options().
boost::program_options::options_description schroot::options_base::session_actions [protected] |
| std::string schroot::options_base::session_name |
boost::program_options::options_description schroot::options_base::session_options [protected] |
| std::string schroot::options_base::user |
1.5.8