h5cpp  0.3.3
A modern C++ wrapper for the HDF5 C library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
version.hpp
Go to the documentation of this file.
1 //
2 // (c) Copyright 2018 DESY,ESS
3 //
4 // This file is part of h5cpp.
5 //
6 // This library is free software; you can redistribute it and/or modify it
7 // under the terms of the GNU Lesser General Public License as published
8 // by the Free Software Foundation; either version 2.1 of the License, or
9 // (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful, but
12 // WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY
13 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 // License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public License
17 // along with this library; if not, write to the
18 // Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
19 // Boston, MA 02110-1301 USA
20 // ===========================================================================
21 //
22 // Author: Eugen Wintersberger <eugen.wintersberger@desy.de>
23 // Created on: Feb 7, 2018
24 //
25 #pragma once
26 
27 #include <string>
28 #include <iostream>
29 #include <h5cpp/core/windows.hpp>
30 
31 namespace hdf5 {
32 
39 {
40  public:
44  using NumberType = unsigned long;
45  private:
46  NumberType major_;
47  NumberType minor_;
48  NumberType patch_;
49  public:
55  Version() noexcept;
56 
63  Version(NumberType major_number, NumberType minor_number, NumberType patch) noexcept;
64 
71  Version(const Version &) = default;
72 
76  NumberType major_number() const noexcept;
77 
81  NumberType minor_number() const noexcept;
82 
86  NumberType patch_number() const noexcept;
87 
95  static std::string to_string(const Version &version);
96 };
97 
110 DLL_EXPORT std::ostream &operator<<(std::ostream &stream,const Version &version);
111 
122 DLL_EXPORT bool operator==(const Version &lhs,const Version &rhs);
123 
132 DLL_EXPORT bool operator!=(const Version &lhs,const Version &rhs);
133 
140 DLL_EXPORT bool operator<=(const Version &lhs,const Version &rhs);
141 
149 DLL_EXPORT bool operator<(const Version &lhs,const Version &rhs);
150 
158 DLL_EXPORT bool operator>=(const Version &lhs,const Version &rhs);
159 
167 DLL_EXPORT bool operator>(const Version &lhs,const Version &rhs);
168 
175 DLL_EXPORT Version current_library_version();
176 
177 } // namespace hdf5
Definition: attribute.hpp:43
#define DLL_EXPORT
Definition: windows.hpp:35
a 3 number version class
Definition: version.hpp:38
unsigned long NumberType
the number type used to represent version numbers
Definition: version.hpp:44