23 #include "openPMD/IO/Access.hpp" 24 #include "openPMD/IO/Format.hpp" 25 #include "openPMD/IO/IOTask.hpp" 26 #include "openPMD/config.hpp" 37 #include <type_traits> 87 std::string backendConfig =
"{}";
94 : flushLevel(flushLevel_in)
95 , backendConfig{std::move(backendConfig_in)}
129 template <
typename Functor,
typename... Args>
130 auto withRWAccess(
SeriesStatus &status, Functor &&functor, Args &&...args)
131 -> decltype(std::forward<Functor>(functor)(std::forward<Args>(args)...))
133 using Res = decltype(std::forward<Functor>(functor)(
134 std::forward<Args>(args)...));
135 if constexpr (std::is_void_v<Res>)
137 auto oldStatus = status;
141 std::forward<decltype(functor)>(functor)();
153 auto oldStatus = status;
158 res = std::forward<decltype(functor)>(functor)();
190 if (encoding == IterationEncoding::fileBased &&
201 : directory{std::move(path)}, m_backendAccess{at}, m_frontendAccess{at}
205 : directory{std::move(path)}, m_backendAccess{at}, m_frontendAccess{at}
234 virtual std::string backendName()
const = 0;
236 std::string
const directory;
252 Access const m_backendAccess;
253 Access const m_frontendAccess;
255 std::queue<IOTask> m_work;
FlushLevel
Determine what items should be flushed upon Series::flush()
Definition: AbstractIOHandler.hpp:47
Self-contained description of a single IO operation.
Definition: IOTask.hpp:695
Access
File access mode to use during IO.
Definition: Access.hpp:29
Only creates/opens files, nothing more.
virtual void enqueue(IOTask const &iotask)
Add provided task to queue according to FIFO.
Definition: AbstractIOHandler.hpp:214
create new series and truncate existing (files)
SeriesStatus
Some parts of the openPMD object model are read-only when accessing a Series in Access::READ_ONLY mod...
Definition: AbstractIOHandler.hpp:117
Restricted mode, ensures to set up the openPMD hierarchy (as far as defined so far) in the backend...
Implementation for the root level of the openPMD hierarchy.
Definition: Series.hpp:186
Interface for communicating between logical and physically persistent data.
Definition: AbstractIOHandler.hpp:179
Public definitions of openPMD-api.
write new iterations to an existing series without reading
Mutability of objects in the openPMD object model is determined by the open mode (Access enum)...
All objects in the openPMD object model are temporarily mutable to allow inserting newly-parsed data...
Parameters recursively passed through the openPMD hierarchy when flushing.
Definition: AbstractIOHandler.hpp:84
IterationEncoding
Encoding scheme of an Iterations Series'.
Definition: IterationEncoding.hpp:32
Default mode, used when flushes are triggered internally, e.g.
Flush operation that was triggered by user code.
Definition: FlushParametersInternal.hpp:31