is_serializable.hpp
Go to the documentation of this file.
1 
12 #ifndef MLPACK_BINDINGS_MARKDOWN_IS_SERIALIZABLE_HPP
13 #define MLPACK_BINDINGS_MARKDOWN_IS_SERIALIZABLE_HPP
14 
15 #include <mlpack/prereqs.hpp>
16 
17 namespace mlpack {
18 namespace bindings {
19 namespace markdown {
20 
24 template<typename T>
26  const typename boost::disable_if<data::HasSerialize<T>>::type* = 0)
27 {
28  return false;
29 }
30 
35 template<typename T>
37  const typename boost::enable_if<arma::is_arma_type<T>>::type* = 0)
38 {
39  return false;
40 }
41 
45 template<typename T>
47  const typename boost::enable_if<data::HasSerialize<T>>::type* = 0,
48  const typename boost::disable_if<arma::is_arma_type<T>>::type* = 0)
49 {
50  return true;
51 }
52 
56 template<typename T>
57 void IsSerializable(const util::ParamData& /* data */,
58  const void* /* input */,
59  void* output)
60 {
61  *((bool*) output) = IsSerializable<typename std::remove_pointer<T>::type>();
62 }
63 
64 } // namespace markdown
65 } // namespace bindings
66 } // namespace mlpack
67 
68 #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
bool IsSerializable(const typename boost::disable_if< data::HasSerialize< T >>::type *=0)
Return false, because the type is not serializable.