doc.test.h
Go to the documentation of this file.
/* -*- C++ -*- (c) 2007 Petr Rockai <me@mornfall.net>
(c) 2007 Enrico Zini <enrico@enricozini.org> */
#include <wibble/commandline/doc.h>
#include <sstream>
#include <iostream>
#include <wibble/test.h>
using namespace wibble::commandline;
struct TestCommandlineDoc {
Test basic() {
StandardParserWithMandatoryCommand p("test", "1.0", 1, "enrico@enricozini.org");
//Parser p("test");
//p.add<BoolOption>("antani", 'a', "antani", "blinda", "supercazzola");
//p.add<BoolOption>("antani", 'a', "antani", "", "supercazzola");
//OptionGroup* g = p.addGroup("Test options");
//g->add<BoolOption>("antani", 'a', "antani", "", "supercazzola");
Engine* e = p.addEngine("testEngine");
OptionGroup* g = e->addGroup("Test options");
g->add<BoolOption>("antani", 'a', "antani", "", "supercazzola");
Help h("testapp", "1.0");
std::stringstream str;
//h.outputHelp(str, p);
//const char* opts[] = {"test", "help", "testEngine", NULL};
// XXX p.parse(3, opts);
//std::cerr << str.str() << std::endl;
}
};
// vim:set ts=4 sw=4:
wibble::commandline::OptionGroup::add
Option * add(Option *o)
Definition: options.h:368
wibble::commandline
Definition: core.cpp:6
wibble::commandline::Help
Definition: doc.h:25
Test
void Test
Definition: test.h:178
test.h
TestCommandlineDoc
Definition: doc.test.h:12
TestCommandlineDoc::basic
Test basic()
Definition: doc.test.h:14
wibble::commandline::StandardParserWithMandatoryCommand
Parser for commandline arguments, with builting help functions and manpage generation, and requiring a mandatory command.
Definition: parser.h:115
wibble::commandline::Engine::addGroup
OptionGroup * addGroup(const std::string &description)
Create an OptionGroup and add it to this engine.
Definition: engine.h:161
wibble::commandline::Engine
Parse commandline options.
Definition: engine.h:38
wibble::commandline::BoolOption
Boolean option.
Definition: options.h:134
wibble::commandline::OptionGroup
Group related commandline options.
Definition: options.h:359
wibble::commandline::Engine::addEngine
Engine * addEngine(const std::string &name, const std::string &usage=std::string(), const std::string &description=std::string(), const std::string &longDescription=std::string())
Create a Engine and add it to this engine as a command.
Definition: engine.h:182
doc.h