#include <schroot-base-options.h>


Public Types | |
| typedef std::tr1::shared_ptr < options > | ptr |
| A shared_ptr to an options object. | |
| typedef option_action::action_type | action_type |
Public Member Functions | |
| options () | |
| The constructor. | |
| virtual | ~options () |
| The destructor. | |
| void | parse (int argc, char *argv[]) |
| Parse the command-line options. | |
| boost::program_options::options_description const & | get_visible_options () const |
| Get the visible options group. | |
Public Attributes | |
| option_action | action |
| Action list. | |
| bool | quiet |
| Quiet messages. | |
| bool | verbose |
| Verbose messages. | |
Static Public Attributes | |
| static const action_type | ACTION_HELP |
| Display program help. | |
| static const action_type | ACTION_VERSION |
| Display program version. | |
Protected Member Functions | |
| 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 | actions |
| Actions options group. | |
| boost::program_options::options_description | general |
| General options group. | |
| boost::program_options::options_description | hidden |
| Hidden options group. | |
| boost::program_options::positional_options_description | positional |
| Positional options group. | |
| boost::program_options::options_description | visible |
| Visible options container (used for --help). | |
| boost::program_options::options_description | global |
| Global options container (used for parsing). | |
| boost::program_options::variables_map | vm |
| Variables map, filled during parsing. | |
Private Attributes | |
| std::string | debug_level |
| Debug level string. | |
This is specialised by the frontends to suit their particular command-line options and behaviour. This class implements the functionality common to all options parsing classes.
| typedef std::tr1::shared_ptr<options> schroot_base::options::ptr |
A shared_ptr to an options object.
Reimplemented in schroot::options_base, schroot_listmounts::options, schroot_releaselock::options, and csbuild::options.
| options::options | ( | ) |
The constructor.
Reimplemented in schroot::options, schroot_listmounts::options, schroot_releaselock::options, dchroot::options, dchroot_dsa::options, and csbuild::options.
Referenced by parse().

| options::~options | ( | ) | [virtual] |
The destructor.
Reimplemented in schroot::options, schroot_listmounts::options, schroot_releaselock::options, dchroot::options, dchroot_dsa::options, and csbuild::options.
| void options::add_option_groups | ( | ) | [protected, virtual] |
Add option groups to container groups.
Reimplemented in schroot::options_base, schroot_listmounts::options, schroot_releaselock::options, and csbuild::options.
References actions, general, global, hidden, and visible.
Referenced by parse().

| void options::add_options | ( | ) | [protected, virtual] |
Add options to option groups.
Reimplemented in schroot::options_base, schroot::options, schroot_listmounts::options, schroot_releaselock::options, dchroot::options, dchroot_dsa::options, and csbuild::options.
References action, ACTION_HELP, ACTION_VERSION, actions, schroot_base::option_action::add(), debug_level, general, and hidden.
Referenced by parse().

| void options::check_actions | ( | ) | [protected, virtual] |
Check actions after parsing.
Reimplemented in schroot::options_base.
Referenced by parse().

| void options::check_options | ( | ) | [protected, virtual] |
Check options after parsing.
Reimplemented in schroot::options_base, schroot::options, schroot_listmounts::options, schroot_releaselock::options, dchroot::options, dchroot_dsa::options, and csbuild::options.
References action, ACTION_HELP, ACTION_VERSION, sbuild::DEBUG_CRITICAL, sbuild::DEBUG_INFO, sbuild::debug_level, debug_level, sbuild::DEBUG_NONE, sbuild::DEBUG_NOTICE, sbuild::DEBUG_WARNING, quiet, verbose, and vm.
Referenced by parse().

| boost::program_options::options_description const & options::get_visible_options | ( | ) | const |
| void options::parse | ( | int | argc, | |
| char * | argv[] | |||
| ) |
Parse the command-line options.
| argc | the number of arguments | |
| argv | argument vector |
References add_option_groups(), add_options(), check_actions(), check_options(), global, options(), positional, schroot_base::run(), and vm.
Action list.
Referenced by schroot::options_base::add_options(), schroot_releaselock::options::add_options(), schroot_listmounts::options::add_options(), add_options(), csbuild::options::add_options(), schroot::options_base::check_actions(), schroot::options::check_options(), schroot::options_base::check_options(), schroot_releaselock::options::check_options(), schroot_listmounts::options::check_options(), check_options(), dchroot::options::check_options(), dchroot_dsa::options::check_options(), and csbuild::options::check_options().
const options::action_type options::ACTION_HELP [static] |
const options::action_type options::ACTION_VERSION [static] |
Display program version.
Referenced by add_options(), schroot::options_base::check_actions(), check_options(), dchroot_dsa::options::check_options(), schroot::main_base::run_impl(), schroot_releaselock::main::run_impl(), schroot_listmounts::main::run_impl(), and csbuild::main::run_impl().
boost::program_options::options_description schroot_base::options::actions [protected] |
std::string schroot_base::options::debug_level [private] |
boost::program_options::options_description schroot_base::options::general [protected] |
General options group.
Referenced by add_option_groups(), add_options(), and csbuild::options::add_options().
boost::program_options::options_description schroot_base::options::global [protected] |
Global options container (used for parsing).
Referenced by schroot::options_base::add_option_groups(), schroot_releaselock::options::add_option_groups(), schroot_listmounts::options::add_option_groups(), add_option_groups(), csbuild::options::add_option_groups(), and parse().
boost::program_options::options_description schroot_base::options::hidden [protected] |
Hidden options group.
Referenced by add_option_groups(), schroot::options_base::add_options(), and add_options().
boost::program_options::positional_options_description schroot_base::options::positional [protected] |
Quiet messages.
Referenced by schroot::options_base::check_actions(), check_options(), and dchroot::options::check_options().
Verbose messages.
Referenced by schroot::options_base::check_actions(), check_options(), and dchroot::options::check_options().
boost::program_options::options_description schroot_base::options::visible [protected] |
Visible options container (used for --help).
Referenced by schroot::options_base::add_option_groups(), schroot_releaselock::options::add_option_groups(), schroot_listmounts::options::add_option_groups(), add_option_groups(), csbuild::options::add_option_groups(), and get_visible_options().
boost::program_options::variables_map schroot_base::options::vm [protected] |
Variables map, filled during parsing.
Referenced by schroot::options::check_options(), schroot::options_base::check_options(), check_options(), dchroot::options::check_options(), dchroot_dsa::options::check_options(), csbuild::options::check_options(), and parse().
1.5.8