Container for string documentation on a command line tool.
Include Headers
This class is generally not used directly by the user but through ArgumentParser. It allows to store and represent all information related to a command line tool that would normally go into a man page. It can be printed to STL streams in different formats, currently plain text, HTML and man pages are supported.
You can also use basic formatting in text. This formatting is tailored to the usage on the command line. Use \fB to start bold font, \fI to start italic font and \fP to use the previous font (of course, use correct escaping of the backslash in C strings, so use "\fB", "\fI", and "\fP" in your code.
Member Functions
addListItemAdd list item to ToolDoc object.
addSectionAdd section to ToolDoc object.
addSubSectionAdd subsection to ToolDoc object.
addTextAdd text line/paragraph to ToolDoc.
appendAppend two ToolDoc objects.
clearEntriesClear entries from ToolDoc object.
getCategoryGet tool category of ToolDoc object.
getDateGet date string from ToolDoc object.
getManTitleGet man title from ToolDoc object.
getNameGet tool name of ToolDoc object.
getShortDescriptionGet short description of ToolDoc object.
getVersionGet version string from ToolDoc object.
printPrint ToolDoc object in a given format.
setCategorySet tool category for ToolDoc object.
setDateSet date string for ToolDoc object.
setManTitleSet version string for ToolDoc object.
setNameSet tool name for ToolDoc object.
setShortDescriptionSet short description for ToolDoc object.
setVersionSet version string for ToolDoc object.
The following shows a brief example of how to use ToolDoc.
ToolDoc doc;
setName(doc, "RazerS");
setShortDescription(doc, "Read mapping with controllable sensitivity.");
setDate(doc, "04 March 2012");
setVersion(doc, "1.0");
setCategory(doc, "Read Mapping");
setManTitle(doc, "SeqAn Apps Reference Manual");
addSection(doc, "Synopsis");
addText(doc, "\fBrazers\fP [\fIOPTIONS\fP] \fIREFERENCE\fP \fIREADS\fP", false);
        "\fBrazers\fP [\fIOPTIONS\fP] \fIREFERENCE\fP \fILEFT_READS\fP "
        "\fIRIGHT_READS\fP", false);
addSection(doc, "Description");
        "RazerS is a read mapper with controllable, sensitivity.  This "
        "means that you can find all read matches in the reference sequence "
        "and optionally, you can trade lower sensitivity for better "
        "What's special about RazerS is that you can control the sensitivity.");
addSection(doc, "Options");
addSubSection(doc, "Main Options");
addListItem(doc, "\fB-id\fP, \fB--indels\fP",
            "Enable mapping with indels enabled.");
addListItem(doc, "\fB-i\fP, \fB--identity\fP \fIIDENTITY\fP",
            "Set minimal identity of matches to find.");
print(std::cout, doc, "text");
SeqAn - Sequence Analysis Library -

Page built @2013/07/11 09:12:35