- Joined
- Sep 26, 2009
- Messages
- 9,534
I'm getting: "Member redeclared: allocate" whenever I try to implement into an array struct. Have you thoroughly tested it?
Member redeclared: allocate
static method allocate takes nothing returns thistype
method deallocate takes nothing returns nothing
static method createNode takes nothing returns thistype
local thistype this=allocate()
static method alloc takes nothing returns thistype
method dealloc takes nothing returns nothing
static method createNode takes nothing returns thistype
local thistype this=alloc()
//or this
static method pizza takes nothing returns thistype
method eatme takes nothing returns nothing
static method createNode takes nothing returns thistype
local thistype this=pizza()
method insertNode takes thistype toInsert returns nothing
set this.next.prev=toInsert
set toInsert.next=this.next
set this.next=toInsert
set toInsert.prev=this
endmethod
method insertNode takes thistype toInsert returns nothing
set this.prev.next=toInsert
set toInsert.prev=this.prev
set this.prev=toInsert
set toInsert.next=this
endmethod
this.prev.insertNode(toInsert)
//This method joins two lists or two heads together without breaking it (do not merge loose nodes)
static method mergeNode takes thistype toMergeWith returns nothing
set this.next.prev = toMergeWith.prev
set toMergeWith.prev.next = this.next
set this.next = toMergeWith
set toMergeWith.prev = this
endmethod
method insertBefore takes thistype toInsert returns nothing
set this.prev.next=toInsert
set toInsert.prev=this.prev
set this.prev=toInsert
set toInsert.next=this
endmethod
/* optional insertBefore method
method insertBefore takes thistype toInsert returns nothing
call this.prev.insertNode(toInsert)
endmethod
*/