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

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

#include <tree.h>

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

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

Private Member Functions

void down ()
void up ()
void bottom ()
 下がれるところまで下がる


Friends

class tree

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


Constructor & Destructor Documentation

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

Definition at line 457 of file tree.h.

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

00457 {}

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

Definition at line 458 of file tree.h.

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


Member Function Documentation

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

Definition at line 449 of file tree.h.

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

00449                                                   {
00450                     BOOST_ASSERT( cur_ && self() );
00451                     return const_post_order_iterator( self()->begin() );
00452                 }

Here is the call graph for this function:

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

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

Definition at line 405 of file tree.h.

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

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

00405                               {
00406                     while ( self()->begin() != self()->end() ) {
00407                         down();
00408                     }
00409                 }

Here is the call graph for this function:

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

Definition at line 425 of file tree.h.

References gslib::sapling::tree< Value, Allocator >::is_begin(), gslib::sapling::tree< Value, Allocator >::is_root_end(), gslib::sapling::tree< Value, Allocator >::node::parent(), gslib::sapling::tree< Value, Allocator >::iterator_base::self(), and gslib::sapling::tree< Value, Allocator >::const_post_order_iterator::up().

00425                                  {
00426                     while ( false == is_root_end( cur_ ) && is_begin( cur_ ) ) {
00427                         //  先頭である限り上がり続ける
00428                         up();
00429                     }
00430                     if ( 0 != self()->parent() ) {
00431                         iterator_base::link_prev();
00432                     }
00433                 }

Here is the call graph for this function:

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

Definition at line 395 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_post_order_iterator::bottom().

00395                             {
00396                     cur_ = self()->begin();
00397                 }

Here is the call graph for this function:

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

Definition at line 454 of file tree.h.

00454                                                 {
00455                     return *this;
00456                 }

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

Definition at line 411 of file tree.h.

References gslib::sapling::tree< Value, Allocator >::const_post_order_iterator::bottom(), gslib::sapling::tree< Value, Allocator >::is_end(), gslib::sapling::tree< Value, Allocator >::is_root_end(), and gslib::sapling::tree< Value, Allocator >::const_post_order_iterator::up().

00411                                  {
00412                     iterator_base::link_next();
00413                     if ( is_root_end( cur_ ) ) {
00414                         //  何もしない
00415                         return;
00416                     } else if ( is_end( cur_ ) ) {
00417                         //  終端まで来たので上がる
00418                         up();
00419                         return;
00420                     }
00421                     //  下がれるところまで下がる
00422                     bottom();
00423                 }

Here is the call graph for this function:

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

Definition at line 439 of file tree.h.

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

00439                                                  {
00440                     BOOST_ASSERT( cur_ && self() );
00441                     return const_post_order_iterator( self()->next() );
00442                 }

Here is the call graph for this function:

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

Definition at line 434 of file tree.h.

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

00434                                                    {
00435                     BOOST_ASSERT( cur_ && self() );
00436                     return const_post_order_iterator( get_parent( cur_ ) );
00437                 }

Here is the call graph for this function:

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

Definition at line 444 of file tree.h.

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

00444                                                  {
00445                     BOOST_ASSERT( cur_ && self() );
00446                     return const_post_order_iterator( self()->prev() );
00447                 }

Here is the call graph for this function:

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

Definition at line 398 of file tree.h.

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

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

00398                           {
00399                     cur_ = get_parent( cur_ );
00400                 }

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 402 of file tree.h.


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