Spatial C++ Library
Generic Multi-Dimensional Containers and Spatial Operations
spatial::details::Const_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 const Link::value_type & reference
 
typedef const Link::value_type * pointer
 
typedef std::ptrdiff_t difference_type
 
typedef std::bidirectional_iterator_tag iterator_category
 
typedef Link::const_node_ptr node_ptr
 

Public Member Functions

 Const_node_iterator ()
 Create an uninintialized iterator. More...
 
 Const_node_iterator (node_ptr x)
 Build and assign an interator to a link pointer. More...
 
 Const_node_iterator (const iterator &it)
 Convert an iterator into a constant iterator. 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 Const_node_iterator< Link > Self
 
typedef Node_iterator< Link > iterator
 

Detailed Description

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

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

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

Template Parameters
LinkThe linking mode for the node.

Definition at line 616 of file spatial_node.hpp.

Member Typedef Documentation

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

Definition at line 622 of file spatial_node.hpp.

template<typename Link>
typedef Node_iterator<Link> spatial::details::Const_node_iterator< Link >::iterator
private

Definition at line 628 of file spatial_node.hpp.

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

Definition at line 623 of file spatial_node.hpp.

template<typename Link>
typedef Link::const_node_ptr spatial::details::Const_node_iterator< Link >::node_ptr

Definition at line 624 of file spatial_node.hpp.

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

Definition at line 621 of file spatial_node.hpp.

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

Definition at line 620 of file spatial_node.hpp.

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

Definition at line 627 of file spatial_node.hpp.

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

Definition at line 619 of file spatial_node.hpp.

Constructor & Destructor Documentation

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

Create an uninintialized iterator.

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

Definition at line 633 of file spatial_node.hpp.

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

Build and assign an interator to a link pointer.

Definition at line 637 of file spatial_node.hpp.

template<typename Link>
spatial::details::Const_node_iterator< Link >::Const_node_iterator ( const iterator it)

Convert an iterator into a constant iterator.

Definition at line 640 of file spatial_node.hpp.

Member Function Documentation

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

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

Definition at line 673 of file spatial_node.hpp.

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

Dereferance the iterator: return the value of the node.

Definition at line 643 of file spatial_node.hpp.

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

Moves the iterator to the next node in inorder transversal.

Definition at line 651 of file spatial_node.hpp.

template<typename Link>
Self spatial::details::Const_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 656 of file spatial_node.hpp.

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

Moves the iterator to the previous node in inorder transversal.

Definition at line 660 of file spatial_node.hpp.

template<typename Link>
Self spatial::details::Const_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 665 of file spatial_node.hpp.

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

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

Definition at line 647 of file spatial_node.hpp.

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

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

Definition at line 669 of file spatial_node.hpp.

Member Data Documentation

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

The node pointed to by the iterator.

Definition at line 677 of file spatial_node.hpp.


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