|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
#include <LUPI.hpp>
Public Member Functions | |
| ArgumentBase (ArgumentType a_argumentType, std::string const &a_name, std::string const &a_descriptor, int a_minimumNeeded, int a_maximumNeeded) | |
| virtual | ~ArgumentBase ()=0 |
| ArgumentType | argumentType () const |
| std::string const & | name () const |
| std::vector< std::string > const & | names () |
| bool | hasName (std::string const &a_name) const |
| std::string const & | descriptor () const |
| int | minimumNeeded () const |
| int | maximumNeeded () const |
| std::size_t | counts () const |
| virtual std::string const & | value (std::size_t a_index=0) const |
| std::vector< std::string > const & | values () const |
| virtual bool | isOptionalArgument () const |
| virtual bool | requiresAValue () const |
| virtual int | parse (ArgumentParser const &a_argumentParser, int a_index, int a_argc, char **a_argv) |
| std::string | usage (bool a_requiredOption) const |
| void | printStatus (std::string a_indent) const |
Friends | |
| void | ArgumentParser::addAlias (std::string const &a_name, std::string const &a_alias) |
| LUPI::ArgumentBase::ArgumentBase | ( | ArgumentType | a_argumentType, |
| std::string const & | a_name, | ||
| std::string const & | a_descriptor, | ||
| int | a_minimumNeeded, | ||
| int | a_maximumNeeded ) |
ArgumentBase constructor.
| a_argumentType | [in] The type of argument to create. |
| a_name | [in] The name of the argument. |
| a_descriptor | [in] The string printed with arugment's help. |
| a_minimumNeeded | [in] The minimum number of times the argument must be entered. |
| a_maximumNeeded | [in] The maximum number of times the argument can be entered. |
Definition at line 34 of file LUPI_argumentParser.cc.
Referenced by LUPI::OptionAppend::OptionAppend(), LUPI::OptionBoolean::OptionBoolean(), LUPI::OptionCounter::OptionCounter(), LUPI::OptionStore::OptionStore(), and LUPI::Positional::Positional().
|
pure virtual |
|
inline |
|
inline |
Definition at line 214 of file LUPI.hpp.
Referenced by parse(), LUPI::OptionBoolean::printStatus2(), LUPI::OptionCounter::printStatus2(), and LUPI::OptionStore::printStatus3().
|
inline |
| bool LUPI::ArgumentBase::hasName | ( | std::string const & | a_name | ) | const |
Returns true if a_name is one of the names for this and false otherwise.
| a_name | [in] The name to search for. |
Definition at line 72 of file LUPI_argumentParser.cc.
|
inlinevirtual |
Reimplemented in LUPI::Positional.
Definition at line 218 of file LUPI.hpp.
Referenced by usage().
|
inline |
|
inline |
|
inline |
Definition at line 208 of file LUPI.hpp.
Referenced by LUPI::ArgumentParser::addAlias(), parse(), printStatus(), usage(), and value().
|
inline |
|
virtual |
Counts each time a specific argument is found.
| a_index | [in] The index of the current command argument in a_argv. |
| a_argc | [in] The number of command arguments. |
| a_argv | [in] The list of command arguments. |
Definition at line 127 of file LUPI_argumentParser.cc.
| void LUPI::ArgumentBase::printStatus | ( | std::string | a_indent | ) | const |
Prints generic information about the status of this.
| a_indent | [in] The amount of indentation to start the first line with. |
Definition at line 203 of file LUPI_argumentParser.cc.
|
inlinevirtual |
Reimplemented in LUPI::OptionAppend, LUPI::OptionStore, and LUPI::Positional.
Definition at line 219 of file LUPI.hpp.
Referenced by usage().
| std::string LUPI::ArgumentBase::usage | ( | bool | a_requiredOption | ) | const |
Returns the usage string for this argument.
| a_requiredOption | [in] The index of the current command argument in a_argv. |
Definition at line 166 of file LUPI_argumentParser.cc.
|
virtual |
Returns the value at index a_index. If a_index exceeds the number of values entered, a throw is executed.
| a_index | [in] The 0-based index into the m_values std::vector whose content is returned. |
Reimplemented in LUPI::OptionStore.
Definition at line 88 of file LUPI_argumentParser.cc.
Referenced by usage(), and LUPI::OptionStore::value().
|
inline |
Definition at line 217 of file LUPI.hpp.
Referenced by LUPI::OptionAppend::printStatus3(), LUPI::Positional::printStatus3(), and LUPI::OptionStore::value().
|
friend |