#include <commandline.h>
Public Member Functions | |
CommandLine () | |
void | print (ostream &s) const |
CommandLine (int argc, char **argv, const t_OptItemVector &v, const string &s, const int fmin=-1, const int fmax=-1) | |
CommandLine & | operator= (const CommandLine &C) |
BOSS::t_OptItem | operator() (const string &opt) const |
string | operator[] (const unsigned i) const |
unsigned | size () const |
Private Member Functions | |
void | error (const string &s) |
Private Attributes | |
t_StringVector | farg |
t_OptItemMap | barg |
string | usage |
The class CommandLine takes the command line arguments and parses them. Which options are recognized is defined in the t_OptItem vector v. This vector determines the behavior of this class. There are two choices to recall the options. Options without a flag are stored as an array and can be recalled with the operator []. Options with a flag are stored in a map. They are recalled by the operator ().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The options which are bound by an option string |
|
The options which are not bound by an option string |
|
The usage message which is printed if an error occurred |