ModuleInfo "Version: 1.07"
ModuleInfo "Author: Mark Sibly"
ModuleInfo "License: zlib/libpng"
ModuleInfo "Copyright: Blitz Research Ltd"
ModuleInfo "Modserver: BRL"
ModuleInfo "History: 1.07 Release"
ModuleInfo "History: Changed Reverse to maintain TLink stability"
ModuleInfo "History: 1.06 Release"
ModuleInfo "History: Added optional CompareFunc parameter to Sort"
ModuleInfo "History: 1.05 Release"
ModuleInfo "History: Sort now swaps links instead of values"
import brl.blitz
CompareObjects%(o1:Object,o2:Object)="brl_linkedlist_CompareObjects"
TLink^Object{
._value:Object&
._succ:TLink&
._pred:TLink&
-New%()="_brl_linkedlist_TLink_New"
-Delete%()="_brl_linkedlist_TLink_Delete"
-Value:Object()="_brl_linkedlist_TLink_Value"
-NextLink:TLink()="_brl_linkedlist_TLink_NextLink"
-PrevLink:TLink()="_brl_linkedlist_TLink_PrevLink"
-Remove%()="_brl_linkedlist_TLink_Remove"
}="brl_linkedlist_TLink"
TListEnum^Object{
._link:TLink&
-New%()="_brl_linkedlist_TListEnum_New"
-Delete%()="_brl_linkedlist_TListEnum_Delete"
-HasNext%()="_brl_linkedlist_TListEnum_HasNext"
-NextObject:Object()="_brl_linkedlist_TListEnum_NextObject"
}="brl_linkedlist_TListEnum"
TList^Object{
._head:TLink&
-New%()="_brl_linkedlist_TList_New"
-Delete%()="_brl_linkedlist_TList_Delete"
-_pad%()="_brl_linkedlist_TList__pad"
-Clear%()="_brl_linkedlist_TList_Clear"
-IsEmpty%()="_brl_linkedlist_TList_IsEmpty"
-Contains%(value:Object)="_brl_linkedlist_TList_Contains"
-AddFirst:TLink(value:Object)="_brl_linkedlist_TList_AddFirst"
-AddLast:TLink(value:Object)="_brl_linkedlist_TList_AddLast"
-First:Object()="_brl_linkedlist_TList_First"
-Last:Object()="_brl_linkedlist_TList_Last"
-RemoveFirst:Object()="_brl_linkedlist_TList_RemoveFirst"
-RemoveLast:Object()="_brl_linkedlist_TList_RemoveLast"
-FirstLink:TLink()="_brl_linkedlist_TList_FirstLink"
-LastLink:TLink()="_brl_linkedlist_TList_LastLink"
-InsertBeforeLink:TLink(value:Object,succ:TLink)="_brl_linkedlist_TList_InsertBeforeLink"
-InsertAfterLink:TLink(value:Object,pred:TLink)="_brl_linkedlist_TList_InsertAfterLink"
-FindLink:TLink(value:Object)="_brl_linkedlist_TList_FindLink"
-ValueAtIndex:Object(index%)="_brl_linkedlist_TList_ValueAtIndex"
-Count%()="_brl_linkedlist_TList_Count"
-Remove%(value:Object)="_brl_linkedlist_TList_Remove"
-Swap%(list:TList)="_brl_linkedlist_TList_Swap"
-Copy:TList()="_brl_linkedlist_TList_Copy"
-Reverse%()="_brl_linkedlist_TList_Reverse"
-Reversed:TList()="_brl_linkedlist_TList_Reversed"
-Sort%(ascending%=1,compareFunc%(o1:Object,o2:Object)="brl_linkedlist_CompareObjects")="_brl_linkedlist_TList_Sort"
-ObjectEnumerator:TListEnum()="_brl_linkedlist_TList_ObjectEnumerator"
-ToArray:Object&[]()="_brl_linkedlist_TList_ToArray"
+FromArray:TList(arr:Object&[])="_brl_linkedlist_TList_FromArray"
}="brl_linkedlist_TList"
CreateList:TList()="brl_linkedlist_CreateList"
ClearList%(list:TList)="brl_linkedlist_ClearList"
CountList%(list:TList)="brl_linkedlist_CountList"
ListIsEmpty%(list:TList)="brl_linkedlist_ListIsEmpty"
ListContains%(list:TList,value:Object)="brl_linkedlist_ListContains"
SortList%(list:TList,ascending%=1,compareFunc%(o1:Object,o2:Object)="brl_linkedlist_CompareObjects")="brl_linkedlist_SortList"
ListFromArray:TList(arr:Object&[])="brl_linkedlist_ListFromArray"
ListToArray:Object&[](list:TList)="brl_linkedlist_ListToArray"
SwapLists%(list_x:TList,list_y:TList)="brl_linkedlist_SwapLists"
ReverseList%(list:TList)="brl_linkedlist_ReverseList"
ListFindLink:TLink(list:TList,value:Object)="brl_linkedlist_ListFindLink"
ListAddLast:TLink(list:TList,value:Object)="brl_linkedlist_ListAddLast"
ListAddFirst:TLink(list:TList,value:Object)="brl_linkedlist_ListAddFirst"
ListRemove%(list:TList,value:Object)="brl_linkedlist_ListRemove"
RemoveLink%(link:TLink)="brl_linkedlist_RemoveLink"
