FastJet 3.4.3
|
#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 | |
CmdLine (const vector< string > &args) | |
initialise a CmdLine from a C++ vector of arguments | |
bool | present (const string &opt) const |
true if the option is present | |
bool | present_and_set (const string &opt) const |
true if the option is present and corresponds to a value | |
const vector< string > & | arguments () const |
return a reference to the vector of command-line arguments (0 is command). | |
template<class T > | |
T | value (const string &opt) const |
returns the value of the argument converted to type T | |
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 | |
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 | |
double | double_val (const string &opt) const |
return the double value corresponding to the given option | |
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 | |
string | string_val (const string &opt) const |
return the string value corresponding to the given option | |
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 | |
string | command_line () const |
return the full command line | |
bool | all_options_used () const |
return true if all options have been asked for at some point or other | |
template<> | |
string | value (const string &opt) const |
for the string case, just copy the string... | |
Definition at line 53 of file CmdLine.hh.
|
inline |
Definition at line 61 of file CmdLine.hh.
initialise a CmdLine from a C-style array of command-line arguments
Definition at line 41 of file CmdLine.cc.
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.
true if the option is present
Definition at line 89 of file CmdLine.cc.
true if the option is present and corresponds to a value
Definition at line 96 of file CmdLine.cc.
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.
return the integer value corresponding to the given option
Definition at line 125 of file CmdLine.cc.
return the integer value corresponding to the given option or default if option is absent
Definition at line 138 of file CmdLine.cc.
return the double value corresponding to the given option
Definition at line 147 of file CmdLine.cc.
return the double value corresponding to the given option or default if option is absent
Definition at line 160 of file CmdLine.cc.
return the string value corresponding to the given option
Definition at line 103 of file CmdLine.cc.
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.