print_doc_functions.hpp
Go to the documentation of this file.
1 
14 #ifndef MLPACK_BINDINGS_GO_PRINT_DOC_FUNCTIONS_HPP
15 #define MLPACK_BINDINGS_GO_PRINT_DOC_FUNCTIONS_HPP
16 
18 
19 namespace mlpack {
20 namespace bindings {
21 namespace go {
22 
26 inline std::string GetBindingName(const std::string& bindingName);
27 
31 inline std::string PrintImport();
32 
36 inline std::string PrintOutputOptionInfo();
37 
41 template<typename T>
42 inline std::string PrintValue(const T& value, bool quotes);
43 
44 // Special overload for booleans.
45 template<>
46 inline std::string PrintValue(const bool& value, bool quotes);
47 
51 inline std::string PrintDefault(const std::string& paramName);
52 
53 // Base case: no modification needed.
54 inline void GetOptions(
55  std::vector<std::tuple<std::string, std::string>>& /* results */);
56 
62 template<typename T, typename... Args>
63 void GetOptions(
64  std::vector<std::tuple<std::string, std::string>>& results,
65  const std::string& paramName,
66  const T& value,
67  Args... args);
68 
69 // Recursion base case.
70 inline std::string PrintOptionalInputs(/* option */);
71 
72 // Recursion base case.
73 inline std::string PrintInputOptions(/* option */);
74 
79 template<typename T, typename... Args>
80 std::string PrintOptionalInputs(const std::string& paramName,
81  const T& value,
82  Args... args);
83 
88 template<typename T, typename... Args>
89 std::string PrintInputOptions(const std::string& paramName,
90  const T& value,
91  Args... args);
92 
93 // Recursion base case.
94 inline std::string PrintOutputOptions();
95 
96 template<typename... Args>
97 std::string PrintOutputOptions(Args... args);
98 
103 template<typename... Args>
104 std::string ProgramCall(const std::string& programName, Args... args);
105 
109 inline std::string PrintModel(const std::string& modelName);
110 
115 inline std::string PrintDataset(const std::string& datasetName);
116 
121 inline std::string ParamString(const std::string& paramName);
122 
126 inline bool IgnoreCheck(const std::string& paramName);
127 
132 inline bool IgnoreCheck(const std::vector<std::string>& constraints);
133 
138 inline bool IgnoreCheck(
139  const std::vector<std::pair<std::string, bool>>& constraints,
140  const std::string& paramName);
141 
142 } // namespace go
143 } // namespace bindings
144 } // namespace mlpack
145 
146 // Include implementation.
147 #include "print_doc_functions_impl.hpp"
148 
149 #endif
std::string PrintOutputOptions()
strip_type.hpp
Definition: add_to_po.hpp:21
void GetOptions(std::vector< std::tuple< std::string, std::string >> &)
std::string PrintDataset(const std::string &datasetName)
Given the name of a matrix, print it.
std::string GetBindingName(const std::string &bindingName)
Given the name of a binding, print its Go name.
std::string PrintModel(const std::string &modelName)
Given the name of a model, print it.
std::string programName
std::string ProgramCall(const std::string &programName, Args... args)
Given a name of a binding and a variable number of arguments (and their contents), print the corresponding function call.
std::string PrintOptionalInputs()
std::string PrintDefault(const std::string &paramName)
Given a parameter name, print its corresponding default value.
std::string PrintValue(const T &value, bool quotes)
Given a parameter type, print the corresponding value.
std::string ParamString(const std::string &paramName)
Given the parameter name, determine what it would actually be when passed to the command line...
std::string PrintImport()
Print any import information for the Go binding.
bool IgnoreCheck(const std::string &paramName)
Print whether or not we should ignore a check on the given parameter.
std::string PrintInputOptions()
std::string PrintOutputOptionInfo()
Print any special information about output options.