Graphite  Version 3
An experimental 3D geometry processing program
GEO::index_as_iterator Class Reference

Wraps an integer to be used with the range-based for construct. More...

#include <geogram/basic/range.h>

Public Member Functions

 index_as_iterator (index_t val)
 
void operator++ ()
 
bool operator== (index_as_iterator rhs)
 
bool operator!= (index_as_iterator rhs)
 
bool operator< (index_as_iterator rhs)
 
index_t operator* () const
 
index_t operator- (index_as_iterator it) const
 
index_as_iterator operator+ (index_t i) const
 

Detailed Description

Wraps an integer to be used with the range-based for construct.

Not really an iterator, rather a pseudo-index. Geogram mostly uses index-based data structures, where an element is an index in an array (whereas the STL uses pointer-like semantics). With indices, there is no indirection (an index is an element), so operator* does nothing (returns the stored index).

Definition at line 66 of file range.h.


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