@@ -12,7 +12,7 @@ namespace openPMD
1212{
1313class RecordComponent ;
1414template <typename Ptr_Type>
15- class TypedConfigureStoreChunk ;
15+ class ConfigureStoreChunkFromBuffer ;
1616template <typename T>
1717class DynamicMemoryView ;
1818
@@ -76,26 +76,27 @@ class ConfigureStoreChunk : protected internal::ConfigureStoreChunkData
7676 // @todo rvalue references..?
7777 template <typename T>
7878 auto fromSharedPtr (std::shared_ptr<T>)
79- -> TypedConfigureStoreChunk <
79+ -> ConfigureStoreChunkFromBuffer <
8080 std::shared_ptr<normalize_dataset_type<T> const >>;
8181 template <typename T>
8282 auto fromUniquePtr (UniquePtrWithLambda<T>)
83- -> TypedConfigureStoreChunk <
83+ -> ConfigureStoreChunkFromBuffer <
8484 UniquePtrWithLambda<normalize_dataset_type<T>>>;
8585 template <typename T, typename Del>
8686 auto fromUniquePtr (std::unique_ptr<T, Del>)
87- -> TypedConfigureStoreChunk <
87+ -> ConfigureStoreChunkFromBuffer <
8888 UniquePtrWithLambda<normalize_dataset_type<T>>>;
8989 template <typename T>
9090 auto
91- fromRawPtr (T *data) -> TypedConfigureStoreChunk <
91+ fromRawPtr (T *data) -> ConfigureStoreChunkFromBuffer <
9292 std::shared_ptr<normalize_dataset_type<T> const >>;
9393 template <typename T_ContiguousContainer>
9494 auto fromContiguousContainer (T_ContiguousContainer &data) ->
9595 typename std::enable_if_t<
9696 auxiliary::IsContiguousContainer_v<T_ContiguousContainer>,
97- TypedConfigureStoreChunk<std::shared_ptr<normalize_dataset_type<
98- typename T_ContiguousContainer::value_type> const >>>;
97+ ConfigureStoreChunkFromBuffer<
98+ std::shared_ptr<normalize_dataset_type<
99+ typename T_ContiguousContainer::value_type> const >>>;
99100
100101 template <typename T>
101102 auto enqueue () -> DynamicMemoryView<T>;
@@ -105,13 +106,13 @@ class ConfigureStoreChunk : protected internal::ConfigureStoreChunkData
105106 auto enqueue (F &&createBuffer) -> DynamicMemoryView<T>;
106107};
107108
108- // @todo rename as ConfigureStoreChunkFromBuffer
109109template <typename Ptr_Type>
110- class TypedConfigureStoreChunk
111- : public ConfigureStoreChunk<TypedConfigureStoreChunk <Ptr_Type>>
110+ class ConfigureStoreChunkFromBuffer
111+ : public ConfigureStoreChunk<ConfigureStoreChunkFromBuffer <Ptr_Type>>
112112{
113113public:
114- using parent_t = ConfigureStoreChunk<TypedConfigureStoreChunk<Ptr_Type>>;
114+ using parent_t =
115+ ConfigureStoreChunk<ConfigureStoreChunkFromBuffer<Ptr_Type>>;
115116
116117private:
117118 template <typename T>
@@ -120,12 +121,12 @@ class TypedConfigureStoreChunk
120121 Ptr_Type m_buffer;
121122 std::optional<MemorySelection> m_mem_select;
122123
123- TypedConfigureStoreChunk (Ptr_Type buffer, parent_t &&);
124+ ConfigureStoreChunkFromBuffer (Ptr_Type buffer, parent_t &&);
124125
125126 auto storeChunkConfig () const -> internal::StoreChunkConfigFromBuffer;
126127
127128public:
128- auto memorySelection (MemorySelection) & -> TypedConfigureStoreChunk &;
129+ auto memorySelection (MemorySelection) & -> ConfigureStoreChunkFromBuffer &;
129130
130131 auto as_parent () && -> parent_t &&;
131132 auto as_parent () & -> parent_t &;
@@ -137,15 +138,15 @@ class TypedConfigureStoreChunk
137138template <typename ChildClass>
138139template <typename T>
139140auto ConfigureStoreChunk<ChildClass>::fromSharedPtr(std::shared_ptr<T> data)
140- -> TypedConfigureStoreChunk <
141+ -> ConfigureStoreChunkFromBuffer <
141142 std::shared_ptr<normalize_dataset_type<T> const >>
142143{
143144 if (!data)
144145 {
145146 throw std::runtime_error (
146147 " Unallocated pointer passed during chunk store." );
147148 }
148- return TypedConfigureStoreChunk <
149+ return ConfigureStoreChunkFromBuffer <
149150 std::shared_ptr<normalize_dataset_type<T> const >>(
150151 std::static_pointer_cast<normalize_dataset_type<T> const >(
151152 std::move (data)),
@@ -154,30 +155,31 @@ auto ConfigureStoreChunk<ChildClass>::fromSharedPtr(std::shared_ptr<T> data)
154155template <typename ChildClass>
155156template <typename T>
156157auto ConfigureStoreChunk<ChildClass>::fromUniquePtr(UniquePtrWithLambda<T> data)
157- -> TypedConfigureStoreChunk<UniquePtrWithLambda<normalize_dataset_type<T>>>
158+ -> ConfigureStoreChunkFromBuffer<
159+ UniquePtrWithLambda<normalize_dataset_type<T>>>
158160{
159161 if (!data)
160162 {
161163 throw std::runtime_error (
162164 " Unallocated pointer passed during chunk store." );
163165 }
164- return TypedConfigureStoreChunk <
166+ return ConfigureStoreChunkFromBuffer <
165167 UniquePtrWithLambda<normalize_dataset_type<T>>>(
166168 std::move (data).template static_cast_ <normalize_dataset_type<T>>(),
167169 {std::move (*this )});
168170}
169171template <typename ChildClass>
170172template <typename T>
171173auto ConfigureStoreChunk<ChildClass>::fromRawPtr(T *data)
172- -> TypedConfigureStoreChunk <
174+ -> ConfigureStoreChunkFromBuffer <
173175 std::shared_ptr<normalize_dataset_type<T> const >>
174176{
175177 if (!data)
176178 {
177179 throw std::runtime_error (
178180 " Unallocated pointer passed during chunk store." );
179181 }
180- return TypedConfigureStoreChunk <
182+ return ConfigureStoreChunkFromBuffer <
181183 std::shared_ptr<normalize_dataset_type<T> const >>(
182184 auxiliary::shareRaw (data), {std::move (*this )});
183185}
@@ -186,7 +188,8 @@ template <typename ChildClass>
186188template <typename T, typename Del>
187189auto ConfigureStoreChunk<ChildClass>::fromUniquePtr(
188190 std::unique_ptr<T, Del> data)
189- -> TypedConfigureStoreChunk<UniquePtrWithLambda<normalize_dataset_type<T>>>
191+ -> ConfigureStoreChunkFromBuffer<
192+ UniquePtrWithLambda<normalize_dataset_type<T>>>
190193{
191194 return fromUniquePtr (UniquePtrWithLambda<T>(std::move (data)));
192195}
@@ -196,7 +199,7 @@ auto ConfigureStoreChunk<ChildClass>::fromContiguousContainer(
196199 T_ContiguousContainer &data) ->
197200 typename std::enable_if_t <
198201 auxiliary::IsContiguousContainer_v<T_ContiguousContainer>,
199- TypedConfigureStoreChunk <std::shared_ptr<normalize_dataset_type<
202+ ConfigureStoreChunkFromBuffer <std::shared_ptr<normalize_dataset_type<
200203 typename T_ContiguousContainer::value_type> const >>>
201204{
202205 if (!m_extent.has_value () && dim () == 1 )
0 commit comments