FSTR::ObjectIterator< ObjectType, ElementType > Class Template Reference

#include <ObjectIterator.hpp>

Public Types

using iterator_category = std::random_access_iterator_tag
 
using value_type = ElementType
 
using difference_type = std::ptrdiff_t
 
using pointer = typename ObjectType::DataPtrType
 
using reference = ElementType &
 

Public Member Functions

 ObjectIterator ()=default
 
 ObjectIterator (const ObjectIterator &)=default
 
 ObjectIterator (const ObjectType &object, unsigned index)
 
ObjectIteratoroperator++ ()
 
ObjectIterator operator++ (int)
 
ObjectIterator operator+= (size_t distance)
 
bool operator== (const ObjectIterator &rhs) const
 
bool operator!= (const ObjectIterator &rhs) const
 
template<typename T = ElementType>
std::enable_if<!std::is_pointer< T >::value, const ElementType >::type operator* () const
 Accessor returns a copy for non-pointer-type elements. More...
 
template<typename T = ElementType>
std::enable_if< std::is_pointer< T >::value, const typename std::remove_pointer< ElementType >::type & >::type operator* () const
 Accessor returns a reference for pointer-type elements. More...
 

Member Typedef Documentation

◆ difference_type

template<class ObjectType , typename ElementType >
using FSTR::ObjectIterator< ObjectType, ElementType >::difference_type = std::ptrdiff_t

◆ iterator_category

template<class ObjectType , typename ElementType >
using FSTR::ObjectIterator< ObjectType, ElementType >::iterator_category = std::random_access_iterator_tag

◆ pointer

template<class ObjectType , typename ElementType >
using FSTR::ObjectIterator< ObjectType, ElementType >::pointer = typename ObjectType::DataPtrType

◆ reference

template<class ObjectType , typename ElementType >
using FSTR::ObjectIterator< ObjectType, ElementType >::reference = ElementType&

◆ value_type

template<class ObjectType , typename ElementType >
using FSTR::ObjectIterator< ObjectType, ElementType >::value_type = ElementType

Constructor & Destructor Documentation

◆ ObjectIterator() [1/3]

template<class ObjectType , typename ElementType >
FSTR::ObjectIterator< ObjectType, ElementType >::ObjectIterator ( )
default

◆ ObjectIterator() [2/3]

template<class ObjectType , typename ElementType >
FSTR::ObjectIterator< ObjectType, ElementType >::ObjectIterator ( const ObjectIterator< ObjectType, ElementType > &  )
default

◆ ObjectIterator() [3/3]

template<class ObjectType , typename ElementType >
FSTR::ObjectIterator< ObjectType, ElementType >::ObjectIterator ( const ObjectType &  object,
unsigned  index 
)
inline

Member Function Documentation

◆ operator!=()

template<class ObjectType , typename ElementType >
bool FSTR::ObjectIterator< ObjectType, ElementType >::operator!= ( const ObjectIterator< ObjectType, ElementType > &  rhs) const
inline

◆ operator*() [1/2]

template<class ObjectType , typename ElementType >
template<typename T = ElementType>
std::enable_if<!std::is_pointer<T>::value, const ElementType>::type FSTR::ObjectIterator< ObjectType, ElementType >::operator* ( ) const
inline

Accessor returns a copy for non-pointer-type elements.

◆ operator*() [2/2]

template<class ObjectType , typename ElementType >
template<typename T = ElementType>
std::enable_if<std::is_pointer<T>::value, const typename std::remove_pointer<ElementType>::type&>::type FSTR::ObjectIterator< ObjectType, ElementType >::operator* ( ) const
inline

Accessor returns a reference for pointer-type elements.

◆ operator++() [1/2]

template<class ObjectType , typename ElementType >
ObjectIterator& FSTR::ObjectIterator< ObjectType, ElementType >::operator++ ( )
inline

◆ operator++() [2/2]

template<class ObjectType , typename ElementType >
ObjectIterator FSTR::ObjectIterator< ObjectType, ElementType >::operator++ ( int  )
inline

◆ operator+=()

template<class ObjectType , typename ElementType >
ObjectIterator FSTR::ObjectIterator< ObjectType, ElementType >::operator+= ( size_t  distance)
inline

◆ operator==()

template<class ObjectType , typename ElementType >
bool FSTR::ObjectIterator< ObjectType, ElementType >::operator== ( const ObjectIterator< ObjectType, ElementType > &  rhs) const
inline

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