program_doc_wrapper.hpp
Go to the documentation of this file.
1 
14 #ifndef MLPACK_BINDINGS_MARKDOWN_PROGRAM_DOC_WRAPPER_HPP
15 #define MLPACK_BINDINGS_MARKDOWN_PROGRAM_DOC_WRAPPER_HPP
16 
17 #include "binding_info.hpp"
18 
19 namespace mlpack {
20 namespace bindings {
21 namespace markdown {
22 
24 {
25  public:
29  ProgramNameWrapper(const std::string& bindingName,
30  const std::string& name)
31  {
32  BindingInfo::GetSingleton().map[bindingName].name =
33  std::move(name);
34  }
35 };
36 
38 {
39  public:
43  ShortDescriptionWrapper(const std::string& bindingName,
44  const std::string& shortDescription)
45  {
46  BindingInfo::GetSingleton().map[bindingName].shortDescription =
47  std::move(shortDescription);
48  }
49 };
50 
52 {
53  public:
57  LongDescriptionWrapper(const std::string& bindingName,
58  const std::function<std::string()>& longDescription)
59  {
60  BindingInfo::GetSingleton().map[bindingName].longDescription =
61  std::move(longDescription);
62  }
63 };
64 
66 {
67  public:
71  ExampleWrapper(const std::string& bindingName,
72  const std::function<std::string()>& example)
73  {
74  BindingInfo::GetSingleton().map[bindingName].example.push_back(
75  std::move(example));
76  }
77 };
78 
80 {
81  public:
85  SeeAlsoWrapper(const std::string& bindingName,
86  const std::string& description, const std::string& link)
87  {
88  BindingInfo::GetSingleton().map[bindingName].seeAlso.push_back(
89  std::move(std::make_pair(description, link)));
90  }
91 };
92 
93 } // namespace markdown
94 } // namespace bindings
95 } // namespace mlpack
96 
97 #endif
ExampleWrapper(const std::string &bindingName, const std::function< std::string()> &example)
Register example.
static BindingInfo & GetSingleton()
Get the singleton.
SeeAlsoWrapper(const std::string &bindingName, const std::string &description, const std::string &link)
Register seeAlso.
Linear algebra utility functions, generally performed on matrices or vectors.
ShortDescriptionWrapper(const std::string &bindingName, const std::string &shortDescription)
Register shortDescription.
LongDescriptionWrapper(const std::string &bindingName, const std::function< std::string()> &longDescription)
Register longDescription.
std::unordered_map< std::string, util::BindingDetails > map
Internally-held map for mapping a binding name to a BindingDetails.
ProgramNameWrapper(const std::string &bindingName, const std::string &name)
Register programName.