Command line argument parser. More...
Public Member Functions | |
CmdLnArgParser (int argc, char **argv) | |
~CmdLnArgParser () | |
bool | OptionExists (char opt) |
was option set? More... | |
char * | Arg (char opt) |
return argument following -`opt' More... | |
string | ArgAsString (char opt) |
vector< string > | ArgAsStringTokens (char opt, string delimeter) |
double | ArgAsDouble (char opt) |
vector< double > | ArgAsDoubleTokens (char opt, string delimeter) |
int | ArgAsInt (char opt) |
vector< int > | ArgAsIntTokens (char opt, string delimeter) |
long | ArgAsLong (char opt) |
vector< long > | ArgAsLongTokens (char opt, string delimeter) |
bool | OptionExists (string opt) |
was option set? More... | |
char * | Arg (string opt) |
return argument following –`opt' More... | |
string | ArgAsString (string opt) |
double | ArgAsDouble (string opt) |
int | ArgAsInt (string opt) |
long | ArgAsLong (string opt) |
Private Attributes | |
int | fArgc |
char ** | fArgv |
Command line argument parser.
July 23, 2010
Copyright (c) 2003-2019, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org or see $GENIE/LICENSE
Definition at line 30 of file CmdLnArgParser.h.
CmdLnArgParser::CmdLnArgParser | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 42 of file CmdLnArgParser.cxx.
CmdLnArgParser::~CmdLnArgParser | ( | ) |
Definition at line 49 of file CmdLnArgParser.cxx.
char * CmdLnArgParser::Arg | ( | char | opt | ) |
return argument following -`opt'
Definition at line 54 of file CmdLnArgParser.cxx.
References rootlogon::argv, fArgc, fArgv, LOG, pDEBUG, and pINFO.
Referenced by ArgAsDouble(), ArgAsInt(), ArgAsLong(), ArgAsString(), GetCommandLineArgs(), and main().
char * CmdLnArgParser::Arg | ( | string | opt | ) |
return argument following –`opt'
Definition at line 206 of file CmdLnArgParser.cxx.
References rootlogon::argv, fArgc, fArgv, LOG, pDEBUG, and pINFO.
double CmdLnArgParser::ArgAsDouble | ( | char | opt | ) |
Definition at line 143 of file CmdLnArgParser.cxx.
References Arg().
Referenced by GetCommandLineArgs(), and main().
double CmdLnArgParser::ArgAsDouble | ( | string | opt | ) |
Definition at line 288 of file CmdLnArgParser.cxx.
References Arg().
vector< double > CmdLnArgParser::ArgAsDoubleTokens | ( | char | opt, |
string | delimeter | ||
) |
Definition at line 152 of file CmdLnArgParser.cxx.
References ArgAsStringTokens(), and parsePQSLOutput::tokens.
Referenced by GetCommandLineArgs().
int CmdLnArgParser::ArgAsInt | ( | char | opt | ) |
Definition at line 164 of file CmdLnArgParser.cxx.
References Arg().
Referenced by GetCommandLineArgs(), and genie::RunOpt::ReadFromCommandLine().
Definition at line 297 of file CmdLnArgParser.cxx.
References Arg().
Definition at line 173 of file CmdLnArgParser.cxx.
References ArgAsStringTokens(), and parsePQSLOutput::tokens.
long CmdLnArgParser::ArgAsLong | ( | char | opt | ) |
Definition at line 185 of file CmdLnArgParser.cxx.
References Arg().
Referenced by GetCommandLineArgs(), and main().
long CmdLnArgParser::ArgAsLong | ( | string | opt | ) |
Definition at line 306 of file CmdLnArgParser.cxx.
References Arg().
vector< long > CmdLnArgParser::ArgAsLongTokens | ( | char | opt, |
string | delimeter | ||
) |
Definition at line 194 of file CmdLnArgParser.cxx.
References ArgAsStringTokens(), and parsePQSLOutput::tokens.
Referenced by GetCommandLineArgs().
string CmdLnArgParser::ArgAsString | ( | char | opt | ) |
Definition at line 126 of file CmdLnArgParser.cxx.
Referenced by ArgAsStringTokens(), GetCommandLineArgs(), main(), and genie::RunOpt::ReadFromCommandLine().
Definition at line 279 of file CmdLnArgParser.cxx.
Definition at line 135 of file CmdLnArgParser.cxx.
References ArgAsString(), genie::utils::str::Split(), and parsePQSLOutput::tokens.
Referenced by ArgAsDoubleTokens(), ArgAsIntTokens(), ArgAsLongTokens(), and main().
bool CmdLnArgParser::OptionExists | ( | char | opt | ) |
was option set?
Definition at line 108 of file CmdLnArgParser.cxx.
References rootlogon::argv, fArgc, and fArgv.
Referenced by GetCommandLineArgs(), main(), and genie::RunOpt::ReadFromCommandLine().
bool CmdLnArgParser::OptionExists | ( | string | opt | ) |
was option set?
Definition at line 257 of file CmdLnArgParser.cxx.
References rootlogon::argv, fArgc, and fArgv.
|
private |
Definition at line 63 of file CmdLnArgParser.h.
Referenced by Arg(), and OptionExists().
|
private |
Definition at line 64 of file CmdLnArgParser.h.
Referenced by Arg(), and OptionExists().