openPMD-api
version.hpp
1 /* Copyright 2017-2021 Fabian Koller, Axel Huebl
2  *
3  * This file is part of openPMD-api.
4  *
5  * openPMD-api is free software: you can redistribute it and/or modify
6  * it under the terms of of either the GNU General Public License or
7  * the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * openPMD-api 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 and the GNU Lesser General Public License
15  * for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * and the GNU Lesser General Public License along with openPMD-api.
19  * If not, see <http://www.gnu.org/licenses/>.
20  */
21 #pragma once
22 
23 #include <map>
24 #include <string>
25 #include <vector>
26 
30 #define OPENPMDAPI_VERSION_MAJOR 0
31 #define OPENPMDAPI_VERSION_MINOR 16
32 #define OPENPMDAPI_VERSION_PATCH 0
33 #define OPENPMDAPI_VERSION_LABEL "dev"
40 #define OPENPMD_STANDARD_MAJOR 1
41 #define OPENPMD_STANDARD_MINOR 1
42 #define OPENPMD_STANDARD_PATCH 0
48 #define OPENPMD_STANDARD_MIN_MAJOR 1
49 #define OPENPMD_STANDARD_MIN_MINOR 0
50 #define OPENPMD_STANDARD_MIN_PATCH 0
55 #define OPENPMDAPI_VERSIONIFY(major, minor, patch) \
56  (major * 1000000 + minor * 1000 + patch)
57 
60 #define OPENPMDAPI_VERSION_GE(major, minor, patch) \
61  (OPENPMDAPI_VERSIONIFY( \
62  OPENPMDAPI_VERSION_MAJOR, \
63  OPENPMDAPI_VERSION_MINOR, \
64  OPENPMDAPI_VERSION_PATCH) >= \
65  OPENPMDAPI_VERSIONIFY(major, minor, patch))
66 
67 namespace openPMD
68 {
73 std::string getVersion();
74 
80 std::string getStandard();
81 
87 std::string getStandardMinimum();
88 
93 std::map<std::string, bool> getVariants();
94 
100 std::vector<std::string> getFileExtensions();
101 
102 } // namespace openPMD
Public definitions of openPMD-api.
Definition: Date.cpp:29
std::string getVersion()
Return the version of the openPMD-api library (run-time)
Definition: version.cpp:26
std::string getStandardMinimum()
Return the minimum supported version of the openPMD standard (read, run-time)
Definition: version.cpp:44
std::map< std::string, bool > getVariants()
Return the feature variants of the openPMD-api library (run-time)
Definition: config.cpp:33
std::vector< std::string > getFileExtensions()
Return the file extensions supported in this variant of the openPMD-api library (run-time)
Definition: config.cpp:49
std::string getStandard()
Return the maximum supported version of the openPMD standard (read & write, run-time)
Definition: version.cpp:36