MADARA
3.1.8
|
Implementation of the ExpressionTreeIterator pattern that is used to define the various iterations algorithms that can be performed to traverse the expression tree. More...
#include <IteratorImpl.h>
Public Types | |
typedef int | difference_type |
typedef ::std::forward_iterator_tag | iterator_category |
= Necessary traits More... | |
typedef int * | pointer |
typedef int & | reference |
typedef madara::knowledge::KnowledgeRecord | value_type |
Public Member Functions | |
ExpressionTreeIteratorImpl (const ExpressionTree &tree) | |
Construct an ExpressionTreeIteratorImpl to iterate over a tree. More... | |
virtual | ~ExpressionTreeIteratorImpl (void) |
Dtor. More... | |
virtual ExpressionTreeIteratorImpl * | clone (void)=0 |
Method for cloning an impl. Necessary for post increments. More... | |
virtual bool | operator!= (const ExpressionTreeIteratorImpl &rhs) const =0 |
Nonequality operator. More... | |
virtual ExpressionTree | operator* (void)=0 |
Dereference operator returns a reference to the item contained at the current position. More... | |
virtual const ExpressionTree | operator* (void) const =0 |
Returns a const reference to the item contained at the current position. More... | |
virtual void | operator++ (void)=0 |
Increment operator (used for both pre- and post-increment). More... | |
virtual bool | operator== (const ExpressionTreeIteratorImpl &rhs) const =0 |
Equality operator. More... | |
Protected Attributes | |
const ExpressionTree & | tree_ |
The tree we are iterating over. More... | |
Friends | |
class | ExpressionTreeIterator |
Implementation of the ExpressionTreeIterator pattern that is used to define the various iterations algorithms that can be performed to traverse the expression tree.
Plays the role of the "implementor" base class in the Bridge pattern that is used as the basis for the subclasses that actually define the various iteration algorithms.
Definition at line 41 of file IteratorImpl.h.
Definition at line 79 of file IteratorImpl.h.
typedef ::std::forward_iterator_tag madara::expression::ExpressionTreeIteratorImpl::iterator_category |
= Necessary traits
Definition at line 75 of file IteratorImpl.h.
Definition at line 77 of file IteratorImpl.h.
Definition at line 78 of file IteratorImpl.h.
typedef madara::knowledge::KnowledgeRecord madara::expression::ExpressionTreeIteratorImpl::value_type |
Definition at line 76 of file IteratorImpl.h.
madara::expression::ExpressionTreeIteratorImpl::ExpressionTreeIteratorImpl | ( | const ExpressionTree & | tree | ) |
Construct an ExpressionTreeIteratorImpl to iterate over a tree.
Definition at line 17 of file IteratorImpl.cpp.
|
virtual |
Dtor.
Definition at line 25 of file IteratorImpl.cpp.
|
pure virtual |
Method for cloning an impl. Necessary for post increments.
Implemented in madara::expression::LevelOrderExpressionTreeIteratorImpl, madara::expression::PostOrderIteratorImpl, madara::expression::PreOrderIteratorImpl, and madara::expression::InOrderIteratorImpl.
|
pure virtual |
Nonequality operator.
Implemented in madara::expression::LevelOrderExpressionTreeIteratorImpl, madara::expression::PostOrderIteratorImpl, madara::expression::PreOrderIteratorImpl, and madara::expression::InOrderIteratorImpl.
|
pure virtual |
Dereference operator returns a reference to the item contained at the current position.
Implemented in madara::expression::LevelOrderExpressionTreeIteratorImpl, madara::expression::PostOrderIteratorImpl, madara::expression::PreOrderIteratorImpl, and madara::expression::InOrderIteratorImpl.
|
pure virtual |
Returns a const reference to the item contained at the current position.
Implemented in madara::expression::LevelOrderExpressionTreeIteratorImpl, madara::expression::PostOrderIteratorImpl, madara::expression::PreOrderIteratorImpl, and madara::expression::InOrderIteratorImpl.
|
pure virtual |
Increment operator (used for both pre- and post-increment).
Implemented in madara::expression::LevelOrderExpressionTreeIteratorImpl, madara::expression::PostOrderIteratorImpl, madara::expression::PreOrderIteratorImpl, and madara::expression::InOrderIteratorImpl.
|
pure virtual |
|
friend |
Definition at line 43 of file IteratorImpl.h.
|
protected |
The tree we are iterating over.
Definition at line 83 of file IteratorImpl.h.