|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef UTILITIES_COLLECTION_CMDLINEARGS2
6 #define UTILITIES_COLLECTION_CMDLINEARGS2
46 class CmdLineArgs2 :
public std::map<std::string,std::pair<int,int> >
62 bool getOpt(
const std::string&
opt, std::string &optval )
const;
65 bool getOpt(
const std::string&
opt,
int &optval )
const;
68 bool getOpts(
const std::string&
opt, std::vector<std::string> &optvalvec )
const;
80 const std::string&
name()
const {
return m_id;}
90 unsigned int nArgs(std::string);
102 std::vector<std::string>
m_argv;
125 #endif // UTILITIES_COLLECTION_CMDLINEARGS2
bool valid() const
Returns true if evalArgs has been called with no errors.
bool getOpt(const std::string &opt, std::string &optval) const
check if option was present and return its (first) value in optval(!)
virtual bool evalArgsPass2(std::vector< std::string > &, pool::Args2Container &)
Second pass options processing.
void setArgQuals(QualList &quals)
set the QualList
bool getOpts(const std::string &opt, std::vector< std::string > &optvalvec) const
check if option was present and return its values in optvalvec(!)
void initTypes()
Fill the vector m_allowedTypes.
virtual bool evalArgs(std::vector< std::string > &argv)
Apply the criteria in the QualList to the argv[].
std::vector< std::string > m_argv
bool hasQual(const std::string &arg) const
Check if argument was found in the argv[].
void ignoreMissingArgs(bool ignore)
set flag to suppress error messages about missing arguments e.g. when -xmlInput is present
CmdLineArgs2(const std::string &name="General")
Constructor.
std::map< std::string, ArgQual > QualList
std::vector< std::string > & allowedTypes()
Hack to bring in allowed types of Collections.
const std::string & name() const
identifier
unsigned int nArgs(std::string)
Number of arguments for a given qualifer, e.g. nArgs("-src")
std::vector< std::string > m_allowedTypes
ArgQual & getArgQual(const std::string &a)