diff options
-rw-r--r-- | tree/src/cNode.cpp | 23 | ||||
-rw-r--r-- | tree/src/cNode.h | 24 | ||||
-rw-r--r-- | tree/src/cTree.cpp | 6 |
3 files changed, 0 insertions, 53 deletions
diff --git a/tree/src/cNode.cpp b/tree/src/cNode.cpp index beec425..8340367 100644 --- a/tree/src/cNode.cpp +++ b/tree/src/cNode.cpp @@ -66,11 +66,6 @@ cData* cDatanode::search(string _search) return NULL; }//search -bool cDatanode::isEnd() -{ - return false; -}//isEnd - void cDatanode::getSortet(list<cData>* _list) { nextSmaller->getSortet(_list); @@ -78,14 +73,6 @@ void cDatanode::getSortet(list<cData>* _list) nextBigger->getSortet(_list); }//getSorte -void cDatanode::clear() -{ - delete nextSmaller; - delete nextBigger; - nextSmaller = new cEndnode(); - nextBigger = new cEndnode(); -} - void cDatanode::draw(int _depth) { for (int i = 0; i <= _depth; i++) @@ -103,11 +90,6 @@ void cDatanode::draw(int _depth) cEndnode::cEndnode() {} cEndnode::~cEndnode() {} -bool cEndnode::isEnd() -{ - delete this; - return true; -} cData cEndnode::getDataObject() { @@ -135,11 +117,6 @@ void cEndnode::getSortet(list<cData>* _list) return; } -void cEndnode::clear() -{ - return; -} - void cEndnode::draw(int _depth) { for (int i = 0; i <= _depth; i++) diff --git a/tree/src/cNode.h b/tree/src/cNode.h index 3ee46e2..561e094 100644 --- a/tree/src/cNode.h +++ b/tree/src/cNode.h @@ -36,21 +36,11 @@ public: /* * Searches for a Object by its Primary Key, returns pointer pointing at result (NULL if no result) */ - virtual bool isEnd() = 0; - /* - * returns false - * TODO Remove - */ virtual void getSortet(list<cData>* _list) = 0; /* * gets sortet list */ - virtual void clear() = 0; - /* - * TODO Remove - */ - virtual void draw(int _depth) = 0; }; @@ -76,18 +66,10 @@ public: /* * Searches for a Object by its Primary Key, returns pointer pointing at result (NULL if no result) */ - bool isEnd(); - /* - * returns false - */ void getSortet(list<cData>* _list); /* * Copy all cData Instances into _list */ - void clear(); - /* - * clears the tree - */ void draw(int _depth); private: cNode *nextSmaller, *nextBigger; @@ -117,14 +99,8 @@ public: /* * Searches for a Object by its Primary Key, returns pointer pointing at result (NULL if no result) */ - bool isEnd(); - /* - * returns false - */ void getSortet(list<cData>* _list); - void clear(); - void draw(int _depth); private: }; diff --git a/tree/src/cTree.cpp b/tree/src/cTree.cpp index 32c7179..6b6cfa4 100644 --- a/tree/src/cTree.cpp +++ b/tree/src/cTree.cpp @@ -34,12 +34,6 @@ void cTree::remove(cData* _data) root->remove(_data, &dataList, &root); insertList(&dataList); - ///TODO: Optimize!!! - /*while(!dataList.empty()) - { - insert(dataList.front().clone()); - dataList.pop_front(); - }*/ } void cTree::getList(list<cData>* _list) |