Gamedev Framework (gf)  0.7.0
A C++14 framework for 2D games
Public Member Functions | Public Attributes | List of all members
gf::Range< T >::Iterator Struct Reference

A range iterator. More...

#include <gf/Range.h>

Inheritance diagram for gf::Range< T >::Iterator:
Inheritance graph
[legend]

Public Member Functions

constexpr Iterator (T iteratorIndex) noexcept
 Constructor. More...
 
T operator* () noexcept
 Dereference operator. More...
 
Iteratoroperator++ () noexcept
 Increment operator (prefix) More...
 
Iterator operator++ (int) noexcept
 Increment operator (postfix) More...
 
constexpr bool operator!= (const Iterator &other) const noexcept
 Inequality operator. More...
 
constexpr bool operator== (const Iterator &other) const noexcept
 Equality operator. More...
 

Public Attributes

T index
 The index in the range. More...
 

Detailed Description

template<typename T>
struct gf::Range< T >::Iterator

A range iterator.

Constructor & Destructor Documentation

◆ Iterator()

template<typename T>
constexpr gf::Range< T >::Iterator::Iterator ( T  iteratorIndex)
inlinenoexcept

Constructor.

Parameters
iteratorIndexIndex in the range

Member Function Documentation

◆ operator!=()

template<typename T>
constexpr bool gf::Range< T >::Iterator::operator!= ( const Iterator other) const
inlinenoexcept

Inequality operator.

Parameters
otherAnother iterator
Returns
True if the iterator are different

◆ operator*()

template<typename T>
T gf::Range< T >::Iterator::operator* ( )
inlinenoexcept

Dereference operator.

Returns
The index

◆ operator++() [1/2]

template<typename T>
Iterator& gf::Range< T >::Iterator::operator++ ( )
inlinenoexcept

Increment operator (prefix)

Returns
The iterator

◆ operator++() [2/2]

template<typename T>
Iterator gf::Range< T >::Iterator::operator++ ( int  )
inlinenoexcept

Increment operator (postfix)

Returns
The iterator

◆ operator==()

template<typename T>
constexpr bool gf::Range< T >::Iterator::operator== ( const Iterator other) const
inlinenoexcept

Equality operator.

Parameters
otherAnother iterator
Returns
True if the iterator are the same

Member Data Documentation

◆ index

template<typename T>
T gf::Range< T >::Iterator::index

The index in the range.