mlpack
3.1.1
src
mlpack
bindings
markdown
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
18
#include <
mlpack/bindings/cli/print_type_doc.hpp
>
19
#include <
mlpack/bindings/python/print_type_doc.hpp
>
20
21
namespace
mlpack
{
22
namespace
bindings {
23
namespace
markdown {
24
29
template
<
typename
T>
30
std::string
PrintTypeDoc
(
const
util::ParamData
& data)
31
{
32
if
(
BindingInfo::Language
() ==
"cli"
)
33
{
34
return
cli::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
35
}
36
else
if
(
BindingInfo::Language
() ==
"python"
)
37
{
38
return
python::PrintTypeDoc<typename std::remove_pointer<T>::type>(data);
39
}
40
else
41
{
42
throw
std::invalid_argument(
"PrintTypeDoc(): unknown "
43
"BindingInfo::Language() "
+
BindingInfo::Language
() +
"!"
);
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
print_type_doc.hpp
mlpack::bindings::markdown::PrintTypeDoc
std::string PrintTypeDoc(const util::ParamData &data)
Print the type of a parameter into the output string.
Definition:
print_type_doc.hpp:30
print_type_doc.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