IModelIterator::Reset method (dbgmodel.h)
The Reset method on an iterator returned from the iterable concept will restore the position of the iterator to where it was when the iterator was first created (before the first element). While it is strongly recommended that iterator's support the Reset method, it is not required. An iterator can be the equivalent of a C++ input iterator and only allow a single pass of forward iteration. In such case, the Reset method may fail with E_NOTIMPL.
Syntax
HRESULT Reset();
Return value
This method returns HRESULT.
Remarks
Code Sample
IFACEMETHOD(Reset)()
{
// It is legal for an iterator to be unable to Reset(). E_NOTIMPL can
// be returned in that case. If an iterator is capable of a reset, it
// should always prefer to implement such.
m_position = 0;
return S_OK;
}
Requirements
Requirement | Value |
---|---|
Header | dbgmodel.h |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for