openPMD-api
Public Member Functions | Public Attributes | Friends | List of all members
openPMD::Writable Class Referencefinal

Layer to mirror structure of logical data and persistent data in file. More...

#include <Writable.hpp>

Collaboration diagram for openPMD::Writable:
Collaboration graph
[legend]

Public Member Functions

 Writable (Writable const &other)=delete
 
 Writable (Writable &&other)=delete
 
Writableoperator= (Writable const &other)=delete
 
Writableoperator= (Writable &&other)=delete
 
void seriesFlush (std::string backendConfig="{}")
 Flush the corresponding Series object. More...
 
private void seriesFlush (internal::FlushParams)
 

Public Attributes

std::shared_ptr< AbstractFilePositionabstractFilePosition = nullptr
 
std::shared_ptr< std::optional< std::unique_ptr< AbstractIOHandler > > > IOHandler = nullptr
 
internal::AttributableDataattributable = nullptr
 
Writableparent = nullptr
 
bool dirty = true
 
std::vector< std::string > ownKeyWithinParent
 If parent is not null, then this is a vector of keys such that: &(*parent)[key_1]...[key_n] == this (Notice that scalar record components do not link their direct parent, but instead their parent's parent, hence a vector of keys)
 
bool written = false
 Whether a Writable has been written to the backend. More...
 

Friends

class internal::AttributableData
 
class internal::SeriesData
 
class Attributable
 
template<typename T_elem >
class BaseRecord
 
template<typename T_elem >
class BaseRecordInterface
 
template<typename T , typename T_key , typename T_container >
class Container
 
class Iteration
 
class Mesh
 
class ParticleSpecies
 
class Series
 
class Record
 
class AbstractIOHandlerImpl
 
template<typename >
class CommonADIOS1IOHandlerImpl
 
class ADIOS1IOHandlerImpl
 
class ParallelADIOS1IOHandlerImpl
 
class ADIOS2IOHandlerImpl
 
class HDF5IOHandlerImpl
 
class ParallelHDF5IOHandlerImpl
 
class AbstractIOHandlerImplCommon< ADIOS2FilePosition >
 
class JSONIOHandlerImpl
 
struct test::TestHelper
 
template<typename >
class Span
 
std::string concrete_h5_file_position (Writable *)
 
std::string concrete_bp1_file_position (Writable *)
 

Detailed Description

Layer to mirror structure of logical data and persistent data in file.

Hierarchy of objects (datasets, groups, attributes, ...) in openPMD is managed in this class. It also indicates the current synchronization state between logical and persistent data: - whether the object has been created in persistent form

Member Function Documentation

◆ seriesFlush()

void openPMD::Writable::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.

Member Data Documentation

◆ written

bool openPMD::Writable::written = false

Whether a Writable has been written to the backend.

The class Writable is used to link objects in our (frontend) object model of the openPMD group hierarchy to the backends. The openPMD hierarchy needs to be built by each backend independently from the frontend. This involves the following tasks:

  • Opening/creating files/groups/datasets
  • Setting up the path structure in Writable::abstractFilePosition

If those tasks have been performed, the flag written is set as true. The interpretation of that is that the backend has been made aware of the Writable and its meaning within the current dataset.


The documentation for this class was generated from the following files: