mlpack  3.4.2
 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 
23 
24 namespace mlpack {
25 namespace bindings {
26 namespace markdown {
27 
32 template<typename T>
34 {
35  if (BindingInfo::Language() == "cli")
36  {
37  return cli::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
38  }
39  else if (BindingInfo::Language() == "python")
40  {
41  return python::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
42  }
43  else if (BindingInfo::Language() == "julia")
44  {
45  return julia::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
46  }
47  else if (BindingInfo::Language() == "go")
48  {
49  return go::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
50  }
51  else if (BindingInfo::Language() == "r")
52  {
53  return r::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
54  }
55  else
56  {
57  throw std::invalid_argument("PrintTypeDoc(): unknown "
58  "BindingInfo::Language() " + BindingInfo::Language() + "!");
59  }
60 }
61 
62 } // namespace markdown
63 } // namespace bindings
64 } // namespace mlpack
65 
66 #endif
std::string PrintTypeDoc(util::ParamData &data)
Print the type of a parameter into the output string.
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:52
static std::string & Language()
Get or modify the current language (don&#39;t set it to something invalid!).
src mlpack core util version hpp VERSION_HPP_CONTENTS string(REGEX REPLACE".*#define MLPACK_VERSION_MAJOR ([0-9]+).*""\\1"MLPACK_VERSION_MAJOR"${VERSION_HPP_CONTENTS}") string(REGEX REPLACE".* MLPACK_VERSION_MINOR "$
Definition: CMakeLists.txt:79