Class
ToolDoc
Container for string documentation on a command line tool.
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
constructor |
Functions
Add list item to ToolDoc object. | |
Add section to ToolDoc object. | |
Add subsection to ToolDoc object. | |
Add text line/paragraph to ToolDoc. | |
Append two ToolDoc objects. | |
Clear entries from ToolDoc object. | |
Get tool category of ToolDoc object. | |
Get date string from ToolDoc object. | |
Get man title from ToolDoc object. | |
Get tool name of ToolDoc object. | |
Get short description of ToolDoc object. | |
Get version string from ToolDoc object. | |
Print ToolDoc object in a given format. | |
Set tool category for ToolDoc object. | |
Set date string for ToolDoc object. | |
Set version string for ToolDoc object. | |
Set tool name for ToolDoc object. | |
Set short description for ToolDoc object. | |
Set version string for ToolDoc object. |
Examples
The following shows a brief example of how to use ToolDoc.
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");
See Also
SeqAn - Sequence Analysis Library - www.seqan.de