libpniio
h5datatype.hpp
Go to the documentation of this file.
1 //
2 // (c) Copyright 2014 DESY, Eugen Wintersberger <eugen.wintersberger@desy.de>
3 //
4 // This file is part of libpniio.
5 //
6 // libpniio is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // libpniio is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with libpniio. If not, see <http://www.gnu.org/licenses/>.
18 // ===========================================================================
19 //
20 // Created on: Jul 14, 2012
21 // Author: Eugen Wintersberger <eugen.wintersberger@desy.de>
22 //
23 
24 #pragma once
25 
26 #include <pni/core/types.hpp>
27 #include "object_imp.hpp"
28 
29 namespace pni{
30 namespace io{
31 namespace nx{
32 namespace h5{
33 
43  class h5datatype
44  {
45  private:
48  public:
49  //======================Constructors and destructors===============
53  explicit h5datatype() noexcept;
54 
55  //----------------------------------------------------------------
66  explicit h5datatype(object_imp &&o);
67 
68  //----------------------------------------------------------------
72  const object_imp &object() const noexcept;
73  };
74 
75  //==========comparison operators==========================================
86  bool operator==(const h5datatype &a,const h5datatype &b);
87 
88  //------------------------------------------------------------------------
99  bool operator!=(const h5datatype &a,const h5datatype &b);
100 
101  //------------------------------------------------------------------------
115  pni::core::type_id_t type_id(const h5datatype &o);
116 
117  //------------------------------------------------------------------------
127  const h5datatype &get_type(pni::core::type_id_t id);
128 
129  //------------------------------------------------------------------------
139  h5datatype make_type(pni::core::type_id_t id);
140 
141 
142 
143 //end of namespace
144 }
145 }
146 }
147 }
object_imp _object
HDF5 object representing the data type.
Definition: h5datatype.hpp:47
h5datatype make_type(pni::core::type_id_t id)
create new type
h5datatype() noexcept
default constructor
Definition: h5datatype.cpp:220
pni::core::type_id_t type_id(const h5datatype &o)
get type code
Definition: h5datatype.cpp:240
HDF5 type wrapper.
Definition: h5datatype.hpp:43
Definition: cbf_reader.hpp:41
basic HDF5 ID wrapper
Definition: object_imp.hpp:59
const h5datatype & get_type(pni::core::type_id_t id)
get reference to type