wibble
1.1
Main Page
Namespaces
Classes
Files
File List
File Members
wibble
commandline
doc.test.h
Go to the documentation of this file.
1
/* -*- C++ -*- (c) 2007 Petr Rockai <me@mornfall.net>
2
(c) 2007 Enrico Zini <enrico@enricozini.org> */
3
4
#include <
wibble/commandline/doc.h
>
5
#include <sstream>
6
#include <iostream>
7
8
#include <
wibble/test.h
>
9
10
using namespace
wibble::commandline;
11
12
struct
TestCommandlineDoc
{
13
14
Test
basic
() {
15
StandardParserWithMandatoryCommand
p(
"test"
,
"1.0"
, 1,
"enrico@enricozini.org"
);
16
//Parser p("test");
17
//p.add<BoolOption>("antani", 'a', "antani", "blinda", "supercazzola");
18
//p.add<BoolOption>("antani", 'a', "antani", "", "supercazzola");
19
//OptionGroup* g = p.addGroup("Test options");
20
//g->add<BoolOption>("antani", 'a', "antani", "", "supercazzola");
21
Engine
* e = p.
addEngine
(
"testEngine"
);
22
OptionGroup
* g = e->
addGroup
(
"Test options"
);
23
g->
add
<
BoolOption
>(
"antani"
,
'a'
,
"antani"
,
""
,
"supercazzola"
);
24
25
Help
h(
"testapp"
,
"1.0"
);
26
27
std::stringstream str;
28
//h.outputHelp(str, p);
29
//const char* opts[] = {"test", "help", "testEngine", NULL};
30
// XXX p.parse(3, opts);
31
//std::cerr << str.str() << std::endl;
32
}
33
34
};
35
36
// vim:set ts=4 sw=4:
Generated on Wed Oct 23 2013 17:14:25 for wibble by
1.8.4