Inferno
0.2
|
Iterator for Walk. More...
#include <walk.hpp>
Classes | |
struct | StateEntry |
Public Types | |
typedef forward_iterator_tag | iterator_category |
typedef TreePtrInterface | value_type |
typedef int | difference_type |
typedef const value_type * | pointer |
typedef const value_type & | reference |
Public Member Functions | |
Walk_iterator (const Walk_iterator &other) | |
virtual shared_ptr < ContainerInterface::iterator_interface > | Clone () const |
virtual Walk_iterator & | operator++ () |
virtual reference | operator* () const |
virtual pointer | operator-> () const |
virtual bool | operator== (const ContainerInterface::iterator_interface &ib) const |
virtual bool | operator!= (const ContainerInterface::iterator_interface &ib) const |
virtual void | Overwrite (pointer v) const |
virtual const bool | IsOrdered () const |
operator string () const | |
virtual void | AdvanceOver () |
virtual void | AdvanceInto () |
Walk_iterator () | |
Walk_iterator (TreePtr< Node > &root, Filter *out_filter=NULL, Filter *recurse_filter=NULL) | |
Protected Member Functions | |
virtual void | DoNodeFilter () |
bool | IsAtEndOfChildren () const |
void | BypassEndOfChildren () |
virtual shared_ptr < ContainerInterface > | GetChildContainer (TreePtr< Node > n) const |
void | Push (TreePtr< Node > n) |
Protected Attributes | |
shared_ptr< TreePtr< Node > > | root |
Filter * | out_filter |
Filter * | recurse_filter |
stack< StateEntry > | state |
bool | done |
typedef int Walk_iterator::difference_type |
typedef forward_iterator_tag Walk_iterator::iterator_category |
typedef const value_type* Walk_iterator::pointer |
typedef const value_type& Walk_iterator::reference |
Walk_iterator::Walk_iterator | ( | const Walk_iterator & | other | ) |
Walk_iterator::Walk_iterator | ( | TreePtr< Node > & | root, |
Filter * | out_filter = NULL , |
||
Filter * | recurse_filter = NULL |
||
) |
Definition at line 182 of file walk.cpp.
References DoNodeFilter().
void Walk_iterator::AdvanceInto | ( | ) | [virtual] |
Definition at line 221 of file walk.cpp.
References AdvanceOver(), ASSERT, BypassEndOfChildren(), done, IsAtEndOfChildren(), Filter::IsMatch(), Push(), and recurse_filter.
Referenced by DoNodeFilter(), and operator++().
void Walk_iterator::AdvanceOver | ( | ) | [virtual] |
Definition at line 256 of file walk.cpp.
References ASSERT, BypassEndOfChildren(), done, IsAtEndOfChildren(), and state.
Referenced by AdvanceInto().
void Walk_iterator::BypassEndOfChildren | ( | ) | [protected] |
Definition at line 154 of file walk.cpp.
References ASSERT, done, IsAtEndOfChildren(), and state.
Referenced by AdvanceInto(), and AdvanceOver().
shared_ptr< ContainerInterface::iterator_interface > Walk_iterator::Clone | ( | ) | const [virtual] |
Definition at line 274 of file walk.cpp.
References Walk_iterator().
void Walk_iterator::DoNodeFilter | ( | ) | [protected, virtual] |
Definition at line 336 of file walk.cpp.
References AdvanceInto(), done, Filter::IsMatch(), and out_filter.
Referenced by operator++(), and Walk_iterator().
shared_ptr< ContainerInterface > Walk_iterator::GetChildContainer | ( | TreePtr< Node > | n | ) | const [protected, virtual] |
bool Walk_iterator::IsAtEndOfChildren | ( | ) | const [protected] |
Definition at line 144 of file walk.cpp.
References ASSERT, done, and state.
Referenced by AdvanceInto(), AdvanceOver(), BypassEndOfChildren(), operator*(), and Overwrite().
const bool Walk_iterator::IsOrdered | ( | ) | const [virtual] |
virtual bool Walk_iterator::operator!= | ( | const ContainerInterface::iterator_interface & | ib | ) | const [inline, virtual] |
Definition at line 73 of file walk.hpp.
References operator==().
Walk_iterator::reference Walk_iterator::operator* | ( | ) | const [virtual] |
Definition at line 287 of file walk.cpp.
References ASSERT, done, IsAtEndOfChildren(), root, and state.
Referenced by operator->().
Walk_iterator & Walk_iterator::operator++ | ( | ) | [virtual] |
Definition at line 280 of file walk.cpp.
References AdvanceInto(), and DoNodeFilter().
Walk_iterator::pointer Walk_iterator::operator-> | ( | ) | const [virtual] |
Definition at line 302 of file walk.cpp.
References operator*().
bool Walk_iterator::operator== | ( | const ContainerInterface::iterator_interface & | ib | ) | const [virtual] |
void Walk_iterator::Overwrite | ( | Walk_iterator::pointer | v | ) | const [virtual] |
void Walk_iterator::Push | ( | TreePtr< Node > | n | ) | [protected] |
Definition at line 174 of file walk.cpp.
References Walk_iterator::StateEntry::container, GetChildContainer(), Walk_iterator::StateEntry::iterator, and state.
Referenced by AdvanceInto().
bool Walk_iterator::done [protected] |
Definition at line 100 of file walk.hpp.
Referenced by AdvanceInto(), AdvanceOver(), BypassEndOfChildren(), DoNodeFilter(), IsAtEndOfChildren(), operator*(), operator==(), and Overwrite().
Filter* Walk_iterator::out_filter [protected] |
Definition at line 92 of file walk.hpp.
Referenced by DoNodeFilter().
Filter* Walk_iterator::recurse_filter [protected] |
Definition at line 93 of file walk.hpp.
Referenced by AdvanceInto().
shared_ptr< TreePtr<Node> > Walk_iterator::root [protected] |
Definition at line 91 of file walk.hpp.
Referenced by operator*(), and Overwrite().
stack< StateEntry > Walk_iterator::state [protected] |
Definition at line 99 of file walk.hpp.
Referenced by AdvanceOver(), BypassEndOfChildren(), IsAtEndOfChildren(), operator string(), operator*(), Overwrite(), and Push().