CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::MeshGenerator::Iterator< Generator > Class Template Reference

An iterator that can be used to "drive" a generator. More...

#include <CeresEngine/Mesh/Generator/Iterator.hpp>

Public Types

using value_type = typename GeneratedType< Generator >::Type
 
using difference_type = std::ptrdiff_t
 
using pointer = value_type *
 
using reference = value_type &
 

Public Member Functions

 Iterator () noexcept
 Creates a dummy end iterator.
 
 Iterator (Generator &generator) noexcept
 Iterator to the given generator.
 
Iteratoroperator++ ()
 Advance the iterator.
 
const Iterator::value_typeoperator* () const
 Get reference to the current generated value.
 
const Iterator::value_typeoperator-> () const
 Get pointer to the current generated value.
 
bool operator== (const Iterator &that) const noexcept
 Iterators are equal if both are out of range or both iterate the same generator.
 
bool operator!= (const Iterator &that) const noexcept
 

Private Attributes

GeneratormGenerator
 
GeneratedType< Generator >::Type value_
 

Detailed Description

template<typename Generator>
class CeresEngine::MeshGenerator::Iterator< Generator >

An iterator that can be used to "drive" a generator.

Note that iterator mutates the generator.

Member Typedef Documentation

◆ difference_type

template<typename Generator >
using CeresEngine::MeshGenerator::Iterator< Generator >::difference_type = std::ptrdiff_t

◆ pointer

◆ reference

◆ value_type

Constructor & Destructor Documentation

◆ Iterator() [1/2]

template<typename Generator >
CeresEngine::MeshGenerator::Iterator< Generator >::Iterator ( )
inlinenoexcept

Creates a dummy end iterator.

◆ Iterator() [2/2]

template<typename Generator >
CeresEngine::MeshGenerator::Iterator< Generator >::Iterator ( Generator generator)
inlinenoexcept

Iterator to the given generator.

Member Function Documentation

◆ operator!=()

◆ operator*()

Get reference to the current generated value.

Exceptions
std::out_of_rangeIf the iterator is out of range.

◆ operator++()

Advance the iterator.

Might make the iterator "out of range".

Exceptions
std::out_of_rangeIf the iterator is out of range.

◆ operator->()

Get pointer to the current generated value.

Exceptions
std::out_of_rangeIf the iterator is out of range

◆ operator==()

Iterators are equal if both are out of range or both iterate the same generator.

Member Data Documentation

◆ mGenerator

◆ value_


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