1 #ifndef WIBBLE_COMMANDLINE_DOC_H 2 #define WIBBLE_COMMANDLINE_DOC_H 10 namespace commandline {
21 DocMaker(
const std::string& app,
const std::string& ver)
22 : m_app(app), m_ver(ver) {}
28 void outputOptions(std::ostream& out, HelpWriter& writer,
const Engine& cp);
31 Help(
const std::string& app,
const std::string& ver)
34 void outputVersion(std::ostream& out);
35 void outputHelp(std::ostream& out,
const Engine& cp);
41 enum where { BEFORE, BEGINNING, END };
50 Hook(
const std::string& section,
where placement,
const std::string& text)
51 : section(section), placement(placement), text(text) {}
57 std::vector<Hook> hooks;
58 std::string lastSection;
60 void outputParagraph(std::ostream& out,
const std::string& str);
61 void outputOption(std::ostream& out,
const Option* o);
62 void outputOptions(std::ostream& out,
const Engine& p);
63 void runHooks(std::ostream& out,
const std::string& section,
where where);
64 void startSection(std::ostream& out,
const std::string& name);
65 void endSection(std::ostream& out);
69 Manpage(
const std::string& app,
const std::string& ver,
int section,
const std::string& author)
70 :
DocMaker(app, ver), m_section(section), m_author(author) {}
72 void addHook(
const std::string& section, where placement,
const std::string& text)
74 hooks.push_back(Hook(section, placement, text));
76 void readHooks(
const std::string& file);
Manpage(const std::string &app, const std::string &ver, int section, const std::string &author)
Definition: doc.h:69
DocMaker(const std::string &app, const std::string &ver)
Definition: doc.h:21
Parse commandline options.
Definition: engine.h:38
void addHook(const std::string §ion, where placement, const std::string &text)
Definition: doc.h:72
Interface for a parser for one commandline option.
Definition: options.h:55
std::string m_ver
Definition: doc.h:18
void output(List l, Out it)
Definition: list.h:415
Help(const std::string &app, const std::string &ver)
Definition: doc.h:31
std::string m_app
Definition: doc.h:17
where
Definition: doc.h:41