Difference between revisions of "TLinkedList"
From Ultibo.org
								
												
				 (Created page with "Return to Unit UltiboClasses   __TOC__  === Description === ----  ''To be documented''  === Class definitions === ----   <div class="toccolours mw-colla...")  | 
				|||
| Line 82: | Line 82: | ||
=== Function declarations ===  | === Function declarations ===  | ||
----  | ----  | ||
| + | |||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">  | ||
Latest revision as of 05:26, 31 May 2018
Return to Unit UltiboClasses
Description
To be documented
Class definitions
TLinkedList = class(TObject)
| Note: A List of TListObjects with automatic .Prev/.Next Links
 Linked List which does not Free nodes on Destroy  | |
 constructor Create;
 | 
|
 destructor Destroy; override;
 | 
|
private 
 | |
 FCount:Integer;
 | 
|
 FFirst:TListObject;
 | 
|
 FLast:TListObject;
 | 
|
 function GetCount:Integer;
 | 
|
 function Link(AValue:TListObject):Boolean;
 | 
|
 function LinkEx(APrev,AValue:TListObject):Boolean;
 | 
|
 function Unlink(AValue:TListObject):Boolean;
 | 
|
public 
 | |
 property Count:Integer read GetCount;
 | 
|
 property First:TListObject read FFirst;
 | 
|
 property Last:TListObject read FLast;
 | 
|
 function Add(AValue:TListObject):Boolean; virtual;
 | 
|
 function Remove(AValue:TListObject):Boolean; virtual;
 | 
|
 function Insert(APrev,AValue:TListObject):Boolean; virtual;
 | 
|
 procedure Clear; virtual;
 | 
|
Function declarations
constructor TLinkedList.Create;
Description: To be documented
| Note | None documented | 
|---|
destructor TLinkedList.Destroy;
Description: To be documented
| Note | None documented | 
|---|
function TLinkedList.GetCount:Integer;
Description: To be documented
| Note | None documented | 
|---|
function TLinkedList.Link(AValue:TListObject):Boolean;
Description: Link AValue to Prev,Next Siblings and Adjust First/Last
| Note | None documented | 
|---|
function TLinkedList.LinkEx(APrev,AValue:TListObject):Boolean;
Description: Link AValue after APrev Sibling and Adjust First/Last/Prev/Next
| Note | If APrev is nil then Link as first value in list | 
|---|
function TLinkedList.Unlink(AValue:TListObject):Boolean;
Description: Unlink AValue from Prev,Next Siblings and Adjust First/Last
| Note | None documented | 
|---|
function TLinkedList.Add(AValue:TListObject):Boolean;
Description: Add AValue to List and link with Siblings
| Note | None documented | 
|---|
function TLinkedList.Remove(AValue:TListObject):Boolean;
Description: Unlink AValue from Siblings and Remove from List
| Note | None documented | 
|---|
function TLinkedList.Insert(APrev,AValue:TListObject):Boolean;
Description: To be documented
| Note | None documented | 
|---|
procedure TLinkedList.Clear;
Description: To be documented
| Note | None documented | 
|---|
Return to Unit Reference