slic::CommandLineOption Class Reference

#include <CommandLineOption.hh>

Collaboration diagram for slic::CommandLineOption:

Collaboration graph
[legend]

List of all members.


Detailed Description

Command-line option with a single letter, full name and description plus an associated Geant4 command (which is optional).

Author:
Jeremy McCormick <jeremym@slac.stanford.edu>

Definition at line 23 of file CommandLineOption.hh.


Public Member Functions

 CommandLineOption (const std::string &shortname, const std::string &longname, const std::string &description, unsigned int min_args=0, unsigned int max_args=0, const std::string &g4cmdstr="")
virtual ~CommandLineOption ()
const std::string & getShortName () const
const std::string & getLongName () const
const std::string & getDescription () const
const std::string & getG4CommandString () const
unsigned int getMinArgs () const
unsigned int getMaxArgs () const

Private Attributes

std::string m_shortname
std::string m_longname
std::string m_description
std::string m_g4cmdstr
int m_minArgs
int m_maxArgs

Constructor & Destructor Documentation

slic::CommandLineOption::CommandLineOption ( const std::string &  shortname,
const std::string &  longname,
const std::string &  description,
unsigned int  min_args = 0,
unsigned int  max_args = 0,
const std::string &  g4cmdstr = "" 
) [inline]

The fully qualified constructor for CommandLineOption. (There are no setters for this class.)

Definition at line 32 of file CommandLineOption.hh.

virtual slic::CommandLineOption::~CommandLineOption (  )  [inline, virtual]

Definition at line 46 of file CommandLineOption.hh.


Member Function Documentation

const std::string& slic::CommandLineOption::getShortName (  )  const [inline]

Get the short name associated with this option. This must be a single letter, such as 'm'.

Definition at line 55 of file CommandLineOption.hh.

References m_shortname.

Referenced by slic::CommandLineProcessor::createOptionsString(), and slic::CommandLineProcessor::printOptions().

const std::string& slic::CommandLineOption::getLongName (  )  const [inline]

Get the long name associated with this option. This must be one or more words separated by dashes, such as "lcio-path".

Definition at line 65 of file CommandLineOption.hh.

References m_longname.

Referenced by slic::CommandLineProcessor::printOptions().

const std::string& slic::CommandLineOption::getDescription (  )  const [inline]

Get a brief description of this option.

Definition at line 73 of file CommandLineOption.hh.

References m_description.

Referenced by slic::CommandLineProcessor::printOptions().

const std::string& slic::CommandLineOption::getG4CommandString (  )  const [inline]

Get the Geant4 command associated with this option. This may be a null string if there is no associated Geant4 command, though currently all of SLIC's options have a corresponding Geant4 macro command.

Definition at line 84 of file CommandLineOption.hh.

References m_g4cmdstr.

Referenced by slic::CommandLineProcessor::printOptions().

unsigned int slic::CommandLineOption::getMinArgs (  )  const [inline]

Get the minimum number of arguments to this option.

Definition at line 92 of file CommandLineOption.hh.

References m_minArgs.

Referenced by slic::CommandLineProcessor::createOptionsString().

unsigned int slic::CommandLineOption::getMaxArgs (  )  const [inline]

Get the maximum number of arguments to this option.

Definition at line 100 of file CommandLineOption.hh.

References m_maxArgs.

Referenced by slic::CommandLineProcessor::createOptionsString().


Member Data Documentation

std::string slic::CommandLineOption::m_shortname [private]

Definition at line 107 of file CommandLineOption.hh.

Referenced by getShortName().

std::string slic::CommandLineOption::m_longname [private]

Definition at line 108 of file CommandLineOption.hh.

Referenced by getLongName().

std::string slic::CommandLineOption::m_description [private]

Definition at line 109 of file CommandLineOption.hh.

Referenced by getDescription().

std::string slic::CommandLineOption::m_g4cmdstr [private]

Definition at line 110 of file CommandLineOption.hh.

Referenced by getG4CommandString().

int slic::CommandLineOption::m_minArgs [private]

Definition at line 111 of file CommandLineOption.hh.

Referenced by getMinArgs().

int slic::CommandLineOption::m_maxArgs [private]

Definition at line 112 of file CommandLineOption.hh.

Referenced by getMaxArgs().


The documentation for this class was generated from the following file:
Generated on Thu Nov 15 15:24:37 2007 for Simulator for the Linear Collider by  doxygen 1.5.4