Definition at line 297 of file ArgParser.h.
Public Member Functions | |
ArgParser () | |
~ArgParser () | |
template<typename T > | |
ArgParseConfigT< std::vector< T > > & | default_option (std::vector< T > *output_location, bool firstPass) |
template<typename T > | |
ArgParseConfigT< T > & | option (const std::string flag, T *output_location, bool firstPass) |
void | parse (int argc, char **argv, bool firstPass) |
void | parse_file (std::string &filename) |
void | print (std::ostream &out) const |
Private Member Functions | |
std::vector< std::string > | argument_list (int argc, char **argv, int &iarg, int max_args) |
ArgParseItem & | get_item (const std::string &flag) |
void | handle_default_option (int, char **argv, int &iarg, bool firstPass) |
void | handle_long_flag (int argc, char **argv, int &iarg, bool firstPass) |
void | handle_short_flag (int argc, char **argv, int &iarg, bool firstPass) |
Private Attributes | |
std::vector< ArgParseItem * > | values |
#include <ArgParser.h>
|
inline |
Definition at line 299 of file ArgParser.h.
|
inline |
Definition at line 301 of file ArgParser.h.
References values.
|
inlineprivate |
Reads arguments into a list until finding one that begins with '-'.
Definition at line 480 of file ArgParser.h.
References pygui.grut-view::argv.
Referenced by handle_long_flag(), and handle_short_flag().
|
inline |
Definition at line 395 of file ArgParser.h.
References option().
Referenced by TGRSIOptions::Load().
|
inlineprivate |
Definition at line 499 of file ArgParser.h.
References values.
Referenced by handle_default_option(), handle_long_flag(), handle_short_flag(), and parse_file().
|
inlineprivate |
Definition at line 470 of file ArgParser.h.
References pygui.grut-view::argv, get_item(), and ArgParseItem::parse().
Referenced by parse().
|
inlineprivate |
Definition at line 421 of file ArgParser.h.
References argument_list(), pygui.grut-view::argv, get_item(), ArgParseItem::num_arguments(), and ArgParseItem::parse().
Referenced by parse().
|
inlineprivate |
Definition at line 445 of file ArgParser.h.
References argument_list(), pygui.grut-view::argv, get_item(), ArgParseItem::num_arguments(), and ArgParseItem::parse().
Referenced by parse().
|
inline |
Definition at line 387 of file ArgParser.h.
References values.
Referenced by default_option(), and TGRSIOptions::Load().
|
inline |
this version takes argc and argv, parses them, and sets only those that have the matching firstPass flag set this allows us to parse command line arguments in two stages, one to get the normal options and file names (from which the run info and analysis options are read), and a second stage where only the run info and analysis option flags are parsed
Definition at line 308 of file ArgParser.h.
References pygui.grut-view::argv, handle_default_option(), handle_long_flag(), handle_short_flag(), and values.
Referenced by TGRSIOptions::Load().
|
inline |
Definition at line 340 of file ArgParser.h.
References get_item(), and ArgParseItem::parse().
Referenced by TGRSIOptions::Load().
|
inline |
Definition at line 400 of file ArgParser.h.
References ArgParseItem::printable(), and values.
Referenced by operator<<().
|
private |
Definition at line 516 of file ArgParser.h.
Referenced by get_item(), option(), parse(), print(), and ~ArgParser().