Tree Compression with Top Trees Revisited
|
Parse command-line arguments. More...
#include <ArgParser.h>
Public Member Functions | |
ArgParser (int argc, char **argv) | |
Parse command-line arguments. More... | |
template<typename T > | |
T | get (const string &key, const T defaultValue=T()) |
bool | isSet (const string &arg) const |
check whether an argument was set More... | |
uint | numDataArgs () const |
the number of unnamed data arguments More... | |
string | getDataArg (const int index) const |
get a data argument by its index (among the data arguments) More... | |
Parse command-line arguments.
A simple command-line parser.
Supports named arguments and switches as well as unnamed data arguments
Example: ./foo -v -o outfolder in1.xml in2.xml
Definition at line 21 of file ArgParser.h.
|
inline |
Parse command-line arguments.
Definition at line 24 of file ArgParser.h.
|
inline |
Get a named argument's value
key | the argument name |
defaultValue | the value to return if the argument wasn't set |
Definition at line 44 of file ArgParser.h.
|
inline |
get a data argument by its index (among the data arguments)
Definition at line 68 of file ArgParser.h.
|
inline |
check whether an argument was set
Definition at line 58 of file ArgParser.h.
|
inline |
the number of unnamed data arguments
Definition at line 63 of file ArgParser.h.