TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
DBStorageIterator< T > Class Template Reference

#include <DBStorageIterator.h>

Public Member Functions

 DBStorageIterator ()
 
 DBStorageIterator (T **index, uint32 size, uint32 pos=0)
 
T * operator-> ()
 
T * operator* ()
 
bool operator== (DBStorageIterator const &right) const
 
bool operator!= (DBStorageIterator const &right) const
 
DBStorageIteratoroperator++ ()
 
DBStorageIterator operator++ (int)
 

Private Attributes

T ** _index
 
uint32 _pos
 
uint32 _end
 

Constructor & Destructor Documentation

template<class T >
DBStorageIterator< T >::DBStorageIterator ( )
inline
28 : _index(nullptr), _pos(0), _end(0) { }
T ** _index
Definition: DBStorageIterator.h:64
uint32 _pos
Definition: DBStorageIterator.h:65
uint32 _end
Definition: DBStorageIterator.h:66
template<class T >
DBStorageIterator< T >::DBStorageIterator ( T **  index,
uint32  size,
uint32  pos = 0 
)
inline
29  : _index(index), _pos(pos), _end(size)
30  {
31  if (_pos < _end)
32  {
33  while (_pos < _end && !_index[_pos])
34  ++_pos;
35  }
36  }
T ** _index
Definition: DBStorageIterator.h:64
uint32 _pos
Definition: DBStorageIterator.h:65
uint32 _end
Definition: DBStorageIterator.h:66

Member Function Documentation

template<class T >
bool DBStorageIterator< T >::operator!= ( DBStorageIterator< T > const right) const
inline
42 { return !(*this == right); }
template<class T >
T* DBStorageIterator< T >::operator* ( )
inline
39 { return _index[_pos]; }
T ** _index
Definition: DBStorageIterator.h:64
uint32 _pos
Definition: DBStorageIterator.h:65
template<class T >
DBStorageIterator& DBStorageIterator< T >::operator++ ( )
inline
45  {
46  if (_pos < _end)
47  {
48  do
49  ++_pos;
50  while (_pos < _end && !_index[_pos]);
51  }
52 
53  return *this;
54  }
T ** _index
Definition: DBStorageIterator.h:64
uint32 _pos
Definition: DBStorageIterator.h:65
uint32 _end
Definition: DBStorageIterator.h:66
template<class T >
DBStorageIterator DBStorageIterator< T >::operator++ ( int  )
inline
57  {
58  DBStorageIterator tmp = *this;
59  ++*this;
60  return tmp;
61  }
Definition: DBStorageIterator.h:25
template<class T >
T* DBStorageIterator< T >::operator-> ( )
inline
38 { return _index[_pos]; }
T ** _index
Definition: DBStorageIterator.h:64
uint32 _pos
Definition: DBStorageIterator.h:65
template<class T >
bool DBStorageIterator< T >::operator== ( DBStorageIterator< T > const right) const
inline
41 { /*ASSERT(_index == right._index, "Iterator belongs to a different container")*/ return _pos == right._pos; }
uint32 _pos
Definition: DBStorageIterator.h:65

Member Data Documentation

template<class T >
uint32 DBStorageIterator< T >::_end
private
template<class T >
T** DBStorageIterator< T >::_index
private
template<class T >
uint32 DBStorageIterator< T >::_pos
private

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