quick start:g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_dstr_a #include <Tree.h> TreeNode<TObject>* getRoot() const; TreeNode<TObject>* insert(TObject* obj); boolean insertChild(TreeNode<TObject>* pnode, TreeNode<TObject>* cnode); boolean remove(); boolean remove(TObject*& obj); boolean find(const TObject* obj); boolean find(const TreeNode<TObject>* node); boolean contains(const TObject* obj) const; boolean contains(const TreeNode<TObject>* node) const; boolean get(Vector<Ulong>& root_adj, SingleLinkedList<TObject>& node_obj, SingleLinkedList<Vector<Ulong> >& node_adj); boolean set(Vector<Ulong>& root_adj, SingleLinkedList<TObject>& node_obj, SingleLinkedList<Vector<Ulong> >& node_adj); DstrBase::ALLOCATION getAllocationMode() const; boolean setAllocationMode(DstrBase::ALLOCATION alloc); boolean postorderTreeTraversal(SingleLinkedList<TreeNode<TObject> >& arg); boolean preorderTreeTraversal(SingleLinkedList<TreeNode<TObject> >& arg); boolean inorderTreeTraversal(SingleLinkedList<TreeNode<TObject> >& arg); boolean levelorderTreeTraversal(SingleLinkedList<TreeNode<TObject> >& arg);
description:Char* char_a = new Char('a'); Char* char_b = new Char('b'); Tree<Char> tree_00; tree_00.insertChild(tree_00.getRoot(), tree_00.insert(char_a)); tree_00.insertChild(tree_00.getRoot(), tree_00.insert(char_b)); delete char_a; delete char_b;
static const String CLASS_NAME;
static const String DEF_PARAM;
DstrBase::ALLOCATION alloc_d;
TreeNode<TObject> root_d;
static Integral::DEBUG debug_level_d;
static MemoryManager mgr_d;
static const String& name();
static boolean setDebug(Integral::DEBUG debug_level);
boolean debug(const unichar* msg) const;
~Tree();
Tree(DstrBase::ALLOCATION alloc = DstrBase::DEF_ALLOCATION);
Tree(const Tree<TObject>& copy_Tree);
not present.
boolean assign(const Tree<TObject>& copy_stack);
Tree<TObject>& operator=(const Tree<TObject>& arg);
long sofSize() const;
boolean read(Sof& sof, long tag);
boolean write(Sof& sof, long tag) const;
boolean read(Sof& sof, long tag, const String& name);
boolean write(Sof& sof, long tag, const String& name) const;
boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = true);
boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;
boolean eq(const Tree<TObject>& arg) const;
static void* operator new(size_t size);
static void* operator new[](size_t size);
static void operator delete(void* ptr);
static void operator delete[](void* ptr);
static boolean setGrowSize(long grow_size);
boolean clear(Integral::CMODE cmode = Integral::DEF_CMODE);
TreeNode<TObject>* getRoot() const;
TreeNode<TObject>* insert(TObject* obj);
boolean insertChild(TreeNode<TObject>* pnode, TreeNode<TObject>* cnode);
boolean remove();
boolean remove(TObject*& obj);
boolean find(const TObject* obj);
boolean find(const TreeNode<TObject>* node);
boolean contains(const TObject* obj) const;
boolean contains(const TreeNode<TObject>* node) const;
boolean get(Vector<Ulong>& root_adj, SingleLinkedList<TObject>& node_obj, SingleLinkedList<Vector<Ulong> >& node_adj);
boolean set(Vector<Ulong>& root_adj, SingleLinkedList<TObject>& node_obj, SingleLinkedList<Vector<Ulong> >& node_adj);
DstrBase::ALLOCATION getAllocationMode() const;
boolean setAllocationMode(DstrBase::ALLOCATION alloc);
boolean postorderTreeTraversal(SingleLinkedList<TreeNode<TObject> >& arg);
boolean preorderTreeTraversal(SingleLinkedList<TreeNode<TObject> >& arg);
boolean inorderTreeTraversal(SingleLinkedList<TreeNode<TObject> >& arg);
boolean levelorderTreeTraversal(SingleLinkedList<TreeNode<TObject> >& arg);
using DoubleLinkedList< TreeNode<TObject> >::length;
using DoubleLinkedList< TreeNode<TObject> >::gotoFirst;
using DoubleLinkedList< TreeNode<TObject> >::gotoNext;
using DoubleLinkedList< TreeNode<TObject> >::gotoPrev;
using DoubleLinkedList< TreeNode<TObject> >::getCurr;
using DoubleLinkedList< TreeNode<TObject> >::getFirst;
using DoubleLinkedList< TreeNode<TObject> >::getLast;
using DoubleLinkedList< TreeNode<TObject> >::gotoMark;
using DoubleLinkedList< TreeNode<TObject> >::setMark;
using DoubleLinkedList< TreeNode<TObject> >::gotoPosition;
using DoubleLinkedList< TreeNode<TObject> >::getPosition;
using DoubleLinkedList< TreeNode<TObject> >::isLast;
using DoubleLinkedList< TreeNode<TObject> >::isEmpty;
using DoubleLinkedList< TreeNode<TObject> >::isMarkedElement;
boolean postorderTreeIterator(Stack<TreeNode<TObject> >& stack);
boolean preorderTreeIterator(Stack<TreeNode<TObject> >& stack);
boolean inorderTreeIterator(TreeNode<TObject>* parent, Queue<TreeNode<TObject> >& queue);
boolean levelorderTreeIterator(SingleLinkedList<TreeNode<TObject> >& arg, Queue<TreeNode<TObject> >& queue);
template <class TObject_diagnose> friend class TreeDiagnose;