Spatial C++ Library
Generic Multi-Dimensional Containers and Spatial Operations
|
A forward iterator that iterates through the node of the container in preorder transversal. More...
#include <spatial_node.hpp>
Public Types | |
typedef mutate< typename Link::value_type >::type | value_type |
typedef const Link::value_type & | reference |
typedef const Link::value_type * | pointer |
typedef std::ptrdiff_t | difference_type |
typedef std::forward_iterator_tag | iterator_category |
typedef Link::const_node_ptr | node_ptr |
Public Member Functions | |
Preorder_node_iterator () | |
Create an uninintialized iterator. More... | |
Preorder_node_iterator (node_ptr x) | |
Build and assign an interator to a link pointer. More... | |
reference | operator* () |
Dereferance the iterator: return the value of the node. More... | |
pointer | operator-> () |
Dereferance the iterator: return the pointer to the value of the node. More... | |
Self & | operator++ () |
Moves the iterator to the next node in preorder transversal. More... | |
Self | operator++ (int) |
Moves the iterator to the next node in preorder transversal and returns the iterator value before the move. More... | |
bool | operator== (const Self &x) const |
Check if 2 iterators are equal: pointing at the same node. More... | |
bool | operator!= (const Self &x) const |
Check if 2 iterators are different: pointing at different nodes. More... | |
Public Attributes | |
node_ptr | node |
The node pointed to by the iterator. More... | |
Private Types | |
typedef Preorder_node_iterator< Link > | Self |
A forward iterator that iterates through the node of the container in preorder transversal.
It provides constant access to the node. It is used to clone the tree.
Link | The linking mode for the node. |
Definition at line 688 of file spatial_node.hpp.
typedef std::ptrdiff_t spatial::details::Preorder_node_iterator< Link >::difference_type |
Definition at line 693 of file spatial_node.hpp.
typedef std::forward_iterator_tag spatial::details::Preorder_node_iterator< Link >::iterator_category |
Definition at line 694 of file spatial_node.hpp.
typedef Link::const_node_ptr spatial::details::Preorder_node_iterator< Link >::node_ptr |
Definition at line 695 of file spatial_node.hpp.
typedef const Link::value_type* spatial::details::Preorder_node_iterator< Link >::pointer |
Definition at line 692 of file spatial_node.hpp.
typedef const Link::value_type& spatial::details::Preorder_node_iterator< Link >::reference |
Definition at line 691 of file spatial_node.hpp.
|
private |
Definition at line 698 of file spatial_node.hpp.
typedef mutate<typename Link::value_type>::type spatial::details::Preorder_node_iterator< Link >::value_type |
Definition at line 690 of file spatial_node.hpp.
spatial::details::Preorder_node_iterator< Link >::Preorder_node_iterator | ( | ) |
Create an uninintialized iterator.
This iterator should not be used until is has been assigned.
Definition at line 703 of file spatial_node.hpp.
|
explicit |
Build and assign an interator to a link pointer.
Definition at line 707 of file spatial_node.hpp.
bool spatial::details::Preorder_node_iterator< Link >::operator!= | ( | const Self & | x | ) | const |
Check if 2 iterators are different: pointing at different nodes.
Definition at line 731 of file spatial_node.hpp.
reference spatial::details::Preorder_node_iterator< Link >::operator* | ( | ) |
Dereferance the iterator: return the value of the node.
Definition at line 710 of file spatial_node.hpp.
Self& spatial::details::Preorder_node_iterator< Link >::operator++ | ( | ) |
Moves the iterator to the next node in preorder transversal.
Definition at line 718 of file spatial_node.hpp.
Self spatial::details::Preorder_node_iterator< Link >::operator++ | ( | int | ) |
Moves the iterator to the next node in preorder transversal and returns the iterator value before the move.
Definition at line 723 of file spatial_node.hpp.
pointer spatial::details::Preorder_node_iterator< Link >::operator-> | ( | ) |
Dereferance the iterator: return the pointer to the value of the node.
Definition at line 714 of file spatial_node.hpp.
bool spatial::details::Preorder_node_iterator< Link >::operator== | ( | const Self & | x | ) | const |
Check if 2 iterators are equal: pointing at the same node.
Definition at line 727 of file spatial_node.hpp.
node_ptr spatial::details::Preorder_node_iterator< Link >::node |
The node pointed to by the iterator.
Definition at line 735 of file spatial_node.hpp.