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 {
34  const std::string prefix = std::string(indent, ' ');
35  // Now import all the necessary packages.
36  std::cout << prefix << "\"runtime\" " << std::endl;
37  std::cout << prefix << "\"unsafe\" " << std::endl;
38 }
39 
43 template<typename T>
45  const util::ParamData& /* d */,
46  const size_t /* indent */,
47  const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0,
48  const typename boost::disable_if<data::HasSerialize<T>>::type* = 0)
49 {
50  // Print nothing.
51 }
52 
56 template<typename T>
58  const util::ParamData& /* d */,
59  const size_t /* indent */,
60  const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0)
61 {
62  // Print nothing.
63 }
64 
73 template<typename T>
75  const void* indent,
76  void* /* output */)
77 {
78  ImportDecl<typename std::remove_pointer<T>::type>(d, *((size_t*) indent));
79 }
80 
81 } // namespace go
82 } // namespace bindings
83 } // namespace mlpack
84 
85 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
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.