CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::FileIterator Class Referencefinal

An iterator that allows traversing over a file's children. More...

#include <CeresEngine/Foundation/IO/FileHandle.hpp>

Public Types

using ImplementationType = Poly< IFileIterator, sizeof(void *) *4, false >
 

Public Member Functions

 FileIterator ()
 Creates a new empty FileIterator.
 
 FileIterator (ImplementationType &&backend)
 Creates a new FileIterator from a concrete iterator implementation.
 
 FileIterator (FileIterator &&other) noexcept
 
FileIteratoroperator= (FileIterator &&other) noexcept
 
 FileIterator (const FileIterator &other)=delete
 
FileIteratoroperator= (const FileIterator &other)=delete
 
 ~FileIterator () noexcept
 Destroys the FileIterator instance.
 
FileHandle operator* () const
 Gets the current handle being iterated.
 
void operator++ ()
 Advances to the next item.
 
bool operator== (const FileIterator &other) const
 Compares two iterators for equality.
 
bool operator!= (const FileIterator &it) const
 Compares two iterators for inequality.
 
IFileSystemgetFileSystem () const
 Gets the backing IFileSystem for the iterator.
 

Private Attributes

ImplementationType mImplementation = nullptr
 The implementation of the file iterator.
 

Detailed Description

An iterator that allows traversing over a file's children.

Member Typedef Documentation

◆ ImplementationType

Constructor & Destructor Documentation

◆ FileIterator() [1/4]

CeresEngine::FileIterator::FileIterator ( )

Creates a new empty FileIterator.

◆ FileIterator() [2/4]

CeresEngine::FileIterator::FileIterator ( ImplementationType &&  backend)

Creates a new FileIterator from a concrete iterator implementation.

◆ FileIterator() [3/4]

CeresEngine::FileIterator::FileIterator ( FileIterator &&  other)
noexcept

◆ FileIterator() [4/4]

CeresEngine::FileIterator::FileIterator ( const FileIterator other)
delete

◆ ~FileIterator()

CeresEngine::FileIterator::~FileIterator ( )
noexcept

Destroys the FileIterator instance.

Member Function Documentation

◆ getFileSystem()

IFileSystem * CeresEngine::FileIterator::getFileSystem ( ) const

Gets the backing IFileSystem for the iterator.

Can be nullptr if the handle is empty.

◆ operator!=()

bool CeresEngine::FileIterator::operator!= ( const FileIterator it) const

Compares two iterators for inequality.

Returns
true if iterators are not equal, else false.

◆ operator*()

FileHandle CeresEngine::FileIterator::operator* ( ) const

Gets the current handle being iterated.

◆ operator++()

void CeresEngine::FileIterator::operator++ ( )

Advances to the next item.

◆ operator=() [1/2]

FileIterator & CeresEngine::FileIterator::operator= ( const FileIterator other)
delete

◆ operator=() [2/2]

FileIterator & CeresEngine::FileIterator::operator= ( FileIterator &&  other)
noexcept

◆ operator==()

bool CeresEngine::FileIterator::operator== ( const FileIterator other) const

Compares two iterators for equality.

Returns
true if iterators are equal, else false.

Member Data Documentation

◆ mImplementation

ImplementationType CeresEngine::FileIterator::mImplementation = nullptr
private

The implementation of the file iterator.


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