/** * Author: Sebastian Weber (sebastian.weber@physik.tu-darmstadt.de) * * C++ type to HDF5 PredType value map */ #ifndef HDF5_TYPES_HPP #define HDF5_TYPES_HPP #include #include namespace boost { namespace archive { namespace detail { // map C++ types to HDF5 PredType constants, the default is: we // don't know which is what this declaration says template class H5DataTypeTraits { public: static const H5::PredType value; typedef mpl::false_ type_known; }; template const H5::PredType H5DataTypeTraits::value = H5::PredType::NATIVE_OPAQUE; #define BOOST_SERIALIZATION_HDF5_TYPE_DECL(ctype) \ template<> \ class H5DataTypeTraits { \ public: \ static const H5::PredType value; \ typedef mpl::true_ type_known; \ }; \ template<> \ class H5DataTypeTraits { \ public: \ static const H5::PredType value; \ typedef mpl::true_ type_known; \ }; BOOST_SERIALIZATION_HDF5_TYPE_DECL(double) BOOST_SERIALIZATION_HDF5_TYPE_DECL(long double) BOOST_SERIALIZATION_HDF5_TYPE_DECL(int) BOOST_SERIALIZATION_HDF5_TYPE_DECL(unsigned int) BOOST_SERIALIZATION_HDF5_TYPE_DECL(long) BOOST_SERIALIZATION_HDF5_TYPE_DECL(unsigned long) BOOST_SERIALIZATION_HDF5_TYPE_DECL(long long) BOOST_SERIALIZATION_HDF5_TYPE_DECL(unsigned long long) BOOST_SERIALIZATION_HDF5_TYPE_DECL(short) BOOST_SERIALIZATION_HDF5_TYPE_DECL(unsigned short) BOOST_SERIALIZATION_HDF5_TYPE_DECL(char) BOOST_SERIALIZATION_HDF5_TYPE_DECL(unsigned char) //BOOST_SERIALIZATION_HDF5_TYPE_DECL(hsize_t) //BOOST_SERIALIZATION_HDF5_TYPE_DECL(bool) } // ns detail } // ns archive } // ns boost #endif