openPMD-api
Common.hpp
1 /* Copyright 2023 The openPMD Community
2  *
3  * This header is used to centrally define classes that shall not violate the
4  * C++ one-definition-rule (ODR) for various Python translation units.
5  *
6  * Authors: Axel Huebl
7  * License: LGPL-3.0-or-later
8  */
9 #pragma once
10 
11 #include "openPMD/Iteration.hpp"
12 #include "openPMD/Mesh.hpp"
13 #include "openPMD/ParticlePatches.hpp"
14 #include "openPMD/ParticleSpecies.hpp"
15 #include "openPMD/Record.hpp"
16 #include "openPMD/RecordComponent.hpp"
17 #include "openPMD/Series.hpp"
18 #include "openPMD/backend/BaseRecord.hpp"
19 #include "openPMD/backend/BaseRecordComponent.hpp"
20 #include "openPMD/backend/MeshRecordComponent.hpp"
21 #include "openPMD/backend/PatchRecord.hpp"
22 #include "openPMD/backend/PatchRecordComponent.hpp"
23 
24 #include <pybind11/gil.h>
25 #include <pybind11/numpy.h>
26 #include <pybind11/pybind11.h>
27 #include <pybind11/stl.h>
28 #include <pybind11/stl_bind.h>
29 // not yet used:
30 // pybind11/functional.h // for std::function
31 
32 // used exclusively in all our Python .cpp files
33 namespace py = pybind11;
34 using namespace openPMD;
35 
36 // opaque types
49 PYBIND11_MAKE_OPAQUE(PyIterationContainer)
50 PYBIND11_MAKE_OPAQUE(PyMeshContainer)
51 PYBIND11_MAKE_OPAQUE(PyPartContainer)
52 PYBIND11_MAKE_OPAQUE(PyPatchContainer)
53 PYBIND11_MAKE_OPAQUE(PyRecordContainer)
54 PYBIND11_MAKE_OPAQUE(PyPatchRecordContainer)
55 PYBIND11_MAKE_OPAQUE(PyRecordComponentContainer)
56 PYBIND11_MAKE_OPAQUE(PyMeshRecordComponentContainer)
57 PYBIND11_MAKE_OPAQUE(PyPatchRecordComponentContainer)
58 PYBIND11_MAKE_OPAQUE(PyBaseRecordRecordComponent)
59 PYBIND11_MAKE_OPAQUE(PyBaseRecordPatchRecordComponent)
internal::SeriesData::IterationsContainer_t IterationsContainer_t
Type for a container of Iterations indexed by IterationIndex_t.
Definition: Series.hpp:317
Public definitions of openPMD-api.
Definition: Date.cpp:29