Commit 8f072a1c authored by Jan Möbius's avatar Jan Möbius

Added empty function for BaseObjectData last

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4049 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3a57f9cb
......@@ -208,6 +208,46 @@ bool BaseObject::visible() {
// ===============================================================================
// ===============================================================================
BaseObject* BaseObject::last() {
//indexOf
// // Visit child item of this node
// if ( childItems_.size() > 0 ) {
// return childItems_[0];
// }
//
// // No Child Item so visit the next child of the parentItem_
// if ( parentItem_ ) {
//
// BaseObject* parentPointer = parentItem_;
// BaseObject* thisPointer = this;
//
// // while we are not at the root node
// while ( parentPointer ) {
//
// // If there is an unvisited child of the parent, return this one
// if ( parentPointer->childCount() > ( thisPointer->row() + 1) ) {
// return parentPointer->childItems_[ thisPointer->row() + 1 ];
// }
//
// // Go to the next level
// thisPointer = parentPointer;
// parentPointer = parentPointer->parentItem_;
//
// }
//
// return thisPointer;
// }
//
// return this;
std::cerr << "Last not implemented yet! " << std::endl;
return 0;
}
// ===============================================================================
// ===============================================================================
BaseObject* BaseObject::next() {
// Visit child item of this node
if ( childItems_.size() > 0 ) {
......@@ -241,6 +281,9 @@ BaseObject* BaseObject::next() {
}
// ===============================================================================
// ===============================================================================
int BaseObject::level() {
int level = 0;
BaseObject* current = this;
......
......@@ -258,6 +258,10 @@ class DLLEXPORT BaseObject {
public:
/** Get the last item of the tree (Preorder traversal of the tree)
*/
BaseObject* last();
/** Get the next item of the tree (Preorder traversal of the tree)
*/
BaseObject* next();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment