openPMD-api
version.hpp
1 /* Copyright 2017-2020 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 13
32 #define OPENPMDAPI_VERSION_PATCH 3
33 #define OPENPMDAPI_VERSION_LABEL ""
34 
39 #define OPENPMD_STANDARD_MAJOR 1
40 #define OPENPMD_STANDARD_MINOR 1
41 #define OPENPMD_STANDARD_PATCH 0
42 
47 #define OPENPMD_STANDARD_MIN_MAJOR 1
48 #define OPENPMD_STANDARD_MIN_MINOR 0
49 #define OPENPMD_STANDARD_MIN_PATCH 0
50 
54 #define OPENPMDAPI_VERSIONIFY(major,minor,patch) (major * 1000000 + minor * 1000 + patch)
55 
58 #define OPENPMDAPI_VERSION_GE(major,minor,patch) \
59  (OPENPMDAPI_VERSIONIFY(OPENPMDAPI_VERSION_MAJOR,OPENPMDAPI_VERSION_MINOR,OPENPMDAPI_VERSION_PATCH) >= \
60  OPENPMDAPI_VERSIONIFY(major,minor,patch))
61 
62 namespace openPMD
63 {
68  std::string
69  getVersion( );
70 
75  std::string
76  getStandard( );
77 
82  std::string
84 
89  std::map< std::string, bool >
90  getVariants( );
91 
96  std::vector< std::string >
98 
99 } // namespace openPMD
std::vector< std::string > getFileExtensions()
Return the file extensions supported in this variant of the openPMD-api library (run-time) ...
Definition: config.cpp:42
std::string getStandardMinimum()
Return the minimum supported version of the openPMD standard (read, run-time)
Definition: version.cpp:52
std::string getVersion()
Return the version of the openPMD-api library (run-time)
Definition: version.cpp:28
Public definitions of openPMD-api.
Definition: Date.cpp:29
std::map< std::string, bool > getVariants()
Return the feature variants of the openPMD-api library (run-time)
Definition: config.cpp:30
std::string getStandard()
Return the maximum supported version of the openPMD standard (read & write, run-time) ...
Definition: version.cpp:41