JASSv2
Public Member Functions | Private Attributes | List of all members
JASS::dynamic_array< TYPE >::iterator Class Reference

C++ iterator for iterating over a dynamic_array object. More...

#include <dynamic_array.h>

Collaboration diagram for JASS::dynamic_array< TYPE >::iterator:
Collaboration graph
[legend]

Public Member Functions

 iterator (node *node, size_t element)
 constructor More...
 
bool operator!= (const iterator &other) const
 Compare two iterator objects for non-equality. More...
 
TYPE & operator* () const
 Return a reference to the element pointed to by this iterator.
 
const iteratoroperator++ ()
 Increment this iterator.
 

Private Attributes

const nodecurrent_node
 The node that this iterator is currently looking at.
 
TYPE * data
 Pointer to the element within current_node that this object is looking at.
 

Detailed Description

template<typename TYPE>
class JASS::dynamic_array< TYPE >::iterator

C++ iterator for iterating over a dynamic_array object.

See http://www.cprogramming.com/c++11/c++11-ranged-for-loop.html for details on how to write a C++11 iterator.

Constructor & Destructor Documentation

◆ iterator()

template<typename TYPE>
JASS::dynamic_array< TYPE >::iterator::iterator ( node node,
size_t  element 
)
inline

constructor

Parameters
node[in] The node that this iterator should start looking at.
element[in] Which element within node this iterator should start looking at (normally 0).

Member Function Documentation

◆ operator!=()

template<typename TYPE>
bool JASS::dynamic_array< TYPE >::iterator::operator!= ( const iterator other) const
inline

Compare two iterator objects for non-equality.

Parameters
other[in] The iterator object to compare to.
Returns
true if they differ, else false.

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