Spatial C++ Library
Generic Multi-Dimensional Containers and Spatial Operations
|
A common template for constant bidirectional iterators that work on identical modes of linking. More...
#include <spatial_bidirectional.hpp>
Inherits Rank.
Public Types | |
typedef mutate< typename Link::value_type >::type | value_type |
The value_type can receive a copy of the reference pointed to be the iterator. More... | |
typedef const Link::value_type & | reference |
The reference type of the object pointed to by the iterator. More... | |
typedef const Link::value_type * | pointer |
The pointer type of the object pointed to by the iterator. More... | |
typedef std::ptrdiff_t | difference_type |
The difference_type returned by the distance between 2 iterators. More... | |
typedef std::bidirectional_iterator_tag | iterator_category |
The iterator category that is always Bidirectional_iterator_tag . More... | |
typedef Link::const_node_ptr | node_ptr |
The type for the node pointed to by the iterator. More... | |
typedef Rank | rank_type |
The type of rank used by the iterator. More... | |
typedef Link::invariant_category | invariant_category |
The invariant category of the the iterator. More... | |
Public Member Functions | |
Const_bidirectional_iterator () | |
Build an uninitialized iterator. More... | |
Const_bidirectional_iterator (const Rank &rank_, node_ptr node_, dimension_type node_dim_) | |
Initialize the node at construction time. More... | |
reference | operator* () |
Returns the reference to the value pointed to by the iterator. More... | |
pointer | operator-> () |
Returns a pointer to the value pointed to by the iterator. More... | |
bool | operator== (const Const_node_iterator< Link > &x) const |
A bidirectional iterator can be compared with a node iterator if they work on identical linking modes. More... | |
bool | operator!= (const Const_node_iterator< Link > &x) const |
A bidirectional iterator can be compared for inequality with a node iterator if they work on identical linkingmodes". More... | |
operator Const_node_iterator< Link > () const | |
Children of this iterator can be casted silently into a container iterator. More... | |
rank_type | rank () const |
Return the current Rank type used by the iterator. More... | |
dimension_type | dimension () const |
Return the current number of dimensions given by the Rank of the iterator. More... | |
Public Attributes | |
node_ptr | node |
The pointer to the current node. More... | |
dimension_type | node_dim |
The dimension of the current node. More... | |
A common template for constant bidirectional iterators that work on identical modes of linking.
This template defines all the basic features of a bidirectional iterator for this library.
Link | A type that is a model of Link Mode. |
Rank | The rank of the iterator. |
Definition at line 145 of file spatial_bidirectional.hpp.
typedef std::ptrdiff_t spatial::details::Const_bidirectional_iterator< Link, Rank >::difference_type |
The difference_type returned by the distance between 2 iterators.
Definition at line 156 of file spatial_bidirectional.hpp.
typedef Link::invariant_category spatial::details::Const_bidirectional_iterator< Link, Rank >::invariant_category |
The invariant category of the the iterator.
Definition at line 164 of file spatial_bidirectional.hpp.
typedef std::bidirectional_iterator_tag spatial::details::Const_bidirectional_iterator< Link, Rank >::iterator_category |
The iterator category that is always Bidirectional_iterator_tag
.
Definition at line 158 of file spatial_bidirectional.hpp.
typedef Link::const_node_ptr spatial::details::Const_bidirectional_iterator< Link, Rank >::node_ptr |
The type for the node pointed to by the iterator.
Definition at line 160 of file spatial_bidirectional.hpp.
typedef const Link::value_type* spatial::details::Const_bidirectional_iterator< Link, Rank >::pointer |
The pointer type of the object pointed to by the iterator.
Definition at line 154 of file spatial_bidirectional.hpp.
typedef Rank spatial::details::Const_bidirectional_iterator< Link, Rank >::rank_type |
The type of rank used by the iterator.
Definition at line 162 of file spatial_bidirectional.hpp.
typedef const Link::value_type& spatial::details::Const_bidirectional_iterator< Link, Rank >::reference |
The reference type of the object pointed to by the iterator.
Definition at line 152 of file spatial_bidirectional.hpp.
typedef mutate<typename Link::value_type>::type spatial::details::Const_bidirectional_iterator< Link, Rank >::value_type |
The value_type
can receive a copy of the reference pointed to be the iterator.
Definition at line 150 of file spatial_bidirectional.hpp.
spatial::details::Const_bidirectional_iterator< Link, Rank >::Const_bidirectional_iterator | ( | ) |
Build an uninitialized iterator.
Definition at line 167 of file spatial_bidirectional.hpp.
spatial::details::Const_bidirectional_iterator< Link, Rank >::Const_bidirectional_iterator | ( | const Rank & | rank_, |
node_ptr | node_, | ||
dimension_type | node_dim_ | ||
) |
Initialize the node at construction time.
Definition at line 170 of file spatial_bidirectional.hpp.
dimension_type spatial::details::Const_bidirectional_iterator< Link, Rank >::dimension | ( | ) | const |
Return the current number of dimensions given by the Rank of the iterator.
Definition at line 218 of file spatial_bidirectional.hpp.
spatial::details::Const_bidirectional_iterator< Link, Rank >::operator Const_node_iterator< Link > | ( | ) | const |
Children of this iterator can be casted silently into a container iterator.
You can therefore use this iterator as an argument to the other function of the container that are working on iterators.
Definition at line 206 of file spatial_bidirectional.hpp.
bool spatial::details::Const_bidirectional_iterator< Link, Rank >::operator!= | ( | const Const_node_iterator< Link > & | x | ) | const |
A bidirectional iterator can be compared for inequality with a node iterator if they work on identical linkingmodes".
x | The iterator on the right. |
Definition at line 198 of file spatial_bidirectional.hpp.
reference spatial::details::Const_bidirectional_iterator< Link, Rank >::operator* | ( | ) |
Returns the reference to the value pointed to by the iterator.
Definition at line 175 of file spatial_bidirectional.hpp.
pointer spatial::details::Const_bidirectional_iterator< Link, Rank >::operator-> | ( | ) |
Returns a pointer to the value pointed to by the iterator.
Definition at line 179 of file spatial_bidirectional.hpp.
bool spatial::details::Const_bidirectional_iterator< Link, Rank >::operator== | ( | const Const_node_iterator< Link > & | x | ) | const |
A bidirectional iterator can be compared with a node iterator if they work on identical linking modes.
x | The iterator on the right. |
Definition at line 188 of file spatial_bidirectional.hpp.
rank_type spatial::details::Const_bidirectional_iterator< Link, Rank >::rank | ( | ) | const |
Return the current Rank type used by the iterator.
Definition at line 212 of file spatial_bidirectional.hpp.
node_ptr spatial::details::Const_bidirectional_iterator< Link, Rank >::node |
The pointer to the current node.
Modifying this attribute can potentially invalidate the iterator. Do not modify this attribute unless you know what you're doing. This iterator must always point to a valid node in the tree or to the end.
Definition at line 228 of file spatial_bidirectional.hpp.
dimension_type spatial::details::Const_bidirectional_iterator< Link, Rank >::node_dim |
The dimension of the current node.
Modifying this attribute can potentially invalidate the iterator. Do not modify this attribute unless you know what you're doing. This iterator must always point to a valid node in the tree or to the end.
Definition at line 237 of file spatial_bidirectional.hpp.