#include <SUIT_DataObjectIterator.h>
Public Types | |
enum | DetourType { DepthLeft, DepthRight, BreadthLeft, BreadthRight, User } |
Public Member Functions | |
SUIT_DataObjectIterator (SUIT_DataObject *root, const int det, const bool fromTrueRoot=false) | |
virtual void | operator++ () |
SUIT_DataObject * | current () const |
int | depth () const |
int | detour () const |
Protected Member Functions | |
SUIT_DataObject * | parent (SUIT_DataObject *) const |
SUIT_DataObject * | extreme (DataObjectList &, bool FromLeft) const |
SUIT_DataObject * | globalSibling (SUIT_DataObject *, bool next) const |
Protected Attributes | |
SUIT_DataObject * | myRoot |
SUIT_DataObject * | myCurrent |
Private Attributes | |
SUIT_DataObject * | myExtremeChild |
int | myDetourType |
QList< int > | myChildrenIndexes |
! Indexes of the iterated children at each level (optimization for avoid indexOf call) More... | |
Provides functionality of SUIT tree detour It is possible to use "to-depth" or "to-breadth" detour and to control level detour (from left or from right)
Provides functionality of SUIT tree detour between certain levels Only "to-breadth" detour is used
SUIT_DataObjectIterator::SUIT_DataObjectIterator | ( | SUIT_DataObject * | root, |
const int | det, | ||
const bool | fromTrueRoot = false |
||
) |
Constructor.
References myCurrent, myExtremeChild, myRoot, and SUIT_DataObject::root().
SUIT_DataObject * SUIT_DataObjectIterator::current | ( | ) | const |
Gets current data object.
References myCurrent.
int SUIT_DataObjectIterator::depth | ( | ) | const |
Gets depth of current lavel.
References myChildrenIndexes.
int SUIT_DataObjectIterator::detour | ( | ) | const |
Gets detour type.
References myDetourType.
|
protected |
Gets first or last data object from list. Get firls, if FromLeft == true, else last.
|
protected |
Gets global sibling for object obj
References extreme(), for(), SUIT_DataObject::myChildren, and parent().
|
virtual |
Increment operator.
Reimplemented in SUIT_DataObjectLevelIterator.
References BreadthLeft, BreadthRight, DepthLeft, DepthRight, extreme(), globalSibling(), SUIT_DataObject::myChildren, myChildrenIndexes, myCurrent, myDetourType, myExtremeChild, and parent().
|
protected |
Gets parent for object obj.
References myRoot, and SUIT_DataObject::parent().
|
private |
|
protected |
|
private |
|
private |
|
protected |