schroot_releaselock::options Class Reference

schroot-releaselock command-line options. More...

#include <schroot-releaselock-options.h>

Inheritance diagram for schroot_releaselock::options:

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

Collaboration graph
[legend]
List of all members.

Public Types

enum  action_type { ACTION_RELEASELOCK, ACTION_HELP, ACTION_VERSION }
 The action to perform. More...
typedef std::tr1::shared_ptr<
options
ptr
 A shared_ptr to an options object.

Public Member Functions

 options ()
 The constructor.
virtual ~options ()
 The destructor.

Public Attributes

action_type action
 The action to perform.
std::string device
 The device to unlock.
int pid
 The PID holding the lock.

Protected Member Functions

void set_action (action_type action)
 Set action.
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.

Protected Attributes

boost::program_options::options_description lock
 Lock options group.

Detailed Description

schroot-releaselock command-line options.

Definition at line 33 of file schroot-releaselock-options.h.


Member Typedef Documentation

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

A shared_ptr to an options object.

Reimplemented from schroot_base::options.

Definition at line 37 of file schroot-releaselock-options.h.


Member Enumeration Documentation

enum schroot_releaselock::options::action_type

The action to perform.

Enumerator:
ACTION_RELEASELOCK  Release lock.
ACTION_HELP  Display program help.
ACTION_VERSION  Display program version.

Definition at line 40 of file schroot-releaselock-options.h.


Constructor & Destructor Documentation

options::options (  ) 

The constructor.

Reimplemented from schroot_base::options.

Definition at line 37 of file schroot-releaselock-options.cc.

options::~options (  )  [virtual]

The destructor.

Reimplemented from schroot_base::options.

Definition at line 46 of file schroot-releaselock-options.cc.


Member Function Documentation

void options::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).

Parameters:
action the action to set.

Definition at line 96 of file schroot-releaselock-options.cc.

References _, and ACTION_RELEASELOCK.

Referenced by check_options().

Here is the caller graph for this function:

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

Add options to option groups.

Reimplemented from schroot_base::options.

Definition at line 51 of file schroot-releaselock-options.cc.

References _, schroot_base::options::add_options(), device, and lock.

Here is the call graph for this function:

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

Add option groups to container groups.

Reimplemented from schroot_base::options.

Definition at line 63 of file schroot-releaselock-options.cc.

References schroot_base::options::add_option_groups(), schroot_base::options::global, lock, and schroot_base::options::visible.

Here is the call graph for this function:

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

Check options after parsing.

Reimplemented from schroot_base::options.

Definition at line 79 of file schroot-releaselock-options.cc.

References _, action, ACTION_HELP, ACTION_VERSION, schroot_base::options::check_options(), set_action(), and schroot_base::options::vm.

Here is the call graph for this function:


Member Data Documentation

action_type schroot_releaselock::options::action

The action to perform.

Definition at line 54 of file schroot-releaselock-options.h.

Referenced by check_options().

std::string schroot_releaselock::options::device

The device to unlock.

Definition at line 56 of file schroot-releaselock-options.h.

Referenced by add_options().

int schroot_releaselock::options::pid

The PID holding the lock.

Definition at line 58 of file schroot-releaselock-options.h.

boost::program_options::options_description schroot_releaselock::options::lock [protected]

Lock options group.

Definition at line 80 of file schroot-releaselock-options.h.

Referenced by add_option_groups(), and add_options().


The documentation for this class was generated from the following files:
Generated on Sat Jan 27 16:15:03 2007 for schroot by  doxygen 1.5.1