Qt 4.8
|
A helper class that iterates a tree of Expression instances. It is not a sub-class of QAbstractXmlForwardIterator. More...
#include <qoperandsiterator_p.h>
Public Types | |
enum | TreatParent { ExcludeParent, IncludeParent } |
Public Functions | |
Expression::Ptr | next () |
Returns the current Expression and advances the iterator. More... | |
OperandsIterator (const Expression::Ptr &start, const TreatParent treatParent) | |
Expression::Ptr | skipOperands () |
Private Types | |
typedef QPair< Expression::List, int > | Level |
Properties | |
QStack< Level > | m_exprs |
A helper class that iterates a tree of Expression instances. It is not a sub-class of QAbstractXmlForwardIterator.
The OperandsIterator delivers all Expression instances that are children at any depth of the Expression passed in the constructor. The order is delivered in a defined way, from left to right and depth first.
Definition at line 77 of file qoperandsiterator_p.h.
|
private |
The second value, the int, is the current position in the first.
Definition at line 82 of file qoperandsiterator_p.h.
|
inline |
if treatParent
is IncludeParent
, start
is excluded.
start
must be a valid Expression.
Definition at line 96 of file qoperandsiterator_p.h.
|
inline |
Returns the current Expression and advances the iterator.
If the end has been reached, a default constructed pointer is returned.
We intentionally return by reference.
Definition at line 118 of file qoperandsiterator_p.h.
Referenced by QPatternist::Expression::dependencies(), QPatternist::ExpressionFactory::registerLastPath(), skipOperands(), and QPatternist::EvaluationCache< IsForGlobal >::typeCheck().
|
inline |
Advances this iterator by the current expression and its operands.
Definition at line 165 of file qoperandsiterator_p.h.
Referenced by QPatternist::ExpressionFactory::registerLastPath().
Definition at line 185 of file qoperandsiterator_p.h.
Referenced by next(), OperandsIterator(), and skipOperands().