Layer to manage storage of attributes associated with file objects. More...
#include <Attributable.hpp>
Classes | |
| struct | MyPath |
| String serialization to describe an Attributable. More... | |
| struct | NoInit |
Public Member Functions | |
| Attributable (NoInit) noexcept | |
| Attribute | getAttribute (std::string const &key) const |
| Retrieve value of Attribute stored with provided key. | |
| bool | deleteAttribute (std::string const &key) |
| Remove Attribute of provided value both logically and physically. | |
| std::vector< std::string > | attributes () const |
| List all currently stored Attributes' keys. | |
| size_t | numAttributes () const |
| Count all currently stored Attributes. | |
| bool | containsAttribute (std::string const &key) const |
| Check whether am Attribute with a given key exists. | |
| std::string | comment () const |
| Retrieve a user-supplied comment associated with the object. | |
| Attributable & | setComment (std::string const &comment) |
| Populate Attribute corresponding to a comment with the user-supplied comment. | |
| void | seriesFlush (std::string backendConfig="{}") |
| Flush the corresponding Series object. | |
| void | iterationFlush (std::string backendConfig="{}") |
| Flush the containing Iteration. | |
| MyPath | myPath () const |
| The path to this object within its containing Series. | |
| void | touch () |
| Sets the object dirty to make internal procedures think it has been modified. | |
| OpenpmdStandard | openPMDStandard () const |
| template<typename T> | |
| bool | setAttribute (std::string const &key, T value) |
| Populate Attribute of provided name with provided value. | |
| bool | setAttribute (std::string const &key, char const value[]) |
Protected Types | |
| enum | ReadMode { IgnoreExisting , OverrideExisting , FullyReread } |
| enum class | EnqueueAsynchronously : bool { Yes , No } |
| using | Data_t = internal::AttributableData |
Protected Member Functions | |
| Series | retrieveSeries () const |
| template<bool flush_entire_series> | |
| void | seriesFlush_impl (internal::FlushParams const &) |
| void | flushAttributes (internal::FlushParams const &) |
| void | readAttributes (ReadMode) |
| template<typename T> | |
| T | readFloatingpoint (std::string const &key) const |
| Retrieve the value of a floating point Attribute of user-defined precision with ensured type-safety. | |
| template<typename T> | |
| std::vector< T > | readVectorFloatingpoint (std::string const &key) const |
| Retrieve a vector of values of a floating point Attributes of user-defined precision with ensured type-safety. | |
| AbstractIOHandler * | IOHandler () |
| AbstractIOHandler const * | IOHandler () const |
| Writable *& | parent () |
| Writable const * | parent () const |
| Writable & | writable () |
| Writable const & | writable () const |
| void | setData (std::shared_ptr< internal::AttributableData > attri) |
| internal::SharedAttributableData & | get () |
| internal::SharedAttributableData const & | get () const |
| bool | dirty () const |
| bool | dirtyRecursive () const |
| O(1). | |
| void | setDirty (bool dirty_in) |
| void | setDirtyRecursive (bool dirty_in) |
| bool | written () const |
| void | setWritten (bool val, EnqueueAsynchronously) |
| auto | containingIteration () const -> std::pair< std::optional< internal::IterationData const * >, internal::SeriesData const * > |
| Returns the corresponding Iteration. | |
| auto | containingIteration () -> std::pair< std::optional< internal::IterationData * >, internal::SeriesData * > |
Protected Attributes | |
| std::shared_ptr< Data_t > | m_attri |
Friends | |
| template<typename T_elem> | |
| class | BaseRecord |
| template<typename T_elem> | |
| class | BaseRecordInterface |
| template<typename, typename> | |
| class | internal::BaseRecordData |
| template<typename T, typename T_key, typename T_container> | |
| class | Container |
| template<typename T> | |
| struct | traits::GenerationPolicy |
| class | Iteration |
| class | Series |
| class | Writable |
| class | internal::RecordComponentData |
| class | StatefulSnapshotsContainer |
| class | internal::AttributableData |
| class | Snapshots |
| struct | internal::HomogenizeExtents |
| Writable * | getWritable (Attributable *a) |
| void | debug::printDirty (Series const &) |
| template<typename T> | |
| T & | internal::makeOwning (T &self, Series) |
Layer to manage storage of attributes associated with file objects.
Mandatory and user-defined Attributes and their data for every object in the openPMD hierarchy are stored and managed through this class.
|
protected |
| std::vector< std::string > openPMD::Attributable::attributes | ( | ) | const |
List all currently stored Attributes' keys.
| std::string openPMD::Attributable::comment | ( | ) | const |
Retrieve a user-supplied comment associated with the object.
| no_such_attribute_error | If no comment is currently stored. |
|
nodiscardprotected |
Returns the corresponding Iteration.
Return the openPMD::iteration that this Attributable is contained in. This walks up the linked parents until it finds the Iteration object. Throws an error otherwise, e.g., for Series objects.
| bool openPMD::Attributable::containsAttribute | ( | std::string const & | key | ) | const |
| bool openPMD::Attributable::deleteAttribute | ( | std::string const & | key | ) |
| Attribute openPMD::Attributable::getAttribute | ( | std::string const & | key | ) | const |
Retrieve value of Attribute stored with provided key.
| no_such_attribute_error | If no Attribute is currently stored with the provided key. |
| key | Key (i.e. name) of the Attribute to retrieve value for. |
| void openPMD::Attributable::iterationFlush | ( | std::string | backendConfig = "{}" | ) |
Flush the containing Iteration.
Writable connects all objects of an openPMD series through a linked list of parents. This method will walk up the parent list to find the containing Iteration. The Iteration will be flushed regardless if it is dirty.
| backendConfig | Further backend-specific instructions on how to implement this flush call. Must be provided in-line, configuration is not read from files. |
| auto openPMD::Attributable::myPath | ( | ) | const |
The path to this object within its containing Series.
| size_t openPMD::Attributable::numAttributes | ( | ) | const |
Count all currently stored Attributes.
|
inlineprotected |
Retrieve the value of a floating point Attribute of user-defined precision with ensured type-safety.
| no_such_attribute_error | If no Attribute is currently stored with the provided key. |
| T | Floating point type of user-defined precision to retrieve the value as. |
| key | Key (i.e. name) of the floating-point Attribute to retrieve value for. |
|
inlineprotected |
Retrieve a vector of values of a floating point Attributes of user-defined precision with ensured type-safety.
| no_such_attribute_error | If no Attribute is currently stored with the provided key. |
| T | Floating point type of user-defined precision to retrieve the values as. |
| key | Key (i.e. name) of the floating-point Attribute to retrieve values for. |
| void openPMD::Attributable::seriesFlush | ( | std::string | backendConfig = "{}" | ) |
Flush the corresponding Series object.
Writable connects all objects of an openPMD series through a linked list of parents. This method will walk up the parent list until it reaches an object that has no parent, which is the Series object, and flush()-es it. If the Attributable is an Iteration or any object contained in an Iteration, that Iteration will be flushed regardless of its dirty status.
| backendConfig | Further backend-specific instructions on how to implement this flush call. Must be provided in-line, configuration is not read from files. |
|
inline |
Populate Attribute of provided name with provided value.
| T | Type of the object to be stored. Only types contained in Datatype can be handled. |
| key | Key (i.e. name) to identify and store an Attributes value by. |
| value | Value of Attribute stored with the provided key. |
| Attributable & openPMD::Attributable::setComment | ( | std::string const & | comment | ) |
Populate Attribute corresponding to a comment with the user-supplied comment.
| comment | String value to be stored as a comment. |