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" 36 #include "openPMD/Streaming.hpp" 41 class AttributableInterface;
45 getWritable(AttributableInterface*);
89 virtual std::unique_ptr< AbstractParameter > clone()
const = 0;
100 template< Operation >
115 std::unique_ptr< AbstractParameter >
116 clone()
const override 118 return std::unique_ptr< AbstractParameter >(
122 std::string name =
"";
133 std::unique_ptr< AbstractParameter >
134 clone()
const override 136 return std::unique_ptr< AbstractParameter >(
140 std::string name =
"";
155 std::unique_ptr< AbstractParameter >
156 clone()
const override 158 return std::unique_ptr< AbstractParameter >(
169 std::unique_ptr< AbstractParameter >
170 clone()
const override 172 return std::unique_ptr< AbstractParameter >(
176 std::string name =
"";
185 std::unique_ptr< AbstractParameter >
186 clone()
const override 188 return std::unique_ptr< AbstractParameter >(
192 std::string path =
"";
209 std::unique_ptr< AbstractParameter >
210 clone()
const override 212 return std::unique_ptr< AbstractParameter >(
223 std::unique_ptr< AbstractParameter >
224 clone()
const override 226 return std::unique_ptr< AbstractParameter >(
230 std::string path =
"";
239 std::unique_ptr< AbstractParameter >
240 clone()
const override 242 return std::unique_ptr< AbstractParameter >(
246 std::string path =
"";
255 std::unique_ptr< AbstractParameter >
256 clone()
const override 258 return std::unique_ptr< AbstractParameter >(
262 std::shared_ptr< std::vector< std::string > > paths
263 = std::make_shared< std::vector< std::string > >();
271 name(p.name), extent(p.extent), dtype(p.dtype),
272 chunkSize(p.chunkSize), compression(p.compression),
273 transform(p.transform), options(p.options) {}
275 std::unique_ptr< AbstractParameter >
276 clone()
const override 278 return std::unique_ptr< AbstractParameter >(
282 std::string name =
"";
284 Datatype dtype = Datatype::UNDEFINED;
285 Extent chunkSize = {};
286 std::string compression =
"";
287 std::string transform =
"";
288 std::string options =
"{}";
297 std::unique_ptr< AbstractParameter >
298 clone()
const override 300 return std::unique_ptr< AbstractParameter >(
312 name(p.name), dtype(p.dtype), extent(p.extent) {}
314 std::unique_ptr< AbstractParameter >
315 clone()
const override 317 return std::unique_ptr< AbstractParameter >(
321 std::string name =
"";
322 std::shared_ptr< Datatype > dtype
323 = std::make_shared< Datatype >();
324 std::shared_ptr< Extent > extent
325 = std::make_shared< Extent >();
334 std::unique_ptr< AbstractParameter >
335 clone()
const override 337 return std::unique_ptr< AbstractParameter >(
341 std::string name =
"";
349 extent(p.extent), offset(p.offset), dtype(p.dtype),
353 this->extent = p.extent;
354 this->offset = p.offset;
355 this->dtype = p.dtype;
360 std::unique_ptr< AbstractParameter >
361 clone()
const override 363 return std::unique_ptr< AbstractParameter >(
369 Datatype dtype = Datatype::UNDEFINED;
370 std::shared_ptr< void const > data =
nullptr;
378 extent(p.extent), offset(p.offset), dtype(p.dtype),
382 this->extent = p.extent;
383 this->offset = p.offset;
384 this->dtype = p.dtype;
389 std::unique_ptr< AbstractParameter >
390 clone()
const override 392 return std::unique_ptr< AbstractParameter >(
398 Datatype dtype = Datatype::UNDEFINED;
399 std::shared_ptr< void > data =
nullptr;
407 datasets(p.datasets) {}
409 std::unique_ptr< AbstractParameter >
410 clone()
const override 412 return std::unique_ptr< AbstractParameter >(
416 std::shared_ptr< std::vector< std::string > > datasets
417 = std::make_shared< std::vector< std::string > >();
425 offset(p.offset), extent(p.extent), dtype(p.dtype), update(p.update),
429 std::unique_ptr< AbstractParameter >
430 clone()
const override 432 return std::unique_ptr< AbstractParameter >(
439 Datatype dtype = Datatype::UNDEFINED;
444 bool backendManagedBuffer =
false;
445 unsigned viewIndex = 0;
448 std::shared_ptr< OutParameters > out = std::make_shared< OutParameters >();
457 std::unique_ptr< AbstractParameter >
458 clone()
const override 460 return std::unique_ptr< AbstractParameter >(
464 std::string name =
"";
472 name(p.name), dtype(p.dtype), resource(p.resource) {}
474 std::unique_ptr< AbstractParameter >
475 clone()
const override 477 return std::unique_ptr< AbstractParameter >(
481 std::string name =
"";
482 Datatype dtype = Datatype::UNDEFINED;
483 Attribute::resource resource;
491 name(p.name), dtype(p.dtype), resource(p.resource) {}
495 this->dtype = p.dtype;
496 this->resource = p.resource;
500 std::unique_ptr< AbstractParameter >
501 clone()
const override 503 return std::unique_ptr< AbstractParameter >(
507 std::string name =
"";
508 std::shared_ptr< Datatype > dtype
509 = std::make_shared< Datatype >();
510 std::shared_ptr< Attribute::resource > resource
511 = std::make_shared< Attribute::resource >();
519 attributes(p.attributes) {}
521 std::unique_ptr< AbstractParameter >
522 clone()
const override 524 return std::unique_ptr< AbstractParameter >(
528 std::shared_ptr< std::vector< std::string > > attributes
529 = std::make_shared< std::vector< std::string > >();
541 std::unique_ptr< AbstractParameter >
542 clone()
const override 544 return std::unique_ptr< AbstractParameter >(
551 std::shared_ptr< AdvanceStatus > status =
552 std::make_shared< AdvanceStatus >( AdvanceStatus::OK );
556 struct OPENPMDAPI_EXPORT
Parameter< Operation::AVAILABLE_CHUNKS >
571 std::unique_ptr< AbstractParameter >
572 clone()
const override 574 return std::unique_ptr< AbstractParameter >(
579 std::shared_ptr< ChunkTable > chunks = std::make_shared< ChunkTable >();
599 template< Operation op >
607 template< Operation op >
610 : writable{getWritable(a)},
616 writable{other.writable},
617 operation{other.operation},
618 parameter{other.parameter}
623 writable = other.writable;
624 operation = other.operation;
625 parameter = other.parameter;
631 std::shared_ptr< AbstractParameter > parameter;
Definition: IOTask.hpp:533
Self-contained description of a single IO operation.
Definition: IOTask.hpp:590
Definition: IOTask.hpp:150
Definition: IOTask.hpp:234
Definition: IOTask.hpp:329
AdvanceMode mode
input parameter
Definition: IOTask.hpp:549
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:127
Definition: IOTask.hpp:164
Definition: IOTask.hpp:452
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:196
Definition: IOTask.hpp:374
Typesafe description of all required arguments for a specified Operation.
Definition: IOTask.hpp:101
OPENPMDAPI_EXPORT_ENUM_CLASS(Operation)
Type of IO operation between logical and persistent data.
Definition: IOTask.hpp:49
Layer to manage storage of attributes associated with file objects.
Definition: Attributable.hpp:93
Definition: IOTask.hpp:515
Definition: IOTask.hpp:80
IterationEncoding
Encoding scheme of an Iterations Series'.
Definition: IterationEncoding.hpp:32
Definition: IOTask.hpp:109
Definition: IOTask.hpp:556
Definition: IOTask.hpp:403
Definition: IOTask.hpp:308
Definition: IOTask.hpp:180
Definition: IOTask.hpp:468
Definition: IOTask.hpp:267
Definition: IOTask.hpp:421
IOTask(Writable *w, Parameter< op > const &p)
Constructor for self-contained description of single IO operation.
Definition: IOTask.hpp:600
Definition: IOTask.hpp:487
Definition: IOTask.hpp:292
Definition: IOTask.hpp:218
Definition: IOTask.hpp:345
Definition: IOTask.hpp:250