print_import_decl.hpp
Go to the documentation of this file.
1 
12 #ifndef MLPACK_BINDINGS_GO_IMPORT_DECL_HPP
13 #define MLPACK_BINDINGS_GO_IMPORT_DECL_HPP
14 
15 #include <mlpack/prereqs.hpp>
16 
17 namespace mlpack {
18 namespace bindings {
19 namespace go {
20 
24 template<typename T>
26  const util::ParamData& /* d */,
27  const size_t indent,
28  const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
29  const typename boost::enable_if<data::HasSerialize<T>>::type* = 0)
30 {
35  const std::string prefix = std::string(indent, ' ');
36  // Now import all the necessary packages.
37  std::cout << prefix << "\"runtime\" " << std::endl;
38  std::cout << prefix << "\"unsafe\" " << std::endl;
39 }
40 
44 template<typename T>
46  const util::ParamData& /* d */,
47  const size_t /* indent */,
48  const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
49  const typename boost::disable_if<data::HasSerialize<T>>::type* = 0)
50 {
51  // Print nothing.
52 }
53 
57 template<typename T>
59  const util::ParamData& /* d */,
60  const size_t /* indent */,
61  const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0)
62 {
63  // Print nothing.
64 }
65 
74 template<typename T>
76  const void* indent,
77  void* /* output */)
78 {
79  ImportDecl<typename std::remove_pointer<T>::type>(d, *((size_t*) indent));
80 }
81 
82 } // namespace go
83 } // namespace bindings
84 } // namespace mlpack
85 
86 #endif
strip_type.hpp
Definition: add_to_po.hpp:21
The core includes that mlpack expects; standard C++ includes and Armadillo.
This structure holds all of the information about a single parameter, including its value (which is s...
Definition: param_data.hpp:52
void ImportDecl(const util::ParamData &, const size_t indent, const typename boost::disable_if< arma::is_arma_type< T >>::type *=0, const typename boost::enable_if< data::HasSerialize< T >>::type *=0)
For a serializable type, print a cppclass definition.