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" 35 #include "openPMD/Streaming.hpp" 44 getWritable(Attributable*);
87 virtual std::unique_ptr< AbstractParameter > clone()
const = 0;
112 std::unique_ptr< AbstractParameter >
113 clone()
const override 115 return std::unique_ptr< AbstractParameter >(
119 std::string name =
"";
128 std::unique_ptr< AbstractParameter >
129 clone()
const override 131 return std::unique_ptr< AbstractParameter >(
135 std::string name =
"";
144 std::unique_ptr< AbstractParameter >
145 clone()
const override 147 return std::unique_ptr< AbstractParameter >(
158 std::unique_ptr< AbstractParameter >
159 clone()
const override 161 return std::unique_ptr< AbstractParameter >(
165 std::string name =
"";
174 std::unique_ptr< AbstractParameter >
175 clone()
const override 177 return std::unique_ptr< AbstractParameter >(
181 std::string path =
"";
198 std::unique_ptr< AbstractParameter >
199 clone()
const override 201 return std::unique_ptr< AbstractParameter >(
212 std::unique_ptr< AbstractParameter >
213 clone()
const override 215 return std::unique_ptr< AbstractParameter >(
219 std::string path =
"";
228 std::unique_ptr< AbstractParameter >
229 clone()
const override 231 return std::unique_ptr< AbstractParameter >(
235 std::string path =
"";
244 std::unique_ptr< AbstractParameter >
245 clone()
const override 247 return std::unique_ptr< AbstractParameter >(
251 std::shared_ptr< std::vector< std::string > > paths
252 = std::make_shared< std::vector< std::string > >();
260 name(p.name), extent(p.extent), dtype(p.dtype),
261 chunkSize(p.chunkSize), compression(p.compression),
262 transform(p.transform), options(p.options) {}
264 std::unique_ptr< AbstractParameter >
265 clone()
const override 267 return std::unique_ptr< AbstractParameter >(
271 std::string name =
"";
273 Datatype dtype = Datatype::UNDEFINED;
274 Extent chunkSize = {};
275 std::string compression =
"";
276 std::string transform =
"";
277 std::string options =
"{}";
285 name(p.name), extent(p.extent) {}
287 std::unique_ptr< AbstractParameter >
288 clone()
const override 290 return std::unique_ptr< AbstractParameter >(
294 std::string name =
"";
303 name(p.name), dtype(p.dtype), extent(p.extent) {}
305 std::unique_ptr< AbstractParameter >
306 clone()
const override 308 return std::unique_ptr< AbstractParameter >(
312 std::string name =
"";
313 std::shared_ptr< Datatype > dtype
314 = std::make_shared< Datatype >();
315 std::shared_ptr< Extent > extent
316 = std::make_shared< Extent >();
325 std::unique_ptr< AbstractParameter >
326 clone()
const override 328 return std::unique_ptr< AbstractParameter >(
332 std::string name =
"";
340 extent(p.extent), offset(p.offset), dtype(p.dtype),
344 this->extent = p.extent;
345 this->offset = p.offset;
346 this->dtype = p.dtype;
351 std::unique_ptr< AbstractParameter >
352 clone()
const override 354 return std::unique_ptr< AbstractParameter >(
360 Datatype dtype = Datatype::UNDEFINED;
361 std::shared_ptr< void const > data =
nullptr;
369 extent(p.extent), offset(p.offset), dtype(p.dtype),
373 this->extent = p.extent;
374 this->offset = p.offset;
375 this->dtype = p.dtype;
380 std::unique_ptr< AbstractParameter >
381 clone()
const override 383 return std::unique_ptr< AbstractParameter >(
389 Datatype dtype = Datatype::UNDEFINED;
390 std::shared_ptr< void > data =
nullptr;
398 datasets(p.datasets) {}
400 std::unique_ptr< AbstractParameter >
401 clone()
const override 403 return std::unique_ptr< AbstractParameter >(
407 std::shared_ptr< std::vector< std::string > > datasets
408 = std::make_shared< std::vector< std::string > >();
417 std::unique_ptr< AbstractParameter >
418 clone()
const override 420 return std::unique_ptr< AbstractParameter >(
424 std::string name =
"";
432 name(p.name), dtype(p.dtype), resource(p.resource) {}
434 std::unique_ptr< AbstractParameter >
435 clone()
const override 437 return std::unique_ptr< AbstractParameter >(
441 std::string name =
"";
442 Datatype dtype = Datatype::UNDEFINED;
443 Attribute::resource resource;
451 name(p.name), dtype(p.dtype), resource(p.resource) {}
455 this->dtype = p.dtype;
456 this->resource = p.resource;
460 std::unique_ptr< AbstractParameter >
461 clone()
const override 463 return std::unique_ptr< AbstractParameter >(
467 std::string name =
"";
468 std::shared_ptr< Datatype > dtype
469 = std::make_shared< Datatype >();
470 std::shared_ptr< Attribute::resource > resource
471 = std::make_shared< Attribute::resource >();
479 attributes(p.attributes) {}
481 std::unique_ptr< AbstractParameter >
482 clone()
const override 484 return std::unique_ptr< AbstractParameter >(
488 std::shared_ptr< std::vector< std::string > > attributes
489 = std::make_shared< std::vector< std::string > >();
501 std::unique_ptr< AbstractParameter >
502 clone()
const override 504 return std::unique_ptr< AbstractParameter >(
511 std::shared_ptr< AdvanceStatus > status =
512 std::make_shared< AdvanceStatus >( AdvanceStatus::OK );
516 struct OPENPMDAPI_EXPORT
Parameter< Operation::AVAILABLE_CHUNKS >
531 std::unique_ptr< AbstractParameter >
532 clone()
const override 534 return std::unique_ptr< AbstractParameter >(
539 std::shared_ptr< ChunkTable > chunks = std::make_shared< ChunkTable >();
559 template< Operation op >
567 template< Operation op >
570 : writable{getWritable(a)},
576 writable{other.writable},
577 operation{other.operation},
578 parameter{other.parameter}
583 writable = other.writable;
584 operation = other.operation;
585 parameter = other.parameter;
591 std::shared_ptr< AbstractParameter > parameter;
Definition: IOTask.hpp:493
Self-contained description of a single IO operation.
Definition: IOTask.hpp:550
Definition: IOTask.hpp:139
Definition: IOTask.hpp:223
Definition: IOTask.hpp:320
AdvanceMode mode
input parameter
Definition: IOTask.hpp:509
AdvanceMode
In step-based mode (i.e.
Definition: Streaming.hpp:33
Datatype
Concrete datatype of an object available at runtime.
Definition: Datatype.hpp:42
Definition: IOTask.hpp:123
Definition: IOTask.hpp:153
Definition: IOTask.hpp:412
Public definitions of openPMD-api.
Definition: Date.cpp:29
Layer to mirror structure of logical data and persistent data in file.
Definition: Writable.hpp:55
Definition: IOTask.hpp:185
Definition: IOTask.hpp:365
Typesafe description of all required arguments for a specified Operation.
Definition: IOTask.hpp:99
OPENPMDAPI_EXPORT_ENUM_CLASS(Operation)
Type of IO operation between logical and persistent data.
Definition: IOTask.hpp:48
Definition: IOTask.hpp:475
Definition: IOTask.hpp:78
Definition: IOTask.hpp:107
Definition: IOTask.hpp:516
Definition: IOTask.hpp:394
Definition: IOTask.hpp:299
Definition: IOTask.hpp:169
Definition: IOTask.hpp:428
Definition: IOTask.hpp:256
IOTask(Writable *w, Parameter< op > const &p)
Constructor for self-contained description of single IO operation.
Definition: IOTask.hpp:560
Definition: IOTask.hpp:447
Definition: IOTask.hpp:281
Definition: IOTask.hpp:207
Definition: IOTask.hpp:336
Definition: IOTask.hpp:239
Layer to manage storage of attributes associated with file objects.
Definition: Attributable.hpp:65