default_param.hpp
Go to the documentation of this file.
1 
14 #ifndef MLPACK_BINDINGS_MARKDOWN_DEFAULT_PARAM_HPP
15 #define MLPACK_BINDINGS_MARKDOWN_DEFAULT_PARAM_HPP
16 
17 #include "binding_info.hpp"
18 
21 
22 namespace mlpack {
23 namespace bindings {
24 namespace markdown {
25 
30 template<typename T>
31 void DefaultParam(const util::ParamData& data,
32  const void* /* input */,
33  void* output)
34 {
35  if (BindingInfo::Language() == "cli")
36  {
37  *((std::string*) output) =
38  cli::DefaultParamImpl<typename std::remove_pointer<T>::type>(data);
39  }
40  else if (BindingInfo::Language() == "python")
41  {
42  *((std::string*) output) =
43  python::DefaultParamImpl<typename std::remove_pointer<T>::type>(data);
44  }
45 }
46 
47 } // namespace markdown
48 } // namespace bindings
49 } // namespace mlpack
50 
51 #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!).