Skip to content
Snippets Groups Projects
Commit 44ba916e authored by Jan Möbius's avatar Jan Möbius
Browse files

Added empty function for BaseObjectData last

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4049 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a3014775
No related branches found
No related tags found
No related merge requests found
...@@ -208,6 +208,46 @@ bool BaseObject::visible() { ...@@ -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() { BaseObject* BaseObject::next() {
// Visit child item of this node // Visit child item of this node
if ( childItems_.size() > 0 ) { if ( childItems_.size() > 0 ) {
...@@ -241,6 +281,9 @@ BaseObject* BaseObject::next() { ...@@ -241,6 +281,9 @@ BaseObject* BaseObject::next() {
} }
// ===============================================================================
// ===============================================================================
int BaseObject::level() { int BaseObject::level() {
int level = 0; int level = 0;
BaseObject* current = this; BaseObject* current = this;
......
...@@ -258,6 +258,10 @@ class DLLEXPORT BaseObject { ...@@ -258,6 +258,10 @@ class DLLEXPORT BaseObject {
public: 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) /** Get the next item of the tree (Preorder traversal of the tree)
*/ */
BaseObject* next(); BaseObject* next();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment