print_doc_functions.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_BINDINGS_PYTHON_PRINT_DOC_FUNCTIONS_HPP
14 #define MLPACK_BINDINGS_PYTHON_PRINT_DOC_FUNCTIONS_HPP
15 
17 
18 namespace mlpack {
19 namespace bindings {
20 namespace python {
21 
25 inline std::string GetBindingName(const std::string& bindingName);
26 
30 inline std::string PrintImport(const std::string& bindingName);
31 
35 inline std::string PrintOutputOptionInfo();
36 
40 template<typename T>
41 inline std::string PrintValue(const T& value, bool quotes);
42 
43 // Special overload for booleans.
44 template<>
45 inline std::string PrintValue(const bool& value, bool quotes);
46 
50 inline std::string PrintDefault(const std::string& paramName);
51 
52 // Recursion base case.
53 inline std::string PrintInputOptions();
54 
60 template<typename T, typename... Args>
61 std::string PrintInputOptions(const std::string& paramName,
62  const T& value,
63  Args... args);
64 
65 // Recursion base case.
66 inline std::string PrintOutputOptions();
67 
68 template<typename T, typename... Args>
69 std::string PrintOutputOptions(const std::string& paramName,
70  const T& value,
71  Args... args);
72 
77 template<typename... Args>
78 std::string ProgramCall(const std::string& programName, Args... args);
79 
84 inline std::string ProgramCall(const std::string& programName);
85 
89 inline std::string PrintModel(const std::string& modelName);
90 
95 inline std::string PrintDataset(const std::string& datasetName);
96 
101 inline std::string ParamString(const std::string& paramName);
102 
108 inline bool IgnoreCheck(const std::string& paramName);
109 
115 inline bool IgnoreCheck(const std::vector<std::string>& constraints);
116 
123 inline bool IgnoreCheck(
124  const std::vector<std::pair<std::string, bool>>& constraints,
125  const std::string& paramName);
126 
127 } // namespace python
128 } // namespace bindings
129 } // namespace mlpack
130 
131 // Include implementation.
132 #include "print_doc_functions_impl.hpp"
133 
134 #endif
std::string PrintValue(const T &value, bool quotes)
Given a parameter type, print the corresponding value.
std::string PrintOutputOptionInfo()
Print any special information about output options.
std::string PrintDefault(const std::string &paramName)
Given a parameter name, print its corresponding default value.
std::string GetBindingName(const std::string &bindingName)
Given the name of a binding, print its Python name.
strip_type.hpp
Definition: add_to_po.hpp:21
std::string PrintOutputOptions()
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 PrintModel(const std::string &modelName)
Given the name of a model, print it.
python
Definition: CMakeLists.txt:5
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 PrintDataset(const std::string &datasetName)
Given the name of a matrix, print it.
std::string PrintInputOptions()
std::string PrintImport(const std::string &bindingName)
Print any import information for the Python binding.
bool IgnoreCheck(const std::string &paramName)
Print whether or not we should ignore a check on the given parameter.