Class
ArgumentParser
Stores multiple ArgParseOption objects and parses the command line arguments for these options.
ArgumentParser
Include Headers
seqan/arg_parse.h
Remarks
See the documentation of ToolDoc on how to format text. Where possible, formatting is added automatically for you. You have to use formatting in the following places: (1) usage lines, (2) option help texts, (3) description and additional text sections.
Member Functions

ArgumentParser | Constructor

Functions

addArgument | Adds a ArgParseArgument object to the ArgumentParser.
addDefaultValue | Add to the default values of an option of an ArgumentParser.
addDescription | Appends a description paragraph to the ArgumentParser documentation.
addLine | Adds a line of text to the help output of the ArgumentParser in the block of ArgParseOptions.
addListItem | Appends a list item to the ArgumentParser.
addOption | Adds a ArgParseOption object to the ArgumentParser.
addSection | Begins a new section of ArgParseOption the help output of the ArgumentParser.
addText | Appends a text paragraph to the ArgumentParser.
addTextSection | Adds a text section to the ArgumentParser.
addTextSubSection | Adds a text subsection to the ArgumentParser.
addUsageLine | Adds a line of text to the usage output of the ArgumentParser.
getAppName | Get tool name of ArgumentParser object.
getArgument | Returns a reference to the specified argument.
getArgumentValue | Retrieves the value of an argument given by its position.
getArgumentValueCount | Returns the number of values stored in the specified option.
getArgumentValues | Returns all values of an option given on the command line.
getCategory | Get tool category of ArgumentParser object.
getOption | Returns a reference to the specified option.
getOptionValue | Retrieves the value of an option given either the short or long name.
getOptionValueCount | Returns the number of values stored in the specified option.
getOptionValues | Returns all values of an option given on the command line.
getShortDescription | Gets short description of ArgumentParser.
getVersion | Get version string from ArgumentParser object.
hasDefault | Returns whether an option has a default value or not.
hasOption | Returns whether a certain option is registered in the parser.
hideOption | Hides the ArgParseOption defined by the parameter name (which can be either the short or the long name) from the help screen.
isSet | Returns whether an option was set on the parsed command line.
parse | Parses the command line.
printHelp | Prints the complete help message for the parser to a stream.
printShortHelp | Prints a short help message for the parser to a stream
printVersion | Prints the version information of the parser to a stream.
setAppName | Sets application name of ArgumentParser.
setCategory | Set tool category for ArgumentParser object.
setDate | Sets date string of ArgumentParser.
setDefaultValue | Set default value of an option of an ArgumentParser.
setHelpText | Set help text of argument parser.
setMaxValue | Set largest allowed value for an option or argument of an ArgumentParser.
setMinValue | Set smallest allowed value for an option or argument of an ArgumentParser.
setRequired | Sets whether or not the option defined by the parameter name (which can be either the short or the long name) is mandatory.
setShortDescription | Sets short description of the ArgumentParser object.
setValidValues | Set valid values for an argument or option of an ArgumentParser.
setVersion | Sets version string of ArgumentParser.
writeCTD | Exports the app's interface description to a .ctd file.

Examples
The following gives a simple example of how to use the ArgumentParser.
ArgumentParser parser("alf");
setShortDescription(parser, "Alignment free sequence comparison");
setVersion(parser, "1.0");
setDate(parser, "Jan 2010");
addUsageLine(parser, "[\fIOPTIONS\fP] \fB-i\fP \fIIN\fP \fB-o\fP \fIOUT\fP");
addDescription(parser,
"ALF can be used to calculate the pairwise similarity of sequences "
"using alignment-free methods. All methods which are implemented are "
"based on k-mer counts.");
addOption(parser, ArgParseOption("i", "inputFile", "Name of the multi-FASTA input.",
ArgParseArgument(ArgParseArgument::INPUTFILE, "IN")));
setRequired(parser, "i");
addOption(parser, ArgParseOption("o", "outputFile", "Name of the multi-FASTA input.",
ArgParseArgument(ArgParseArgument::OUTPUTFILE, "OUT")));
setRequired(parser, "o");
addTextSection(parser, "See Also");
addText(parser, "http://www.seqan.de/projects/alf");
See Also
ArgParseArgument, ToolDoc, ArgParseOption
SeqAn - Sequence Analysis Library - www.seqan.de

Page built @2014/10/13 16:12:56