FastJet 3.4.1
|
#include </home/greg/work/fastjet/top-level/release-helpers/fastjet/example/CmdLine.hh>
Public Member Functions | |
CmdLine (const int argc, char **argv) | |
initialise a CmdLine from a C-style array of command-line arguments More... | |
CmdLine (const vector< string > &args) | |
initialise a CmdLine from a C++ vector of arguments More... | |
bool | present (const string &opt) const |
true if the option is present More... | |
bool | present_and_set (const string &opt) const |
true if the option is present and corresponds to a value More... | |
const vector< string > & | arguments () const |
return a reference to the vector of command-line arguments (0 is command). More... | |
template<class T > | |
T | value (const string &opt) const |
returns the value of the argument converted to type T More... | |
template<class T > | |
T | value (const string &opt, const T &defval) const |
int | int_val (const string &opt) const |
return the integer value corresponding to the given option More... | |
int | int_val (const string &opt, const int &defval) const |
return the integer value corresponding to the given option or default if option is absent More... | |
double | double_val (const string &opt) const |
return the double value corresponding to the given option More... | |
double | double_val (const string &opt, const double &defval) const |
return the double value corresponding to the given option or default if option is absent More... | |
string | string_val (const string &opt) const |
return the string value corresponding to the given option More... | |
string | string_val (const string &opt, const string &defval) const |
return the string value corresponding to the given option or default if option is absent More... | |
string | command_line () const |
return the full command line More... | |
bool | all_options_used () const |
return true if all options have been asked for at some point or other More... | |
template<> | |
string | value (const string &opt) const |
for the string case, just copy the string... More... | |
Definition at line 53 of file CmdLine.hh.
|
inline |
Definition at line 61 of file CmdLine.hh.
CmdLine::CmdLine | ( | const int | argc, |
char ** | argv | ||
) |
initialise a CmdLine from a C-style array of command-line arguments
Definition at line 41 of file CmdLine.cc.
CmdLine::CmdLine | ( | const vector< string > & | args | ) |
initialise a CmdLine from a C++ vector of arguments
constructor from a vector of strings, one argument per string
Definition at line 50 of file CmdLine.cc.
bool CmdLine::present | ( | const string & | opt | ) | const |
true if the option is present
Definition at line 89 of file CmdLine.cc.
bool CmdLine::present_and_set | ( | const string & | opt | ) | const |
true if the option is present and corresponds to a value
Definition at line 96 of file CmdLine.cc.
|
inline |
return a reference to the vector of command-line arguments (0 is command).
Definition at line 74 of file CmdLine.hh.
T CmdLine::value | ( | const string & | opt | ) | const |
returns the value of the argument converted to type T
Definition at line 116 of file CmdLine.hh.
T CmdLine::value | ( | const string & | opt, |
const T & | defval | ||
) | const |
Definition at line 131 of file CmdLine.hh.
int CmdLine::int_val | ( | const string & | opt | ) | const |
return the integer value corresponding to the given option
Definition at line 125 of file CmdLine.cc.
int CmdLine::int_val | ( | const string & | opt, |
const int & | defval | ||
) | const |
return the integer value corresponding to the given option or default if option is absent
Definition at line 138 of file CmdLine.cc.
double CmdLine::double_val | ( | const string & | opt | ) | const |
return the double value corresponding to the given option
Definition at line 147 of file CmdLine.cc.
double CmdLine::double_val | ( | const string & | opt, |
const double & | defval | ||
) | const |
return the double value corresponding to the given option or default if option is absent
Definition at line 160 of file CmdLine.cc.
string CmdLine::string_val | ( | const string & | opt | ) | const |
return the string value corresponding to the given option
Definition at line 103 of file CmdLine.cc.
string CmdLine::string_val | ( | const string & | opt, |
const string & | defval | ||
) | const |
return the string value corresponding to the given option or default if option is absent
Definition at line 117 of file CmdLine.cc.
string CmdLine::command_line | ( | ) | const |
return the full command line
Definition at line 167 of file CmdLine.cc.
bool CmdLine::all_options_used | ( | ) | const |
return true if all options have been asked for at some point or other
Definition at line 173 of file CmdLine.cc.
|
inline |
for the string case, just copy the string...
Definition at line 126 of file CmdLine.hh.