A static object whose constructor registers program documentation with the CLI class. More...
Public Member Functions | |
ProgramDoc (const std::string programName, const std::string shortDocumentation, const std::function< std::string()> documentation, const std::vector< std::pair< std::string, std::string >> seeAlso) | |
Construct a ProgramDoc object. More... | |
ProgramDoc () | |
Construct an empty ProgramDoc object. More... | |
Public Attributes | |
std::function< std::string()> | documentation |
Documentation for what the program does. More... | |
std::string | programName |
The name of the program. More... | |
std::vector< std::pair< std::string, std::string > > | seeAlso |
Set of see also information. More... | |
std::string | shortDocumentation |
The short documentation for the program. More... | |
A static object whose constructor registers program documentation with the CLI class.
This should not be used outside of CLI itself, and you should use the PROGRAM_INFO() macro to declare these objects. Only one ProgramDoc object should ever exist.
Definition at line 26 of file program_doc.hpp.
ProgramDoc | ( | const std::string | programName, |
const std::string | shortDocumentation, | ||
const std::function< std::string()> | documentation, | ||
const std::vector< std::pair< std::string, std::string >> | seeAlso | ||
) |
Construct a ProgramDoc object.
When constructed, it will register itself with CLI, and when the user calls –help (or whatever the option is named for the given binding type), the given function that returns a std::string will be returned.
programName | Short string representing the name of the program. |
shortDocumentation | A short two-sentence description of the program, what it does, and what it is useful for. |
documentation | Long string containing documentation on how to use the program and what it is. No newline characters are necessary; this is taken care of by CLI later. |
seeAlso | A set of pairs of strings with useful "see also" information; each pair is <description, url>. |
ProgramDoc | ( | ) |
Construct an empty ProgramDoc object.
(This is not meant to be used!)
std::function<std::string()> documentation |
Documentation for what the program does.
Definition at line 59 of file program_doc.hpp.
std::string programName |
The name of the program.
Definition at line 55 of file program_doc.hpp.
std::vector<std::pair<std::string, std::string> > seeAlso |
Set of see also information.
Definition at line 61 of file program_doc.hpp.
std::string shortDocumentation |
The short documentation for the program.
Definition at line 57 of file program_doc.hpp.