Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
LUPI::OptionAppend Class Reference

#include <LUPI.hpp>

Inheritance diagram for LUPI::OptionAppend:

Public Member Functions

 OptionAppend (std::string const &a_name, std::string const &a_descriptor="", int a_minimumNeeded=0, int a_maximumNeeded=-1)
 ~OptionAppend ()
bool requiresAValue () const
void printStatus3 (std::string const &a_indent) const
Public Member Functions inherited from LUPI::ArgumentBase
 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 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

Detailed Description

An option with a value. If multiple options with the same name are entered, all values will be stored.

Definition at line 308 of file LUPI.hpp.

Constructor & Destructor Documentation

◆ OptionAppend()

LUPI::OptionAppend::OptionAppend ( std::string const & a_name,
std::string const & a_descriptor = "",
int a_minimumNeeded = 0,
int a_maximumNeeded = -1 )

OptionAppend constructor.

Parameters
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 399 of file LUPI_argumentParser.cc.

399 :
400 ArgumentBase( ArgumentType::Append, a_name, a_descriptor, a_minimumNeeded, a_maximumNeeded ) {
401
402}
ArgumentBase(ArgumentType a_argumentType, std::string const &a_name, std::string const &a_descriptor, int a_minimumNeeded, int a_maximumNeeded)

◆ ~OptionAppend()

LUPI::OptionAppend::~OptionAppend ( )
inline

Definition at line 312 of file LUPI.hpp.

312{ }

Member Function Documentation

◆ printStatus3()

void LUPI::OptionAppend::printStatus3 ( std::string const & a_indent) const
virtual

Prints the values for this. Called by printStatus.

Parameters
a_indent[in] The amount of indentation to start the first line with.

Reimplemented from LUPI::ArgumentBase.

Definition at line 410 of file LUPI_argumentParser.cc.

410 {
411
412 for( auto valueIterator = values( ).begin( ); valueIterator != values( ).end( ); ++valueIterator ) {
413 std::cout << a_indent << *valueIterator << std::endl;
414 }
415}
std::vector< std::string > const & values() const
Definition LUPI.hpp:217

◆ requiresAValue()

bool LUPI::OptionAppend::requiresAValue ( ) const
inlinevirtual

Reimplemented from LUPI::ArgumentBase.

Definition at line 314 of file LUPI.hpp.

314{ return( true ); }

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