AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
ResultIterator< T > Struct Template Reference

#include "QueryResult.h"

Public Types

using iterator_category = std::forward_iterator_tag
 
using difference_type = std::ptrdiff_t
 
using value_type = T
 
using pointer = T *
 
using reference = T &
 

Public Member Functions

 ResultIterator (pointer ptr)
 
reference operator* () const
 
pointer operator-> ()
 
ResultIteratoroperator++ ()
 
bool operator!= (const ResultIterator &right)
 

Private Attributes

pointer _ptr
 

Detailed Description

template<typename T>
struct ResultIterator< T >

Member Typedef Documentation

◆ difference_type

template<typename T >
using ResultIterator< T >::difference_type = std::ptrdiff_t

◆ iterator_category

template<typename T >
using ResultIterator< T >::iterator_category = std::forward_iterator_tag

◆ pointer

template<typename T >
using ResultIterator< T >::pointer = T*

◆ reference

template<typename T >
using ResultIterator< T >::reference = T&

◆ value_type

template<typename T >
using ResultIterator< T >::value_type = T

Constructor & Destructor Documentation

◆ ResultIterator()

template<typename T >
ResultIterator< T >::ResultIterator ( pointer  ptr)
inlineexplicit
36: _ptr(ptr) { }
pointer _ptr
Definition: QueryResult.h:45

Member Function Documentation

◆ operator!=()

template<typename T >
bool ResultIterator< T >::operator!= ( const ResultIterator< T > &  right)
inline
42{ return _ptr != right._ptr; }

References ResultIterator< T >::_ptr.

◆ operator*()

template<typename T >
reference ResultIterator< T >::operator* ( ) const
inline
38{ return *_ptr; }

References ResultIterator< T >::_ptr.

◆ operator++()

template<typename T >
ResultIterator & ResultIterator< T >::operator++ ( )
inline
40{ if (!_ptr->NextRow()) _ptr = nullptr; return *this; }

References ResultIterator< T >::_ptr.

◆ operator->()

template<typename T >
pointer ResultIterator< T >::operator-> ( )
inline
39{ return _ptr; }

References ResultIterator< T >::_ptr.

Member Data Documentation

◆ _ptr