Spatial C++ Library
Generic Multi-Dimensional Containers and Spatial Operations
spatial::details::Node_iterator< Link > Class Template Reference

A bidirectional iterator traversing all node in the tree in inorder traversal. More...

#include <spatial_node.hpp>

Public Types

typedef mutate< typename Link::value_type >::type value_type
 
typedef Link::value_type & reference
 
typedef Link::value_type * pointer
 
typedef std::ptrdiff_t difference_type
 
typedef std::bidirectional_iterator_tag iterator_category
 
typedef Link::node_ptr node_ptr
 

Public Member Functions

 Node_iterator ()
 Create an uninintialized iterator. More...
 
 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...
 
Selfoperator++ ()
 Moves the iterator to the next node in inorder transversal. More...
 
Self operator++ (int)
 Moves the iterator to the next node in inorder transversal and returns the iterator value before the move. More...
 
Selfoperator-- ()
 Moves the iterator to the previous node in inorder transversal. More...
 
Self operator-- (int)
 Moves the iterator to the previous node in inorder 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 Node_iterator< Link > Self
 

Detailed Description

template<typename Link>
class spatial::details::Node_iterator< Link >

A bidirectional iterator traversing all node in the tree in inorder traversal.

This iterator provides mutable access to the nodes in the tree.

Template Parameters
LinkThe linking mode for the node.

Definition at line 549 of file spatial_node.hpp.

Member Typedef Documentation

template<typename Link >
typedef std::ptrdiff_t spatial::details::Node_iterator< Link >::difference_type

Definition at line 555 of file spatial_node.hpp.

template<typename Link >
typedef std::bidirectional_iterator_tag spatial::details::Node_iterator< Link >::iterator_category

Definition at line 556 of file spatial_node.hpp.

template<typename Link >
typedef Link::node_ptr spatial::details::Node_iterator< Link >::node_ptr

Definition at line 557 of file spatial_node.hpp.

template<typename Link >
typedef Link::value_type* spatial::details::Node_iterator< Link >::pointer

Definition at line 554 of file spatial_node.hpp.

template<typename Link >
typedef Link::value_type& spatial::details::Node_iterator< Link >::reference

Definition at line 553 of file spatial_node.hpp.

template<typename Link >
typedef Node_iterator<Link> spatial::details::Node_iterator< Link >::Self
private

Definition at line 560 of file spatial_node.hpp.

template<typename Link >
typedef mutate<typename Link::value_type>::type spatial::details::Node_iterator< Link >::value_type

Definition at line 552 of file spatial_node.hpp.

Constructor & Destructor Documentation

template<typename Link >
spatial::details::Node_iterator< Link >::Node_iterator ( )

Create an uninintialized iterator.

This iterator should not be used until is has been assigned.

Definition at line 565 of file spatial_node.hpp.

template<typename Link >
spatial::details::Node_iterator< Link >::Node_iterator ( node_ptr  x)
explicit

Build and assign an interator to a link pointer.

Definition at line 568 of file spatial_node.hpp.

Member Function Documentation

template<typename Link >
bool spatial::details::Node_iterator< Link >::operator!= ( const Self x) const

Check if 2 iterators are different: pointing at different nodes.

Definition at line 601 of file spatial_node.hpp.

template<typename Link >
reference spatial::details::Node_iterator< Link >::operator* ( )

Dereferance the iterator: return the value of the node.

Definition at line 571 of file spatial_node.hpp.

template<typename Link >
Self& spatial::details::Node_iterator< Link >::operator++ ( )

Moves the iterator to the next node in inorder transversal.

Definition at line 579 of file spatial_node.hpp.

template<typename Link >
Self spatial::details::Node_iterator< Link >::operator++ ( int  )

Moves the iterator to the next node in inorder transversal and returns the iterator value before the move.

Definition at line 584 of file spatial_node.hpp.

template<typename Link >
Self& spatial::details::Node_iterator< Link >::operator-- ( )

Moves the iterator to the previous node in inorder transversal.

Definition at line 588 of file spatial_node.hpp.

template<typename Link >
Self spatial::details::Node_iterator< Link >::operator-- ( int  )

Moves the iterator to the previous node in inorder transversal and returns the iterator value before the move.

Definition at line 593 of file spatial_node.hpp.

template<typename Link >
pointer spatial::details::Node_iterator< Link >::operator-> ( )

Dereferance the iterator: return the pointer to the value of the node.

Definition at line 575 of file spatial_node.hpp.

template<typename Link >
bool spatial::details::Node_iterator< Link >::operator== ( const Self x) const

Check if 2 iterators are equal: pointing at the same node.

Definition at line 597 of file spatial_node.hpp.

Member Data Documentation

template<typename Link >
node_ptr spatial::details::Node_iterator< Link >::node

The node pointed to by the iterator.

Definition at line 605 of file spatial_node.hpp.


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