00001 #ifndef StiDefaultMutableTreeNode_H 00002 #define StiDefaultMutableTreeNode_H 1 00003 00004 #include <Stiostream.h> 00005 #include <stdlib.h> 00006 #include "StiTreeNode.h" 00007 00008 00048 class StiTreeNode 00049 { 00050 public: 00051 00052 virtual ~StiTreeNode(){}; 00053 StiTreeNode(); 00054 const StiTreeNode& operator=(const StiTreeNode& node); 00055 00056 void reset(); 00057 void unset(){;} 00058 void remove(int childIndex) ; 00059 StiTreeNode *disconnect(int all=0); 00060 void cutTail(int direction) ; 00061 void setParent(StiTreeNode * newParent) ; 00062 StiTreeNode *getParent() const; 00063 StiTreeNode *getChildAt(int index) const; 00064 int getChildCount() const; 00065 void add(StiTreeNode *newChild,int direction); 00066 StiTreeNode *getNextNode() const; 00067 StiTreeNode *getPrevNode() const; 00068 StiTreeNode *getFirstNode() const; 00069 StiTreeNode *getLastNode() const; 00070 protected: 00071 StiTreeNode *parent; 00072 StiTreeNode *children[2]; 00073 00074 }; 00075 00076 00077 #endif 00078 00079
1.5.9