Class
ToolDoc
Container for string documentation on a command line tool.
ToolDoc
Include Headers
seqan/arg_parse/tool_doc.h
Remarks
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
ToolDocconstructor
Functions
addListItemAdd list item to ToolDoc object. Appends a list item to the ArgumentParser.
addSectionAdd section to ToolDoc object. Begins a new section of ArgParseOption the help output of the ArgumentParser.
addSubSectionAdd subsection to ToolDoc object.
addTextAdd text line/paragraph to ToolDoc. Appends a text paragraph to the ArgumentParser.
clearEntriesClear entries from ToolDoc object.
getCategoryGet tool category of ToolDoc object. Get tool category of ArgumentParser 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. Gets short description of ArgumentParser.
getVersionGet version string from ToolDoc object. Get version string from ArgumentParser object.
printPrint ToolDoc object in a given format.
setCategorySet tool category for ToolDoc object. Set tool category for ArgumentParser object.
setDateSet date string for ToolDoc object. Sets date string of ArgumentParser.
setManTitleSet version string for ToolDoc object.
setNameSet tool name for ToolDoc object.
setShortDescriptionSet short description for ToolDoc object. Sets short description of the ArgumentParser object.
setVersionSet version string for ToolDoc object. Sets version string of ArgumentParser.
Examples
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);
addText(doc,
        "\fBrazers\fP [\fIOPTIONS\fP] \fIREFERENCE\fP \fILEFT_READS\fP "
        "\fIRIGHT_READS\fP", false);
 
addSection(doc, "Description");
addText(doc,
        "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 "
        "performance.");
addText(doc,
        "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 - www.seqan.de
 

Page built @2012/10/02 11:10:29