3232
3333namespace openPMD
3434{
35- namespace traits
36- {
37- struct AccessIteration ;
38- }
39-
4035/* * @brief Logical compilation of data from one snapshot (e.g. a single simulation cycle).
4136 *
4237 * @see https://github.com/openPMD/openPMD-standard/blob/latest/STANDARD.md#required-attributes-for-the-basepath
@@ -52,7 +47,6 @@ class Iteration : public LegacyAttributable
5247 friend class SeriesImpl ;
5348 friend class WriteIterations ;
5449 friend class SeriesIterator ;
55- friend struct traits ::AccessIteration;
5650
5751public:
5852 Iteration ( Iteration const & ) = default ;
@@ -171,6 +165,20 @@ class Iteration : public LegacyAttributable
171165 void flushGroupBased (uint64_t );
172166 void flush ();
173167 void deferRead ( DeferredRead );
168+ /*
169+ * Control flow for read(), readFileBased(), readGroupBased() and
170+ * read_impl():
171+ * read() is called as the entry point. File-based and group-based
172+ * iteration layouts need to be parsed slightly differently:
173+ * In file-based iteration layout, each iteration's file also contains
174+ * attributes for the /data group. In group-based layout, those have
175+ * already been parsed during opening of the Series.
176+ * Hence, read() will call either readFileBased() or readGroupBased() to
177+ * allow for those different control flows.
178+ * Finally, read_impl() is called which contains the common parsing
179+ * logic for an iteration.
180+ *
181+ */
174182 void read ();
175183 void readFileBased ( std::string filePath, std::string const & groupPath );
176184 void readGroupBased ( std::string const & groupPath );
@@ -300,7 +308,9 @@ class Iteration : public LegacyAttributable
300308
301309using Iterations_t = Container< Iteration, uint64_t >;
302310
303- extern template float Iteration::time< float >() const ;
311+ extern template
312+ float
313+ Iteration::time< float >() const ;
304314
305315extern template
306316double
0 commit comments