File tree Expand file tree Collapse file tree 4 files changed +12
-7
lines changed Expand file tree Collapse file tree 4 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -153,8 +153,10 @@ class AbstractIOHandlerImpl
153153 * The return status code shall be stored as parameters.status.
154154 */
155155 virtual void
156- advance ( Writable *, Parameter< Operation::ADVANCE > & )
157- {}
156+ advance ( Writable *, Parameter< Operation::ADVANCE > & parameters )
157+ {
158+ *parameters.status = AdvanceStatus::RANDOMACCESS;
159+ }
158160
159161 /* * Close an openPMD group.
160162 *
Original file line number Diff line number Diff line change @@ -19,8 +19,9 @@ namespace openPMD
1919 */
2020enum class AdvanceStatus : unsigned char
2121{
22- OK, /* stream goes on */
23- OVER /* stream is over */
22+ OK, /* stream goes on */
23+ OVER, /* stream is over */
24+ RANDOMACCESS /* there is no stream, it will never be over */
2425};
2526
2627/* *
Original file line number Diff line number Diff line change @@ -2534,7 +2534,7 @@ namespace detail
25342534 m_IO.DefineAttribute < bool_representation >(
25352535 ADIOS2Defaults::str_usesstepsAttribute, 0 );
25362536 flush ( /* writeAttributes = */ false );
2537- return AdvanceStatus::OK ;
2537+ return AdvanceStatus::RANDOMACCESS ;
25382538 }
25392539
25402540 m_IO.DefineAttribute < bool_representation >(
Original file line number Diff line number Diff line change @@ -83,7 +83,8 @@ SeriesIterator::SeriesIterator( Series series )
8383 Iteration::BeginStepStatus::AvailableIterations_t
8484 availableIterations;
8585 std::tie ( status, availableIterations ) = it->second .beginStep ();
86- if ( availableIterations.has_value () )
86+ if ( availableIterations.has_value ()
87+ && status != AdvanceStatus::RANDOMACCESS )
8788 {
8889 m_iterationsInCurrentStep = availableIterations.get ();
8990 if ( !m_iterationsInCurrentStep.empty () )
@@ -188,7 +189,8 @@ SeriesIterator & SeriesIterator::operator++()
188189 AdvanceStatus status;
189190 Iteration::BeginStepStatus::AvailableIterations_t availableIterations;
190191 std::tie ( status, availableIterations ) = currentIteration.beginStep ();
191- if ( availableIterations.has_value () )
192+ if ( availableIterations.has_value ()
193+ && status != AdvanceStatus::RANDOMACCESS )
192194 {
193195 m_iterationsInCurrentStep = availableIterations.get ();
194196 }
You can’t perform that action at this time.
0 commit comments