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

The constant enumerator interface. More...

#include <IConstEnumerator.h>

Inheritance diagram for DriveEngine::IConstEnumerator:
IExportable

Public Member Functions

virtual bool MoveNext ()=0
 Move the iterator to the next element, if any. More...
 
virtual const 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 constant enumerator interface.

Enumerators allow to iterate throw the element of a collection. A constant enumerator could be used inside constant methods.

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

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

Member Function Documentation

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

Gets the current element, if any.

Note that 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::IConstEnumerator::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::IConstEnumerator::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: