home *** CD-ROM | disk | FTP | other *** search
- |##########|
- |#MAGIC #|CKOLFLGB
- |#PROJECT #|""
- |#PATHS #|"StdProject"
- |#FLAGS #|xx---x--x---xxx-----------------
- |#USERSW #|--------------------------------
- |#USERMASK#|--------------------------------
- |#SWITCHES#|x----xxxxx-xx---
- |##########|
- DEFINITION MODULE OTrees;
-
- DEFINITION MODULE StdTrees(Tree : POINTER TO TreeObj);
-
- IMPORT OLists;
-
- DEFINITION MODULE TreeList = OLists.BiLists(Tree);
-
- FROM TreeList IMPORT Condition,ApplyProc;
-
- TYPE
- TreeObj = OBJECT OF TreeList.Node,
- TreeList.List;
- parent : Tree;
-
- CONSTRUCTOR Create;
- DESTRUCTOR Delete;
-
- METHOD InsertFirst(n : Tree);
- METHOD InsertLast(n : Tree);
- METHOD InsertAfter(n,after : Tree);
- METHOD InsertBefore(n,before : Tree);
-
- METHOD ApplyDepthFirst(before,between,after : ApplyProc := NIL);
- METHOD ApplyBreadthFirst(app : ApplyProc);
-
- |METHOD FindDepthFirst(if : Condition;from : Tree := NIL):Tree;
- |METHOD FindBreadthFirst(if : Condition;from : Tree := NIL):Tree;
-
- METHOD Clone():Tree;
- END;
-
- END StdTrees;
-
- END OTrees.
-
-