TLinkedTree

From Ultibo.org
Revision as of 05:29, 31 May 2018 by Ultibo (Talk | contribs) (Created page with "Return to Unit UltiboClasses __TOC__ === Description === ---- ''To be documented'' === Class definitions === ---- <div class="toccolours mw-colla...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Return to Unit UltiboClasses


Description


To be documented

Class definitions



TLinkedTree = class(TObject)

Note: A Tree of TTreeObjects with automatic Prev/Next etc Links

Linked Tree which does not Free nodes on Destroy

 
constructor Create;  
destructor Destroy; override;  
private
FCount:Integer;  
FFirst:TTreeObject;  
FLast:TTreeObject;  
function GetCount:Integer;  
function Link(AValue,AParent:TTreeObject):Boolean;  
function LinkEx(APrev,AValue,AParent:TTreeObject):Boolean;  
function Unlink(AValue:TTreeObject):Boolean;  
public
property Count:Integer read GetCount;  
property Root:TTreeObject read FFirst;  
property First:TTreeObject read FFirst;  
property Last:TTreeObject read FLast;  
function Add(AValue,AParent:TTreeObject):Boolean; virtual;  
function Remove(AValue:TTreeObject):Boolean; virtual;  
function Insert(APrev,AValue,AParent:TTreeObject):Boolean; virtual;  
procedure Move(AValue,AParent:TTreeObject); virtual;  
procedure Clear; virtual;  
function FirstChild(AParent:TTreeObject):TTreeObject;  
function LastChild(AParent:TTreeObject):TTreeObject;  


Function declarations



constructor TLinkedTree.Create;
Description: To be documented
Note None documented


destructor TLinkedTree.Destroy;
Description: To be documented
Note None documented


function TLinkedTree.GetCount:Integer;
Description: To be documented
Note None documented


function TLinkedTree.Link(AValue,AParent:TTreeObject):Boolean;
Description: To be documented
Note None documented


function TLinkedTree.LinkEx(APrev,AValue,AParent:TTreeObject):Boolean;
Description: Link AValue after APrev Sibling and Adjust FirstChild/LastChild/Prev/Next
Note If APrev is nil then Link as first child in parent or first value if Parent is nil


function TLinkedTree.Unlink(AValue:TTreeObject):Boolean;
Description: To be documented
Note None documented


function TLinkedTree.Add(AValue,AParent:TTreeObject):Boolean;
Description: Add AValue to List and Link with Parent and Siblings
Note None documented


function TLinkedTree.Remove(AValue:TTreeObject):Boolean;
Description: Unlink AValue from Parent and Siblings, Remove from List
Note None documented


function TLinkedTree.Insert(APrev,AValue,AParent:TTreeObject):Boolean;
Description: To be documented
Note None documented


procedure TLinkedTree.Move(AValue,AParent:TTreeObject);
Description: To be documented
Note None documented


procedure TLinkedTree.Clear;
Description: To be documented
Note None documented


function TLinkedTree.FirstChild(AParent:TTreeObject):TTreeObject;
Description: To be documented
Note None documented


function TLinkedTree.LastChild(AParent:TTreeObject):TTreeObject;
Description: To be documented
Note None documented


Return to Unit Reference