34 #define RANGETEST_VERSION \ 35 "RANGETEST V1.0 test range code" 38 #include <tfxx/commandline.h> 39 #include <tfxx/range.h> 40 #include <tfxx/rangelist.h> 41 #include <tfxx/rangestring.h> 48 #define CODE(line) cout.width(50); cout << endl << #line << "; --> "; line 50 int main(
int iargc,
char* argv[])
57 "usage: rangetest [-v] [-step s] [-list l]" "\n" 58 " or: rangetest --help|-h" "\n" 85 cerr << usage_text << endl;
95 cerr << usage_text << endl;
96 cerr << help_text << endl;
105 CODE(
while (RS.more()) { cout << ++RS <<
", "; });
116 CODE(
while (RLS.valid()) { cout << RLS <<
", "; ++RLS; });
119 CODE( cout << step << endl );
120 CODE( cout << list << endl );
123 CODE(
while (RLSs.valid()) { cout << RLSs <<
", "; ++RLSs; });
int int_arg(const int &iopt) const
return argument of option # iopt as int value
option requires an argument
bool optset(const int &iopt) const
true if option # iopt was set on commandline
RangeList & append(const Trange &r)
#define RANGETEST_VERSION
A class to deal with numerical ranges.
Namespace containing all components of module commandline. ,.
Evaluates commandline by calling long_getopt. ,You may instantiate a Commandline object by passing th...
#define CODE(line)
Show code along with output of executed code.
tfxx::Range< int > Tirange
int main(int iargc, char *argv[])
struct to define options ,This struct is used to define a list of options. An example is: ...
std::string string_arg(const int &iopt) const
return argument of option # iopt as string value