VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
Public Member Functions | List of all members
AttributeArray< T >::Iterator Class Reference

An iterator over a vertex attribute array. More...

Public Member Functions

 Iterator (GLbyte *ptr, int stride)
 Construct an iterator. More...
 
bool operator== (const Iterator &other) const
 Compares two iterators to test if they point to the same element. More...
 
bool operator!= (const Iterator &other) const
 Compares two iterators to test if they do not point to the same element. More...
 
const T & operator* () const
 Returns a constant reference to the current element. More...
 
T & operator* ()
 Returns a mutable reference to the current element. More...
 
T * operator-> ()
 Arrow operator dereferencing the current element. More...
 
void operator++ ()
 Moves this iterator forward one element. More...
 
void operator++ (int)
 Prepent moves this iterator forward one element. More...
 
void operator-- ()
 Moves this iterator back one element. More...
 
void operator-- (int)
 Prepend moves this iterator back one element. More...
 

Detailed Description

template<typename T>
class AttributeArray< T >::Iterator

An iterator over a vertex attribute array.

Constructor & Destructor Documentation

template<typename T>
AttributeArray< T >::Iterator::Iterator ( GLbyte *  ptr,
int  stride 
)
inline

Construct an iterator.

Parameters
ptrPointer to the first element of the array
strideNumber of bytes between elements

Member Function Documentation

template<typename T>
bool AttributeArray< T >::Iterator::operator!= ( const Iterator other) const
inline

Compares two iterators to test if they do not point to the same element.

Parameters
otherIterator to compare with this iterator
Returns
Whether or not the two iterators do not point to the same element
template<typename T>
const T& AttributeArray< T >::Iterator::operator* ( ) const
inline

Returns a constant reference to the current element.

Returns
Current element
template<typename T>
T& AttributeArray< T >::Iterator::operator* ( )
inline

Returns a mutable reference to the current element.

Returns
Current element
template<typename T>
void AttributeArray< T >::Iterator::operator++ ( )
inline

Moves this iterator forward one element.

template<typename T>
void AttributeArray< T >::Iterator::operator++ ( int  )
inline

Prepent moves this iterator forward one element.

template<typename T>
void AttributeArray< T >::Iterator::operator-- ( )
inline

Moves this iterator back one element.

template<typename T>
void AttributeArray< T >::Iterator::operator-- ( int  )
inline

Prepend moves this iterator back one element.

template<typename T>
T* AttributeArray< T >::Iterator::operator-> ( )
inline

Arrow operator dereferencing the current element.

Returns
Current element
template<typename T>
bool AttributeArray< T >::Iterator::operator== ( const Iterator other) const
inline

Compares two iterators to test if they point to the same element.

Parameters
otherIterator to compare with this iterator
Returns
Whether or not the two iterators point to the same element