default_param.hpp
Go to the documentation of this file.
1 
8 #ifndef MLPACK_BINDINGS_MARKDOWN_DEFAULT_PARAM_HPP
9 #define MLPACK_BINDINGS_MARKDOWN_DEFAULT_PARAM_HPP
10 
11 #include "binding_info.hpp"
12 
15 
16 namespace mlpack {
17 namespace bindings {
18 namespace markdown {
19 
24 template<typename T>
25 void DefaultParam(const util::ParamData& data,
26  const void* /* input */,
27  void* output)
28 {
29  if (BindingInfo::Language() == "cli")
30  {
31  *((std::string*) output) =
32  cli::DefaultParamImpl<typename std::remove_pointer<T>::type>(data);
33  }
34  else if (BindingInfo::Language() == "python")
35  {
36  *((std::string*) output) =
37  python::DefaultParamImpl<typename std::remove_pointer<T>::type>(data);
38  }
39 }
40 
41 } // namespace markdown
42 } // namespace bindings
43 } // namespace mlpack
44 
45 #endif
.hpp
Definition: add_to_po.hpp:21
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:52
void DefaultParam(const util::ParamData &data, const void *, void *output)
Print the default value 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!).