mlpack  3.1.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
print_type_doc.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_BINDINGS_MARKDOWN_PRINT_TYPE_DOC_HPP
14 #define MLPACK_BINDINGS_MARKDOWN_PRINT_TYPE_DOC_HPP
15 
16 #include "binding_info.hpp"
17 
21 
22 namespace mlpack {
23 namespace bindings {
24 namespace markdown {
25 
30 template<typename T>
32 {
33  if (BindingInfo::Language() == "cli")
34  {
35  return cli::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
36  }
37  else if (BindingInfo::Language() == "python")
38  {
39  return python::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
40  }
41  else if (BindingInfo::Language() == "julia")
42  {
43  return julia::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
44  }
45  else
46  {
47  throw std::invalid_argument("PrintTypeDoc(): unknown "
48  "BindingInfo::Language() " + BindingInfo::Language() + "!");
49  }
50 }
51 
52 } // namespace markdown
53 } // namespace bindings
54 } // namespace mlpack
55 
56 #endif
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:52
std::string PrintTypeDoc(const util::ParamData &data)
Print the type of a parameter into the output string.
static std::string & Language()
Get or modify the current language (don&#39;t set it to something invalid!).
string(REGEX REPLACE".*#define MLPACK_VERSION_MINOR ([0-9]+).*""\\1"MLPACK_VERSION_MINOR"${VERSION_HPP_CONTENTS}") string(REGEX REPLACE".* "\\1" MLPACK_VERSION_PATCH "$
Definition: CMakeLists.txt:35