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...

 

Detailed Description

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.

See also
core/util/cli.hpp, mlpack::CLI

Definition at line 26 of file program_doc.hpp.

Constructor & Destructor Documentation

◆ ProgramDoc() [1/2]

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.

Parameters
programNameShort string representing the name of the program.
shortDocumentationA short two-sentence description of the program, what it does, and what it is useful for.
documentationLong 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.
seeAlsoA set of pairs of strings with useful "see also" information; each pair is <description, url>.

◆ ProgramDoc() [2/2]

Construct an empty ProgramDoc object.

(This is not meant to be used!)

Member Data Documentation

◆ documentation

std::function<std::string()> documentation

Documentation for what the program does.

Definition at line 59 of file program_doc.hpp.

◆ programName

std::string programName

The name of the program.

Definition at line 55 of file program_doc.hpp.

◆ seeAlso

std::vector<std::pair<std::string, std::string> > seeAlso

Set of see also information.

Definition at line 61 of file program_doc.hpp.

◆ shortDocumentation

std::string shortDocumentation

The short documentation for the program.

Definition at line 57 of file program_doc.hpp.


The documentation for this class was generated from the following file:
  • /home/ryan/src/mlpack.org/_src/mlpack-3.1.0/src/mlpack/core/util/program_doc.hpp