openPMD-api
 
Loading...
Searching...
No Matches
version.hpp
1/* Copyright 2017-2025 Fabian Koller, Axel Huebl, Franz Poeschel
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 17
32#define OPENPMDAPI_VERSION_PATCH 0
33#define OPENPMDAPI_VERSION_LABEL ""
35
40#define OPENPMD_STANDARD_MAJOR 2
41#define OPENPMD_STANDARD_MINOR 0
42#define OPENPMD_STANDARD_PATCH 0
44
49#define OPENPMD_STANDARD_DEFAULT_MAJOR 1
50#define OPENPMD_STANDARD_DEFAULT_MINOR 1
51#define OPENPMD_STANDARD_DEFAULT_PATCH 0
53
57#define OPENPMD_STANDARD_MIN_MAJOR 1
58#define OPENPMD_STANDARD_MIN_MINOR 0
59#define OPENPMD_STANDARD_MIN_PATCH 0
61
64#define OPENPMDAPI_VERSIONIFY(major, minor, patch) \
65 (major * 1000000 + minor * 1000 + patch)
66
69#define OPENPMDAPI_VERSION_GE(major, minor, patch) \
70 (OPENPMDAPI_VERSIONIFY( \
71 OPENPMDAPI_VERSION_MAJOR, \
72 OPENPMDAPI_VERSION_MINOR, \
73 OPENPMDAPI_VERSION_PATCH) >= \
74 OPENPMDAPI_VERSIONIFY(major, minor, patch))
75
76namespace openPMD
77{
82std::string getVersion();
83
89[[deprecated(
90 "Deprecated due to unclear semantics. Use one of getStandardMinimum, "
91 "getStandardMaximum() or getStandardDefault instead.")]] std::string
93
99std::string getStandardDefault();
100
106std::string getStandardMinimum();
107
113std::string getStandardMaximum();
114
119std::map<std::string, bool> getVariants();
120
126std::vector<std::string> getFileExtensions();
127
128} // 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 getStandardMaximum()
Return the minimum supported version of the openPMD standard (read, run-time)
Definition version.cpp:59
std::string getStandardMinimum()
Return the minimum supported version of the openPMD standard (read, run-time)
Definition version.cpp:50
std::map< std::string, bool > getVariants()
Return the feature variants of the openPMD-api library (run-time)
Definition config.cpp:33
std::string getStandardDefault()
Return the default used version of the openPMD standard (read & write, run-time)
Definition version.cpp:41
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