Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator Class Reference

#include <tree.h>

Inheritance diagram for gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator:

Inheritance graph
[legend]
Collaboration diagram for gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void increment ()
void decrement ()
const_pre_order_iterator parent ()
const_pre_order_iterator next ()
const_pre_order_iterator prev ()
const_pre_order_iterator begin ()
const_pre_order_iterator end ()
 const_pre_order_iterator ()
 const_pre_order_iterator (const value_holder *lnk)

Private Member Functions

void down_front ()
void down_back ()
void up ()
void bottom_back ()
 下がれるところまで下がる


Friends

class tree

template<typename Value, typename Allocator = std::allocator< void >>
class gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator


Constructor & Destructor Documentation

template<typename Value, typename Allocator = std::allocator< void >>
gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::const_pre_order_iterator  )  [inline]
 

Definition at line 536 of file tree.h.

Referenced by gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::begin(), gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::next(), gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::parent(), and gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::prev().

00536 {}

template<typename Value, typename Allocator = std::allocator< void >>
gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::const_pre_order_iterator const value_holder lnk  )  [inline]
 

Definition at line 537 of file tree.h.

00537 : iterator_base( const_cast< value_holder* >( lnk ) ) {}


Member Function Documentation

template<typename Value, typename Allocator = std::allocator< void >>
const_pre_order_iterator gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::begin  )  [inline]
 

Definition at line 528 of file tree.h.

References gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::const_pre_order_iterator(), and gslib::sapling::tree< Value, Allocator >::iterator_base::self().

00528                                                  {
00529                     BOOST_ASSERT( cur_ && self() );
00530                     return const_pre_order_iterator( self()->begin() );
00531                 }

Here is the call graph for this function:

template<typename Value, typename Allocator = std::allocator< void >>
void gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::bottom_back  )  [inline, private]
 

下がれるところまで下がる

Definition at line 484 of file tree.h.

References gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::down_back(), and gslib::sapling::tree< Value, Allocator >::has_child().

Referenced by gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::decrement().

00484                                    {
00485                     while ( has_child( cur_ ) ) {
00486                         down_back();
00487                     }
00488                 }

Here is the call graph for this function:

template<typename Value, typename Allocator = std::allocator< void >>
void gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::decrement  )  [inline]
 

Definition at line 505 of file tree.h.

References gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::bottom_back(), gslib::sapling::tree< Value, Allocator >::is_begin(), gslib::sapling::tree< Value, Allocator >::is_root(), gslib::sapling::tree< Value, Allocator >::is_root_end(), and gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::up().

00505                                  {
00506                     if ( false == is_root_end( cur_ ) && ( is_root( cur_ ) || is_begin( cur_ ) ) ) {
00507                         up();
00508                     } else {
00509                         iterator_base::link_prev();
00510                         bottom_back();
00511                     }
00512                 }

Here is the call graph for this function:

template<typename Value, typename Allocator = std::allocator< void >>
void gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::down_back  )  [inline, private]
 

Definition at line 474 of file tree.h.

References gslib::sapling::tree< Value, Allocator >::node::end(), gslib::sapling::tree< Value, Allocator >::node::prev(), and gslib::sapling::tree< Value, Allocator >::iterator_base::self().

Referenced by gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::bottom_back().

00474                                  {
00475                     cur_ = self()->end()->prev();
00476                 }

Here is the call graph for this function:

template<typename Value, typename Allocator = std::allocator< void >>
void gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::down_front  )  [inline, private]
 

Definition at line 470 of file tree.h.

References gslib::sapling::tree< Value, Allocator >::node::begin(), and gslib::sapling::tree< Value, Allocator >::iterator_base::self().

Referenced by gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::increment().

00470                                   {
00471                     cur_ = self()->begin();
00472                 }

Here is the call graph for this function:

template<typename Value, typename Allocator = std::allocator< void >>
const_pre_order_iterator gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::end  )  [inline]
 

Definition at line 533 of file tree.h.

00533                                                {
00534                     return *this;
00535                 }

template<typename Value, typename Allocator = std::allocator< void >>
void gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::increment  )  [inline]
 

Definition at line 490 of file tree.h.

References gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::down_front(), gslib::sapling::tree< Value, Allocator >::has_child(), gslib::sapling::tree< Value, Allocator >::is_end(), gslib::sapling::tree< Value, Allocator >::is_root_end(), and gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::up().

00490                                  {
00491                     if ( is_root_end( cur_ ) ) {
00492                         iterator_base::link_next();
00493                     } else if ( has_child( cur_ ) ) {
00494                         down_front();
00495                     } else {
00496                         iterator_base::link_next();
00497                         while ( false == is_root_end( cur_ ) && is_end( cur_ ) ) {
00498                             //  終端である限り上がり続ける
00499                             up();
00500                             iterator_base::link_next();
00501                         }
00502                     }
00503                 }

Here is the call graph for this function:

template<typename Value, typename Allocator = std::allocator< void >>
const_pre_order_iterator gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::next  )  [inline]
 

Definition at line 518 of file tree.h.

References gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::const_pre_order_iterator(), and gslib::sapling::tree< Value, Allocator >::iterator_base::self().

00518                                                 {
00519                     BOOST_ASSERT( cur_ && self() );
00520                     return const_pre_order_iterator( self()->next() );
00521                 }

Here is the call graph for this function:

template<typename Value, typename Allocator = std::allocator< void >>
const_pre_order_iterator gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::parent  )  [inline]
 

Definition at line 513 of file tree.h.

References gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::const_pre_order_iterator(), gslib::sapling::tree< Value, Allocator >::get_parent(), and gslib::sapling::tree< Value, Allocator >::iterator_base::self().

00513                                                   {
00514                     BOOST_ASSERT( cur_ && self() );
00515                     return const_pre_order_iterator( get_parent( cur_ ) );
00516                 }

Here is the call graph for this function:

template<typename Value, typename Allocator = std::allocator< void >>
const_pre_order_iterator gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::prev  )  [inline]
 

Definition at line 523 of file tree.h.

References gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::const_pre_order_iterator(), and gslib::sapling::tree< Value, Allocator >::iterator_base::self().

00523                                                 {
00524                     BOOST_ASSERT( cur_ && self() );
00525                     return const_pre_order_iterator( self()->prev() );
00526                 }

Here is the call graph for this function:

template<typename Value, typename Allocator = std::allocator< void >>
void gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::up  )  [inline, private]
 

Definition at line 477 of file tree.h.

References gslib::sapling::tree< Value, Allocator >::get_parent().

Referenced by gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::decrement(), and gslib::sapling::tree< Value, Allocator >::const_pre_order_iterator::increment().

00477                           {
00478                     cur_ = get_parent( cur_ );
00479                 }

Here is the call graph for this function:


Friends And Related Function Documentation

template<typename Value, typename Allocator = std::allocator< void >>
friend class tree [friend]
 

Reimplemented from gslib::sapling::tree< Value, Allocator >::iterator_base.

Definition at line 481 of file tree.h.


The documentation for this class was generated from the following file:
Generated on Sat Nov 27 15:03:38 2004 for sapling by doxygen 1.3.6