20
20
*/
21
21
#pragma once
22
22
23
+ #include " openPMD/IO/AbstractIOHandler.hpp"
23
24
#include " openPMD/Mesh.hpp"
24
25
#include " openPMD/ParticleSpecies.hpp"
25
26
#include " openPMD/backend/Container.hpp"
26
27
27
28
#include < memory>
29
+ #include < regex>
30
+ #include < set>
31
+ #include < string>
28
32
#include < type_traits>
29
33
#include < utility>
34
+ #include < vector>
30
35
31
36
namespace openPMD
32
37
{
@@ -41,24 +46,24 @@ namespace internal
41
46
};
42
47
struct MeshesParticlesPath
43
48
{
44
- std::optional<std::string> meshesPath;
45
- std::optional<std::string> particlesPath;
46
-
47
- inline std::string requestMeshesPath ()
48
- {
49
- meshesPath = meshesPath.value_or (" meshes" );
50
- return *meshesPath;
51
- }
52
- inline std::string requestParticlesPath ()
53
- {
54
- particlesPath = particlesPath.value_or (" particles" );
55
- return *particlesPath;
56
- }
49
+ std::regex meshRegex;
50
+ std::set<std::string> collectNewMeshesPaths;
51
+ std::regex particleRegex;
52
+ std::set<std::string> collectNewParticlesPaths;
53
+
54
+ /*
55
+ * These values decide which path will be returned upon use of the
56
+ * shorthand notation s.iterations[0].meshes or .particles.
57
+ *
58
+ */
59
+ std::string m_defaultMeshesPath = " meshes" ;
60
+ std::string m_defaultParticlesPath = " particles" ;
57
61
58
62
explicit MeshesParticlesPath () = default;
59
63
MeshesParticlesPath (
60
- std::optional<std::string> meshesPath,
61
- std::optional<std::string> particlesPath);
64
+ std::vector<std::string> const &meshes,
65
+ std::vector<std::string> const &particles);
66
+ MeshesParticlesPath (Series const &);
62
67
63
68
[[nodiscard]] ContainedType determineType (
64
69
std::vector<std::string> const &path,
0 commit comments