Goby3  3.1.5a
2024.05.23
hdf5_predicate.h
Go to the documentation of this file.
1 // Copyright 2011-2021:
2 // GobySoft, LLC (2013-)
3 // Massachusetts Institute of Technology (2007-2014)
4 // Community contributors (see AUTHORS file)
5 // File authors:
6 // Toby Schneider <toby@gobysoft.org>
7 //
8 //
9 // This file is part of the Goby Underwater Autonomy Project Libraries
10 // ("The Goby Libraries").
11 //
12 // The Goby Libraries are free software: you can redistribute them and/or modify
13 // them under the terms of the GNU Lesser General Public License as published by
14 // the Free Software Foundation, either version 2.1 of the License, or
15 // (at your option) any later version.
16 //
17 // The Goby Libraries are distributed in the hope that they will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU Lesser General Public License for more details.
21 //
22 // You should have received a copy of the GNU Lesser General Public License
23 // along with Goby. If not, see <http://www.gnu.org/licenses/>.
24 
25 #ifndef GOBY_MIDDLEWARE_LOG_HDF5_HDF5_PREDICATE_H
26 #define GOBY_MIDDLEWARE_LOG_HDF5_HDF5_PREDICATE_H
27 
28 #include "H5Cpp.h"
29 
31 
32 namespace goby
33 {
34 namespace middleware
35 {
36 namespace hdf5
37 {
38 template <typename T> H5::PredType predicate();
39 template <> H5::PredType predicate<std::int32_t>() { return H5::PredType::NATIVE_INT32; }
40 template <> H5::PredType predicate<std::int64_t>() { return H5::PredType::NATIVE_INT64; }
41 template <> H5::PredType predicate<std::uint32_t>() { return H5::PredType::NATIVE_UINT32; }
42 template <> H5::PredType predicate<std::uint64_t>() { return H5::PredType::NATIVE_UINT64; }
43 template <> H5::PredType predicate<float>() { return H5::PredType::NATIVE_FLOAT; }
44 template <> H5::PredType predicate<double>() { return H5::PredType::NATIVE_DOUBLE; }
45 template <> H5::PredType predicate<unsigned char>() { return H5::PredType::NATIVE_UCHAR; }
46 } // namespace hdf5
47 } // namespace middleware
48 } // namespace goby
49 
50 #endif
primitive_types.h
goby
The global namespace for the Goby project.
Definition: acomms_constants.h:33
goby::middleware::hdf5::predicate
H5::PredType predicate()
goby::middleware::hdf5::predicate< unsigned char >
H5::PredType predicate< unsigned char >()
Definition: hdf5_predicate.h:45
goby::middleware::hdf5::predicate< double >
H5::PredType predicate< double >()
Definition: hdf5_predicate.h:44
goby::middleware::hdf5::predicate< float >
H5::PredType predicate< float >()
Definition: hdf5_predicate.h:43