23 #include "openPMD/auxiliary/Export.hpp" 24 #include "openPMD/auxiliary/Variant.hpp" 25 #include "openPMD/backend/Attribute.hpp" 26 #include "openPMD/Dataset.hpp" 41 getWritable(Attributable*);
80 virtual std::unique_ptr< AbstractParameter > clone()
const = 0;
105 std::unique_ptr< AbstractParameter >
106 clone()
const override 108 return std::unique_ptr< AbstractParameter >(
112 std::string name =
"";
121 std::unique_ptr< AbstractParameter >
122 clone()
const override 124 return std::unique_ptr< AbstractParameter >(
128 std::string name =
"";
137 std::unique_ptr< AbstractParameter >
138 clone()
const override 140 return std::unique_ptr< AbstractParameter >(
151 std::unique_ptr< AbstractParameter >
152 clone()
const override 154 return std::unique_ptr< AbstractParameter >(
158 std::string name =
"";
167 std::unique_ptr< AbstractParameter >
168 clone()
const override 170 return std::unique_ptr< AbstractParameter >(
174 std::string path =
"";
183 std::unique_ptr< AbstractParameter >
184 clone()
const override 186 return std::unique_ptr< AbstractParameter >(
190 std::string path =
"";
199 std::unique_ptr< AbstractParameter >
200 clone()
const override 202 return std::unique_ptr< AbstractParameter >(
206 std::string path =
"";
215 std::unique_ptr< AbstractParameter >
216 clone()
const override 218 return std::unique_ptr< AbstractParameter >(
222 std::shared_ptr< std::vector< std::string > > paths
223 = std::make_shared< std::vector< std::string > >();
231 name(p.name), extent(p.extent), dtype(p.dtype),
232 chunkSize(p.chunkSize), compression(p.compression),
233 transform(p.transform) {}
235 std::unique_ptr< AbstractParameter >
236 clone()
const override 238 return std::unique_ptr< AbstractParameter >(
242 std::string name =
"";
244 Datatype dtype = Datatype::UNDEFINED;
245 Extent chunkSize = {};
246 std::string compression =
"";
247 std::string transform =
"";
255 name(p.name), extent(p.extent) {}
257 std::unique_ptr< AbstractParameter >
258 clone()
const override 260 return std::unique_ptr< AbstractParameter >(
264 std::string name =
"";
273 name(p.name), dtype(p.dtype), extent(p.extent) {}
275 std::unique_ptr< AbstractParameter >
276 clone()
const override 278 return std::unique_ptr< AbstractParameter >(
282 std::string name =
"";
283 std::shared_ptr< Datatype > dtype
284 = std::make_shared< Datatype >();
285 std::shared_ptr< Extent > extent
286 = std::make_shared< Extent >();
295 std::unique_ptr< AbstractParameter >
296 clone()
const override 298 return std::unique_ptr< AbstractParameter >(
302 std::string name =
"";
310 extent(p.extent), offset(p.offset), dtype(p.dtype),
314 this->extent = p.extent;
315 this->offset = p.offset;
316 this->dtype = p.dtype;
321 std::unique_ptr< AbstractParameter >
322 clone()
const override 324 return std::unique_ptr< AbstractParameter >(
330 Datatype dtype = Datatype::UNDEFINED;
331 std::shared_ptr< void const > data =
nullptr;
339 extent(p.extent), offset(p.offset), dtype(p.dtype),
343 this->extent = p.extent;
344 this->offset = p.offset;
345 this->dtype = p.dtype;
350 std::unique_ptr< AbstractParameter >
351 clone()
const override 353 return std::unique_ptr< AbstractParameter >(
359 Datatype dtype = Datatype::UNDEFINED;
360 std::shared_ptr< void > data =
nullptr;
368 datasets(p.datasets) {}
370 std::unique_ptr< AbstractParameter >
371 clone()
const override 373 return std::unique_ptr< AbstractParameter >(
377 std::shared_ptr< std::vector< std::string > > datasets
378 = std::make_shared< std::vector< std::string > >();
387 std::unique_ptr< AbstractParameter >
388 clone()
const override 390 return std::unique_ptr< AbstractParameter >(
394 std::string name =
"";
402 name(p.name), dtype(p.dtype), resource(p.resource) {}
404 std::unique_ptr< AbstractParameter >
405 clone()
const override 407 return std::unique_ptr< AbstractParameter >(
411 std::string name =
"";
412 Datatype dtype = Datatype::UNDEFINED;
413 Attribute::resource resource;
421 name(p.name), dtype(p.dtype), resource(p.resource) {}
425 this->dtype = p.dtype;
426 this->resource = p.resource;
430 std::unique_ptr< AbstractParameter >
431 clone()
const override 433 return std::unique_ptr< AbstractParameter >(
437 std::string name =
"";
438 std::shared_ptr< Datatype > dtype
439 = std::make_shared< Datatype >();
440 std::shared_ptr< Attribute::resource > resource
441 = std::make_shared< Attribute::resource >();
449 attributes(p.attributes) {}
451 std::unique_ptr< AbstractParameter >
452 clone()
const override 454 return std::unique_ptr< AbstractParameter >(
458 std::shared_ptr< std::vector< std::string > > attributes
459 = std::make_shared< std::vector< std::string > >();
480 template< Operation op >
488 template< Operation op >
491 : writable{getWritable(a)},
497 writable{other.writable},
498 operation{other.operation},
499 parameter{other.parameter}
504 writable = other.writable;
505 operation = other.operation;
506 parameter = other.parameter;
512 std::shared_ptr< AbstractParameter > parameter;
Self-contained description of a single IO operation.
Definition: IOTask.hpp:471
Definition: IOTask.hpp:132
Definition: IOTask.hpp:194
Definition: IOTask.hpp:290
Datatype
Concrete datatype of an object available at runtime.
Definition: Datatype.hpp:42
Definition: IOTask.hpp:116
Definition: IOTask.hpp:146
Definition: IOTask.hpp:382
Public definitions of openPMD-api.
Definition: Date.cpp:28
Layer to mirror structure of logical data and persistent data in file.
Definition: Writable.hpp:55
Definition: IOTask.hpp:335
Typesafe description of all required arguments for a specified Operation.
Definition: IOTask.hpp:92
OPENPMDAPI_EXPORT_ENUM_CLASS(Operation)
Type of IO operation between logical and persistent data.
Definition: IOTask.hpp:45
Definition: IOTask.hpp:445
Definition: IOTask.hpp:71
Definition: IOTask.hpp:100
Definition: IOTask.hpp:364
Definition: IOTask.hpp:269
Definition: IOTask.hpp:162
Definition: IOTask.hpp:398
Definition: IOTask.hpp:227
IOTask(Writable *w, Parameter< op > const &p)
Constructor for self-contained description of single IO operation.
Definition: IOTask.hpp:481
Definition: IOTask.hpp:417
Definition: IOTask.hpp:251
Definition: IOTask.hpp:178
Definition: IOTask.hpp:306
Definition: IOTask.hpp:210
Layer to manage storage of attributes associated with file objects.
Definition: Attributable.hpp:65