schroot_base::options Class Reference

Basic schroot command-line options. More...

#include <schroot-base-options.h>

Inheritance diagram for schroot_base::options:

Inheritance graph
[legend]
Collaboration diagram for schroot_base::options:

Collaboration graph
[legend]

List of all members.

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.


Detailed Description

Basic schroot command-line options.

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.


Member Typedef Documentation

typedef std::tr1::shared_ptr<options> schroot_base::options::ptr


Constructor & Destructor Documentation

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().

Here is the caller graph for this function:

options::~options (  )  [virtual]


Member Function Documentation

void options::parse ( int  argc,
char *  argv[] 
)

Parse the command-line options.

Parameters:
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.

boost::program_options::options_description const & options::get_visible_options (  )  const

Get the visible options group.

This options group contains all the options visible to the user.

Returns:
the options_description.

References visible.

void options::add_options (  )  [protected, virtual]

void options::add_option_groups (  )  [protected, virtual]

void options::check_options (  )  [protected, virtual]

void options::check_actions (  )  [protected, virtual]

Check actions after parsing.

Reimplemented in schroot::options_base.

Referenced by schroot::options_base::check_actions(), and parse().

Here is the caller graph for this function:


Member Data Documentation

boost::program_options::options_description schroot_base::options::actions [protected]

boost::program_options::options_description schroot_base::options::general [protected]

boost::program_options::options_description schroot_base::options::hidden [protected]

boost::program_options::positional_options_description schroot_base::options::positional [protected]

Positional options group.

Referenced by schroot::options_base::add_options(), and parse().

boost::program_options::options_description schroot_base::options::visible [protected]

boost::program_options::options_description schroot_base::options::global [protected]

boost::program_options::variables_map schroot_base::options::vm [protected]

std::string schroot_base::options::debug_level [private]

Debug level string.

Referenced by add_options(), and check_options().


The documentation for this class was generated from the following files:

Generated on Sat Jul 5 12:01:24 2008 for schroot by  doxygen 1.5.6