Drive Engine  1.0.0
Plateforme de reconstruction 3D
DriveEngine::IEnumerator Class Referenceabstract

The enumerator interface. More...

#include <IEnumerator.h>

Inheritance diagram for DriveEngine::IEnumerator:
IExportable

Public Member Functions

virtual bool MoveNext ()=0
 Move the iterator to the next element, if any. More...
 
virtual IExportableGetCurrent () const =0
 Gets the current element, if any. More...
 
virtual void Reset ()=0
 Resets the enumerator. More...
 
- Public Member Functions inherited from IExportable
virtual void Delete () const =0
 Deletes the current object. Needed for memory management. More...
 

Detailed Description

The enumerator interface.

Enumerators allow to iterate throw the element of a collection.

There is an example of utilisation: IEnumerator* enumerator = list.GetEnumerator(); while (enumerator->MoveNext()) {   IExportable* element = enumerator->GetCurrent();   ... }

Exception safety : No-throw guarantee. Implementations of this interface must never throws exceptions.

Member Function Documentation

virtual IExportable* DriveEngine::IEnumerator::GetCurrent ( ) const
pure virtual

Gets the current element, if any.

MoveNext sould be called once to gets the first element.

Exception safety : No-throw guarantee. This member function never throws exceptions.

Returns
The current element, if any. Otherwise, returns nullptr.
virtual bool DriveEngine::IEnumerator::MoveNext ( )
pure virtual

Move the iterator to the next element, if any.

Exception safety : No-throw guarantee. This member function never throws exceptions.

Returns
Returns true if there is a next element, false otherwise.
virtual void DriveEngine::IEnumerator::Reset ( )
pure virtual

Resets the enumerator.

Exception safety : No-throw guarantee. This member function never throws exceptions.


The documentation for this class was generated from the following file: