33#ifndef __H__UG__generic_grid_object_iterator__
34#define __H__UG__generic_grid_object_iterator__
42template <
class TValue,
class TBaseIterator>
46 template <
class TIterDest,
class TIterSrc>
friend TIterDest
iterator_cast(
const TIterSrc& iter);
55 TBaseIterator(iter) {}
58 inline TValue
operator* ()
const {
return static_cast<TValue
>(TBaseIterator::operator*());}
62 TBaseIterator(iter) {}
68template <
class TValue,
class TBaseIterator,
class TConstBaseIterator>
72 template <
class TIterDest,
class TIterSrc>
friend TIterDest
iterator_cast(
const TIterSrc& iter);
81 TConstBaseIterator(iter) {}
84 TConstBaseIterator(iter) {}
87 inline TValue
operator* ()
const {
return static_cast<TValue
>(TConstBaseIterator::operator*());}
91 TConstBaseIterator(iter) {}
94 TConstBaseIterator(iter) {}
100template <
class TIterDest,
class TIterSrc>
104 return TIterDest(iter);
Use this class as a tool to create const_iterators to your own geometric objects.
Definition generic_grid_object_iterator.h:70
TValue operator*() const
note that the * operator is read only.
Definition generic_grid_object_iterator.h:87
ConstGenericGridObjectIterator()
Definition generic_grid_object_iterator.h:78
ConstGenericGridObjectIterator(const ConstGenericGridObjectIterator &iter)
Definition generic_grid_object_iterator.h:80
ConstGenericGridObjectIterator(const TConstBaseIterator &iter)
Definition generic_grid_object_iterator.h:93
TValue value_type
Definition generic_grid_object_iterator.h:75
friend TIterDest iterator_cast(const TIterSrc &iter)
You should avoid casting whenever possible!
Definition generic_grid_object_iterator.h:102
ConstGenericGridObjectIterator(const TBaseIterator &iter)
Definition generic_grid_object_iterator.h:90
ConstGenericGridObjectIterator(const GenericGridObjectIterator< TValue, TBaseIterator > &iter)
Definition generic_grid_object_iterator.h:83
Use this class as a tool to create iterators to your own geometric objects.
Definition generic_grid_object_iterator.h:44
GenericGridObjectIterator()
Definition generic_grid_object_iterator.h:52
GenericGridObjectIterator(const TBaseIterator &iter)
Definition generic_grid_object_iterator.h:61
TValue operator*() const
note that the * operator is read only.
Definition generic_grid_object_iterator.h:58
GenericGridObjectIterator(const GenericGridObjectIterator &iter)
Definition generic_grid_object_iterator.h:54
friend TIterDest iterator_cast(const TIterSrc &iter)
You should avoid casting whenever possible!
Definition generic_grid_object_iterator.h:102
TValue value_type
Definition generic_grid_object_iterator.h:49
Manages the elements of a grid and their interconnection.
Definition grid.h:132
TIterDest iterator_cast(const TIterSrc &iter)
You should avoid casting whenever possible!
Definition generic_grid_object_iterator.h:102