|
MADARA
3.1.8
|
Iterates through an ExpressionTree in in-order. More...
#include <IteratorImpl.h>


Public Types | |
| typedef int | difference_type |
| typedef ::std::forward_iterator_tag | iterator_category |
| typedef int * | pointer |
| typedef int & | reference |
| typedef madara::knowledge::KnowledgeRecord | value_type |
Public Member Functions | |
| InOrderIteratorImpl (const ExpressionTree &tree, bool end_iter=false) | |
| Construct an InOrderIteratorImpl. More... | |
| virtual | ~InOrderIteratorImpl (void) |
| Dtor. More... | |
| virtual ExpressionTreeIteratorImpl * | clone (void) |
| Method for cloning an impl. Necessary for post increments. More... | |
| virtual bool | operator!= (const ExpressionTreeIteratorImpl &lhs) const |
| Nonequality operator. More... | |
| virtual ExpressionTree | operator* (void) |
| Dereference operator returns a reference to the item contained at the current position. More... | |
| virtual const ExpressionTree | operator* (void) const |
| Returns a const reference to the item contained at the current position. More... | |
| virtual void | operator++ (void) |
| Increment operator (used for both pre- and post-increment). More... | |
| virtual bool | operator== (const ExpressionTreeIteratorImpl &rhs) const |
| Equality operator. More... | |
Protected Attributes | |
| const ExpressionTree & | tree_ |
| The tree we are iterating over. More... | |
Private Attributes | |
| madara::utility::LStack< ExpressionTree > | stack_ |
| Our current position in the iteration. More... | |
Friends | |
| class | ExpressionTreeIterator |
| class | utility::Refcounter< ExpressionTreeIteratorImpl > |
Iterates through an ExpressionTree in in-order.
Plays the role of the "implementor" class in the Bridge pattern that defines the in-order iteration algorithm.
Definition at line 93 of file IteratorImpl.h.
Definition at line 134 of file IteratorImpl.h.
| typedef ::std::forward_iterator_tag madara::expression::InOrderIteratorImpl::iterator_category |
Definition at line 130 of file IteratorImpl.h.
| typedef int* madara::expression::InOrderIteratorImpl::pointer |
Definition at line 132 of file IteratorImpl.h.
| typedef int& madara::expression::InOrderIteratorImpl::reference |
Definition at line 133 of file IteratorImpl.h.
Definition at line 131 of file IteratorImpl.h.
| madara::expression::InOrderIteratorImpl::InOrderIteratorImpl | ( | const ExpressionTree & | tree, |
| bool | end_iter = false |
||
| ) |
Construct an InOrderIteratorImpl.
If end_iter is set to true, the iterator points to the end of the tree. Otherwise, the iterator starts with a free tree.
If end_iter is set to true, the iterator points to the end of the tree
Definition at line 32 of file IteratorImpl.cpp.
|
virtual |
|
virtual |
Method for cloning an impl. Necessary for post increments.
Method for cloning an impl.
Necessary for post increments (bridge)
Implements madara::expression::ExpressionTreeIteratorImpl.
Definition at line 160 of file IteratorImpl.cpp.
|
virtual |
Nonequality operator.
checks two iterators for inequality
Implements madara::expression::ExpressionTreeIteratorImpl.
Definition at line 150 of file IteratorImpl.cpp.
|
virtual |
Dereference operator returns a reference to the item contained at the current position.
Returns the Node that the iterator is pointing to (non-const version)
Implements madara::expression::ExpressionTreeIteratorImpl.
Definition at line 58 of file IteratorImpl.cpp.
|
virtual |
Returns a const reference to the item contained at the current position.
Returns the Node that the iterator is pointing to (const version)
Implements madara::expression::ExpressionTreeIteratorImpl.
Definition at line 66 of file IteratorImpl.cpp.
|
virtual |
Increment operator (used for both pre- and post-increment).
moves the iterator to the next node (pre-increment)
Implements madara::expression::ExpressionTreeIteratorImpl.
Definition at line 74 of file IteratorImpl.cpp.
|
virtual |
Equality operator.
checks two iterators for equality
Implements madara::expression::ExpressionTreeIteratorImpl.
Definition at line 100 of file IteratorImpl.cpp.
|
friend |
Definition at line 95 of file IteratorImpl.h.
|
friend |
Definition at line 96 of file IteratorImpl.h.
|
private |
Our current position in the iteration.
Definition at line 138 of file IteratorImpl.h.
|
protectedinherited |
The tree we are iterating over.
Definition at line 83 of file IteratorImpl.h.