23 #include "openPMD/Dataset.hpp"
24 #include "openPMD/Error.hpp"
25 #include "openPMD/backend/Attributable.hpp"
30 #ifndef OPENPMD_protected
31 #define OPENPMD_protected protected:
82 template <
typename T,
typename T_key,
typename T_container>
101 m_attri = other.m_attri;
102 m_baseRecordComponentData = other.m_baseRecordComponentData;
109 m_attri = std::move(other.m_attri);
111 m_baseRecordComponentData = std::move(other.m_baseRecordComponentData);
116 m_attri = other.m_attri;
117 m_baseRecordComponentData = other.m_baseRecordComponentData;
125 m_attri = std::move(other.m_attri);
127 m_baseRecordComponentData = std::move(other.m_baseRecordComponentData);
131 double unitSI()
const;
146 std::optional<size_t> joinedDimension()
const;
169 std::shared_ptr<Data_t> m_baseRecordComponentData;
171 inline Data_t const &get()
const
173 return *m_baseRecordComponentData;
178 return *m_baseRecordComponentData;
181 inline void setData(std::shared_ptr<Data_t> data)
183 m_baseRecordComponentData = std::move(data);
184 Attributable::setData(m_baseRecordComponentData);
187 virtual void setDatasetDefined(
Data_t &);
189 bool datasetDefined()
const;
205 template <
typename T_RecordComponent>
208 template <
typename T>
209 static void call(T_RecordComponent &rc)
211 rc.makeConstant(
T());
214 template <
unsigned n,
typename... Args>
215 static void call(Args &&...)
217 throw std::runtime_error(
218 "makeEmpty: Datatype not supported by openPMD.");
Layer to manage storage of attributes associated with file objects.
Definition: Attributable.hpp:101
Definition: BaseRecordComponent.hpp:81
bool constant() const
Returns true if this is a constant record component.
Definition: BaseRecordComponent.cpp:63
ChunkTable availableChunks()
Get data chunks that are available to be loaded from the backend.
Definition: BaseRecordComponent.cpp:81
Map-like container that enforces openPMD requirements and handles IO.
Definition: Container.hpp:104
Definition: Attributable.hpp:57
Definition: BaseRecordComponent.hpp:39
std::optional< Dataset > m_dataset
The type and extent of the dataset defined by this component.
Definition: BaseRecordComponent.hpp:44
bool m_datasetDefined
Tracks if there was any write access to the record component.
Definition: BaseRecordComponent.hpp:58
bool m_isConstant
True if this is defined as a constant record component as specified in the openPMD standard.
Definition: BaseRecordComponent.hpp:51
Public definitions of openPMD-api.
Definition: Date.cpp:29
Datatype
Concrete datatype of an object available at runtime.
Definition: Datatype.hpp:51
Definition: Attributable.hpp:125
Functor template to be used in combination with switchType::operator() to set a default value for con...
Definition: BaseRecordComponent.hpp:207