23 #include "openPMD/ChunkInfo.hpp" 24 #include "openPMD/Dataset.hpp" 25 #include "openPMD/IterationEncoding.hpp" 26 #include "openPMD/Streaming.hpp" 27 #include "openPMD/auxiliary/Export.hpp" 28 #include "openPMD/auxiliary/Memory.hpp" 29 #include "openPMD/auxiliary/Variant.hpp" 30 #include "openPMD/backend/Attribute.hpp" 31 #include "openPMD/backend/ParsePreference.hpp" 45 Writable *getWritable(Attributable *);
90 OPENPMDAPI_EXPORT std::string operationAsString(Operation);
98 virtual std::unique_ptr<AbstractParameter> to_heap() && = 0;
128 struct OPENPMDAPI_EXPORT
Parameter<Operation::CREATE_FILE>
137 std::unique_ptr<AbstractParameter> to_heap() &&
override 139 return std::unique_ptr<AbstractParameter>(
143 std::string name =
"";
148 struct OPENPMDAPI_EXPORT
Parameter<Operation::CHECK_FILE>
157 std::unique_ptr<AbstractParameter> to_heap() &&
override 159 return std::unique_ptr<AbstractParameter>(
163 std::string name =
"";
164 enum class FileExists
170 std::shared_ptr<FileExists> fileExists =
171 std::make_shared<FileExists>(FileExists::DontKnow);
175 struct OPENPMDAPI_EXPORT
Parameter<Operation::OPEN_FILE>
184 std::unique_ptr<AbstractParameter> to_heap() &&
override 186 return std::unique_ptr<AbstractParameter>(
190 std::string name =
"";
197 using ParsePreference = internal::ParsePreference;
198 std::shared_ptr<ParsePreference> out_parsePreference =
199 std::make_shared<ParsePreference>(ParsePreference::UpFront);
203 struct OPENPMDAPI_EXPORT
Parameter<Operation::CLOSE_FILE>
212 std::unique_ptr<AbstractParameter> to_heap() &&
override 214 return std::unique_ptr<AbstractParameter>(
220 struct OPENPMDAPI_EXPORT
Parameter<Operation::DELETE_FILE>
229 std::unique_ptr<AbstractParameter> to_heap() &&
override 231 return std::unique_ptr<AbstractParameter>(
235 std::string name =
"";
239 struct OPENPMDAPI_EXPORT
Parameter<Operation::CREATE_PATH>
248 std::unique_ptr<AbstractParameter> to_heap() &&
override 250 return std::unique_ptr<AbstractParameter>(
254 std::string path =
"";
258 struct OPENPMDAPI_EXPORT
Parameter<Operation::CLOSE_PATH>
267 std::unique_ptr<AbstractParameter> to_heap() &&
override 269 return std::unique_ptr<AbstractParameter>(
275 struct OPENPMDAPI_EXPORT
Parameter<Operation::OPEN_PATH>
284 std::unique_ptr<AbstractParameter> to_heap() &&
override 286 return std::unique_ptr<AbstractParameter>(
290 std::string path =
"";
294 struct OPENPMDAPI_EXPORT
Parameter<Operation::DELETE_PATH>
303 std::unique_ptr<AbstractParameter> to_heap() &&
override 305 return std::unique_ptr<AbstractParameter>(
309 std::string path =
"";
313 struct OPENPMDAPI_EXPORT
Parameter<Operation::LIST_PATHS>
322 std::unique_ptr<AbstractParameter> to_heap() &&
override 324 return std::unique_ptr<AbstractParameter>(
328 std::shared_ptr<std::vector<std::string>> paths =
329 std::make_shared<std::vector<std::string>>();
333 struct OPENPMDAPI_EXPORT
Parameter<Operation::CREATE_DATASET>
342 std::unique_ptr<AbstractParameter> to_heap() &&
override 344 return std::unique_ptr<AbstractParameter>(
348 std::string name =
"";
350 Datatype dtype = Datatype::UNDEFINED;
351 std::string options =
"{}";
359 template <
typename TracingJSON>
360 static void warnUnusedParameters(
362 std::string
const ¤tBackendName,
363 std::string
const &warningMessage);
367 struct OPENPMDAPI_EXPORT
Parameter<Operation::EXTEND_DATASET>
376 std::unique_ptr<AbstractParameter> to_heap() &&
override 378 return std::unique_ptr<AbstractParameter>(
386 struct OPENPMDAPI_EXPORT
Parameter<Operation::OPEN_DATASET>
395 std::unique_ptr<AbstractParameter> to_heap() &&
override 397 return std::unique_ptr<AbstractParameter>(
401 std::string name =
"";
402 std::shared_ptr<Datatype> dtype = std::make_shared<Datatype>();
403 std::shared_ptr<Extent> extent = std::make_shared<Extent>();
407 struct OPENPMDAPI_EXPORT
Parameter<Operation::DELETE_DATASET>
416 std::unique_ptr<AbstractParameter> to_heap() &&
override 418 return std::unique_ptr<AbstractParameter>(
422 std::string name =
"";
426 struct OPENPMDAPI_EXPORT
Parameter<Operation::WRITE_DATASET>
436 std::unique_ptr<AbstractParameter> to_heap() &&
override 438 return std::unique_ptr<AbstractParameter>(
444 Datatype dtype = Datatype::UNDEFINED;
449 struct OPENPMDAPI_EXPORT
Parameter<Operation::READ_DATASET>
458 std::unique_ptr<AbstractParameter> to_heap() &&
override 460 return std::unique_ptr<AbstractParameter>(
466 Datatype dtype = Datatype::UNDEFINED;
467 std::shared_ptr<void> data =
nullptr;
471 struct OPENPMDAPI_EXPORT
Parameter<Operation::LIST_DATASETS>
480 std::unique_ptr<AbstractParameter> to_heap() &&
override 482 return std::unique_ptr<AbstractParameter>(
486 std::shared_ptr<std::vector<std::string>> datasets =
487 std::make_shared<std::vector<std::string>>();
491 struct OPENPMDAPI_EXPORT
Parameter<Operation::GET_BUFFER_VIEW>
500 std::unique_ptr<AbstractParameter> to_heap() &&
override 502 return std::unique_ptr<AbstractParameter>(
509 Datatype dtype = Datatype::UNDEFINED;
514 bool backendManagedBuffer =
false;
515 unsigned viewIndex = 0;
518 std::shared_ptr<OutParameters> out = std::make_shared<OutParameters>();
522 struct OPENPMDAPI_EXPORT
Parameter<Operation::DELETE_ATT>
531 std::unique_ptr<AbstractParameter> to_heap() &&
override 533 return std::unique_ptr<AbstractParameter>(
537 std::string name =
"";
541 struct OPENPMDAPI_EXPORT
Parameter<Operation::WRITE_ATT>
550 std::unique_ptr<AbstractParameter> to_heap() &&
override 552 return std::unique_ptr<AbstractParameter>(
556 std::string name =
"";
557 Datatype dtype = Datatype::UNDEFINED;
564 bool changesOverSteps =
false;
565 Attribute::resource resource;
578 std::unique_ptr<AbstractParameter> to_heap() &&
override 580 return std::unique_ptr<AbstractParameter>(
584 std::string name =
"";
585 std::shared_ptr<Datatype> dtype = std::make_shared<Datatype>();
586 std::shared_ptr<Attribute::resource> resource =
587 std::make_shared<Attribute::resource>();
591 struct OPENPMDAPI_EXPORT
Parameter<Operation::LIST_ATTS>
600 std::unique_ptr<AbstractParameter> to_heap() &&
override 602 return std::unique_ptr<AbstractParameter>(
606 std::shared_ptr<std::vector<std::string>> attributes =
607 std::make_shared<std::vector<std::string>>();
620 std::unique_ptr<AbstractParameter> to_heap() &&
override 622 return std::unique_ptr<AbstractParameter>(
629 std::shared_ptr<AdvanceStatus> status =
634 struct OPENPMDAPI_EXPORT
Parameter<Operation::AVAILABLE_CHUNKS>
643 std::unique_ptr<AbstractParameter> to_heap() &&
override 645 return std::unique_ptr<AbstractParameter>(
650 std::shared_ptr<ChunkTable> chunks = std::make_shared<ChunkTable>();
654 struct OPENPMDAPI_EXPORT
Parameter<Operation::KEEP_SYNCHRONOUS>
663 std::unique_ptr<AbstractParameter> to_heap() &&
override 665 return std::make_unique<Parameter<Operation::KEEP_SYNCHRONOUS>>(
673 struct OPENPMDAPI_EXPORT
Parameter<Operation::DEREGISTER>
680 std::unique_ptr<AbstractParameter> to_heap() &&
override 682 return std::make_unique<Parameter<Operation::DEREGISTER>>(
706 template <Operation op>
708 : writable{w}, operation{op}, parameter{std::move(p).to_heap()}
711 template <Operation op>
713 : writable{getWritable(a)}
715 , parameter{std::move(p).to_heap()}
719 : writable{other.writable}
720 , operation{other.operation}
721 , parameter{other.parameter}
726 writable = other.writable;
727 operation = other.operation;
728 parameter = other.parameter;
734 std::shared_ptr<AbstractParameter> parameter;
Definition: IOTask.hpp:611
Self-contained description of a single IO operation.
Definition: IOTask.hpp:695
Definition: IOTask.hpp:203
Definition: IOTask.hpp:294
Definition: IOTask.hpp:407
Definition: IOTask.hpp:148
AdvanceMode mode
input parameter
Definition: IOTask.hpp:627
Definition: Memory.hpp:174
AdvanceMode
In step-based mode (i.e.
Definition: Streaming.hpp:34
IOTask(Writable *w, Parameter< op > p)
Constructor for self-contained description of single IO operation.
Definition: IOTask.hpp:707
Datatype
Concrete datatype of an object available at runtime.
Definition: Datatype.hpp:45
Definition: IOTask.hpp:175
Definition: IOTask.hpp:220
Definition: IOTask.hpp:522
Public definitions of openPMD-api.
Layer to mirror structure of logical data and persistent data in file.
Definition: Writable.hpp:64
Definition: IOTask.hpp:258
Definition: IOTask.hpp:449
Typesafe description of all required arguments for a specified Operation.
Definition: IOTask.hpp:120
OPENPMDAPI_EXPORT_ENUM_CLASS(Operation)
Type of IO operation between logical and persistent data.
Definition: IOTask.hpp:49
Definition: IOTask.hpp:591
Definition: IOTask.hpp:93
IterationEncoding
Encoding scheme of an Iterations Series'.
Definition: IterationEncoding.hpp:32
Definition: IOTask.hpp:128
Definition: IOTask.hpp:634
Definition: IOTask.hpp:471
Definition: IOTask.hpp:386
Definition: IOTask.hpp:239
Definition: IOTask.hpp:541
Definition: IOTask.hpp:333
Definition: IOTask.hpp:491
Definition: IOTask.hpp:569
Definition: IOTask.hpp:367
Definition: IOTask.hpp:275
Definition: IOTask.hpp:426
Definition: IOTask.hpp:313
Layer to manage storage of attributes associated with file objects.
Definition: Attributable.hpp:93