mlpack
3.1.1
src
mlpack
bindings
markdown
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
19
#include <
mlpack/bindings/cli/default_param.hpp
>
20
#include <
mlpack/bindings/python/default_param.hpp
>
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
mlpack::util::ParamData
This structure holds all of the information about a single parameter, including its value (which is s...
Definition:
param_data.hpp:52
mlpack
@serialization.hpp
Definition:
add_to_po.hpp:21
mlpack::bindings::markdown::DefaultParam
void DefaultParam(const util::ParamData &data, const void *, void *output)
Print the default value of a parameter into the output string.
Definition:
default_param.hpp:31
default_param.hpp
default_param.hpp
binding_info.hpp
mlpack::bindings::markdown::BindingInfo::Language
static std::string & Language()
Get or modify the current language (don't set it to something invalid!).
Generated by
1.8.17