QFuture< T >::const_iterator Class Reference

QFuture< T >::const_iterator Class Reference

#include <qfuture.h>

Class Description

template<typename T>
class QFuture< T >::const_iterator

Definition at line 110 of file qfuture.h.

Public Types

typedef std::bidirectional_iterator_tag iterator_category
 
typedef qptrdiff difference_type
 
typedef T value_type
 
typedef const T * pointer
 
typedef const T & reference
 

Public Member Functions

 const_iterator ()
 
 const_iterator (QFuture const *const _future, int _index)
 
 const_iterator (const const_iterator &o)
 
const_iteratoroperator= (const const_iterator &o)
 
const T & operator* () const
 
const T * operator-> () const
 
bool operator!= (const const_iterator &other) const
 
bool operator== (const const_iterator &o) const
 
const_iteratoroperator++ ()
 
const_iterator operator++ (int)
 
const_iteratoroperator-- ()
 
const_iterator operator-- (int)
 
const_iterator operator+ (int j) const
 
const_iterator operator- (int j) const
 
const_iteratoroperator+= (int j)
 
const_iteratoroperator-= (int j)
 

Member Typedef Documentation

typedef std::bidirectional_iterator_tag iterator_category

Definition at line 113 of file qfuture.h.

typedef qptrdiff difference_type

Definition at line 114 of file qfuture.h.

typedef T value_type

Definition at line 115 of file qfuture.h.

typedef const T* pointer

Definition at line 116 of file qfuture.h.

typedef const T& reference

Definition at line 117 of file qfuture.h.

Constructor & Destructor Documentation

const_iterator ( )
inline

Definition at line 119 of file qfuture.h.

119 {}
const_iterator ( QFuture const *const  _future,
int  _index 
)
inline

Definition at line 120 of file qfuture.h.

120 : future(_future), index(_index) {}
GLuint index
Definition: GLee.h:1704
const_iterator ( const const_iterator o)
inline

Definition at line 121 of file qfuture.h.

121 : future(o.future), index(o.index) {}
GLuint index
Definition: GLee.h:1704

Member Function Documentation

const_iterator& operator= ( const const_iterator o)
inline

Definition at line 122 of file qfuture.h.

123  { future = o.future; index = o.index; return *this; }
GLuint index
Definition: GLee.h:1704
const T& operator* ( ) const
inline

Definition at line 124 of file qfuture.h.

124 { return future->d.resultReference(index); }
QFutureInterface< T > d
Definition: qfuture.h:161
GLuint index
Definition: GLee.h:1704
const T* operator-> ( void  ) const
inline

Definition at line 125 of file qfuture.h.

125 { return future->d.resultPointer(index); }
QFutureInterface< T > d
Definition: qfuture.h:161
GLuint index
Definition: GLee.h:1704
bool operator!= ( const const_iterator other) const
inline

Definition at line 127 of file qfuture.h.

128  {
129  if (index == -1 && other.index == -1) // comparing end != end?
130  return false;
131  if (other.index == -1)
132  return (future->isRunning() || (index < future->resultCount()));
133  return (index != other.index);
134  }
bool isRunning() const
Definition: qfuture.h:94
int resultCount() const
Definition: qfuture.h:96
GLuint index
Definition: GLee.h:1704
bool operator== ( const const_iterator o) const
inline

Definition at line 136 of file qfuture.h.

136 { return !operator!=(o); }
bool operator!=(const const_iterator &other) const
Definition: qfuture.h:127
const_iterator& operator++ ( )
inline

Definition at line 137 of file qfuture.h.

137 { ++index; return *this; }
GLuint index
Definition: GLee.h:1704
const_iterator operator++ ( int  )
inline

Definition at line 138 of file qfuture.h.

138 { const_iterator r = *this; ++index; return r; }
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
GLuint index
Definition: GLee.h:1704
const_iterator& operator-- ( )
inline

Definition at line 139 of file qfuture.h.

139 { --index; return *this; }
GLuint index
Definition: GLee.h:1704
const_iterator operator-- ( int  )
inline

Definition at line 140 of file qfuture.h.

140 { const_iterator r = *this; --index; return r; }
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
GLuint index
Definition: GLee.h:1704
const_iterator operator+ ( int  j) const
inline

Definition at line 141 of file qfuture.h.

141 { return const_iterator(future, index + j); }
GLuint index
Definition: GLee.h:1704
const_iterator operator- ( int  j) const
inline

Definition at line 142 of file qfuture.h.

142 { return const_iterator(future, index - j); }
GLuint index
Definition: GLee.h:1704
const_iterator& operator+= ( int  j)
inline

Definition at line 143 of file qfuture.h.

143 { index += j; return *this; }
GLuint index
Definition: GLee.h:1704
const_iterator& operator-= ( int  j)
inline

Definition at line 144 of file qfuture.h.

144 { index -= j; return *this; }
GLuint index
Definition: GLee.h:1704

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