23 #include "openPMD/auxiliary/Export.hpp" 24 #include "openPMD/auxiliary/Variant.hpp" 25 #include "openPMD/backend/Attribute.hpp" 26 #include "openPMD/ChunkInfo.hpp" 27 #include "openPMD/Dataset.hpp" 28 #include "openPMD/IterationEncoding.hpp" 29 #include "openPMD/Streaming.hpp" 40 class AttributableInterface;
44 getWritable(AttributableInterface*);
85 std::string operationAsString( Operation );
97 virtual std::unique_ptr< AbstractParameter > clone()
const = 0;
108 template< Operation >
123 std::unique_ptr< AbstractParameter >
124 clone()
const override 126 return std::unique_ptr< AbstractParameter >(
130 std::string name =
"";
141 std::unique_ptr< AbstractParameter >
142 clone()
const override 144 return std::unique_ptr< AbstractParameter >(
148 std::string name =
"";
163 std::unique_ptr< AbstractParameter >
164 clone()
const override 166 return std::unique_ptr< AbstractParameter >(
177 std::unique_ptr< AbstractParameter >
178 clone()
const override 180 return std::unique_ptr< AbstractParameter >(
184 std::string name =
"";
193 std::unique_ptr< AbstractParameter >
194 clone()
const override 196 return std::unique_ptr< AbstractParameter >(
200 std::string path =
"";
217 std::unique_ptr< AbstractParameter >
218 clone()
const override 220 return std::unique_ptr< AbstractParameter >(
231 std::unique_ptr< AbstractParameter >
232 clone()
const override 234 return std::unique_ptr< AbstractParameter >(
238 std::string path =
"";
247 std::unique_ptr< AbstractParameter >
248 clone()
const override 250 return std::unique_ptr< AbstractParameter >(
254 std::string path =
"";
263 std::unique_ptr< AbstractParameter >
264 clone()
const override 266 return std::unique_ptr< AbstractParameter >(
270 std::shared_ptr< std::vector< std::string > > paths
271 = std::make_shared< std::vector< std::string > >();
279 name(p.name), extent(p.extent), dtype(p.dtype),
280 chunkSize(p.chunkSize), compression(p.compression),
281 transform(p.transform), options(p.options) {}
283 std::unique_ptr< AbstractParameter >
284 clone()
const override 286 return std::unique_ptr< AbstractParameter >(
290 std::string name =
"";
292 Datatype dtype = Datatype::UNDEFINED;
293 Extent chunkSize = {};
294 std::string compression =
"";
295 std::string transform =
"";
296 std::string options =
"{}";
305 std::unique_ptr< AbstractParameter >
306 clone()
const override 308 return std::unique_ptr< AbstractParameter >(
320 name(p.name), dtype(p.dtype), extent(p.extent) {}
322 std::unique_ptr< AbstractParameter >
323 clone()
const override 325 return std::unique_ptr< AbstractParameter >(
329 std::string name =
"";
330 std::shared_ptr< Datatype > dtype
331 = std::make_shared< Datatype >();
332 std::shared_ptr< Extent > extent
333 = std::make_shared< Extent >();
342 std::unique_ptr< AbstractParameter >
343 clone()
const override 345 return std::unique_ptr< AbstractParameter >(
349 std::string name =
"";
357 extent(p.extent), offset(p.offset), dtype(p.dtype),
361 this->extent = p.extent;
362 this->offset = p.offset;
363 this->dtype = p.dtype;
368 std::unique_ptr< AbstractParameter >
369 clone()
const override 371 return std::unique_ptr< AbstractParameter >(
377 Datatype dtype = Datatype::UNDEFINED;
378 std::shared_ptr< void const > data =
nullptr;
386 extent(p.extent), offset(p.offset), dtype(p.dtype),
390 this->extent = p.extent;
391 this->offset = p.offset;
392 this->dtype = p.dtype;
397 std::unique_ptr< AbstractParameter >
398 clone()
const override 400 return std::unique_ptr< AbstractParameter >(
406 Datatype dtype = Datatype::UNDEFINED;
407 std::shared_ptr< void > data =
nullptr;
415 datasets(p.datasets) {}
417 std::unique_ptr< AbstractParameter >
418 clone()
const override 420 return std::unique_ptr< AbstractParameter >(
424 std::shared_ptr< std::vector< std::string > > datasets
425 = std::make_shared< std::vector< std::string > >();
433 offset(p.offset), extent(p.extent), dtype(p.dtype), update(p.update),
437 std::unique_ptr< AbstractParameter >
438 clone()
const override 440 return std::unique_ptr< AbstractParameter >(
447 Datatype dtype = Datatype::UNDEFINED;
452 bool backendManagedBuffer =
false;
453 unsigned viewIndex = 0;
456 std::shared_ptr< OutParameters > out = std::make_shared< OutParameters >();
465 std::unique_ptr< AbstractParameter >
466 clone()
const override 468 return std::unique_ptr< AbstractParameter >(
472 std::string name =
"";
480 name(p.name), dtype(p.dtype), resource(p.resource) {}
482 std::unique_ptr< AbstractParameter >
483 clone()
const override 485 return std::unique_ptr< AbstractParameter >(
489 std::string name =
"";
490 Datatype dtype = Datatype::UNDEFINED;
491 Attribute::resource resource;
499 name(p.name), dtype(p.dtype), resource(p.resource) {}
503 this->dtype = p.dtype;
504 this->resource = p.resource;
508 std::unique_ptr< AbstractParameter >
509 clone()
const override 511 return std::unique_ptr< AbstractParameter >(
515 std::string name =
"";
516 std::shared_ptr< Datatype > dtype
517 = std::make_shared< Datatype >();
518 std::shared_ptr< Attribute::resource > resource
519 = std::make_shared< Attribute::resource >();
527 attributes(p.attributes) {}
529 std::unique_ptr< AbstractParameter >
530 clone()
const override 532 return std::unique_ptr< AbstractParameter >(
536 std::shared_ptr< std::vector< std::string > > attributes
537 = std::make_shared< std::vector< std::string > >();
549 std::unique_ptr< AbstractParameter >
550 clone()
const override 552 return std::unique_ptr< AbstractParameter >(
559 std::shared_ptr< AdvanceStatus > status =
560 std::make_shared< AdvanceStatus >( AdvanceStatus::OK );
564 struct OPENPMDAPI_EXPORT
Parameter< Operation::AVAILABLE_CHUNKS >
579 std::unique_ptr< AbstractParameter >
580 clone()
const override 582 return std::unique_ptr< AbstractParameter >(
587 std::shared_ptr< ChunkTable > chunks = std::make_shared< ChunkTable >();
607 template< Operation op >
615 template< Operation op >
618 : writable{getWritable(a)},
624 writable{other.writable},
625 operation{other.operation},
626 parameter{other.parameter}
631 writable = other.writable;
632 operation = other.operation;
633 parameter = other.parameter;
639 std::shared_ptr< AbstractParameter > parameter;
Definition: IOTask.hpp:541
Self-contained description of a single IO operation.
Definition: IOTask.hpp:598
Definition: IOTask.hpp:158
Definition: IOTask.hpp:242
Definition: IOTask.hpp:337
AdvanceMode mode
input parameter
Definition: IOTask.hpp:557
AdvanceMode
In step-based mode (i.e.
Definition: Streaming.hpp:33
Datatype
Concrete datatype of an object available at runtime.
Definition: Datatype.hpp:45
Definition: IOTask.hpp:135
Definition: IOTask.hpp:172
Definition: IOTask.hpp:460
Public definitions of openPMD-api.
Definition: Date.cpp:29
Layer to mirror structure of logical data and persistent data in file.
Definition: Writable.hpp:64
Definition: IOTask.hpp:204
Definition: IOTask.hpp:382
Typesafe description of all required arguments for a specified Operation.
Definition: IOTask.hpp:109
OPENPMDAPI_EXPORT_ENUM_CLASS(Operation)
Type of IO operation between logical and persistent data.
Definition: IOTask.hpp:48
Layer to manage storage of attributes associated with file objects.
Definition: Attributable.hpp:115
Definition: IOTask.hpp:523
Definition: IOTask.hpp:88
IterationEncoding
Encoding scheme of an Iterations Series'.
Definition: IterationEncoding.hpp:32
Definition: IOTask.hpp:117
Definition: IOTask.hpp:564
Definition: IOTask.hpp:411
Definition: IOTask.hpp:316
Definition: IOTask.hpp:188
Definition: IOTask.hpp:476
Definition: IOTask.hpp:275
Definition: IOTask.hpp:429
IOTask(Writable *w, Parameter< op > const &p)
Constructor for self-contained description of single IO operation.
Definition: IOTask.hpp:608
Definition: IOTask.hpp:495
Definition: IOTask.hpp:300
Definition: IOTask.hpp:226
Definition: IOTask.hpp:353
Definition: IOTask.hpp:258