home *** CD-ROM | disk | FTP | other *** search
-
- /* ------ CONTENTS ------ */
-
- /* the xl#? inheriting class hierarchy by Leif_Salomonsson@swipnet.se */
- /* 990930 */
- /* listheader (xl#?) is NOT compatible with Exec List Headers */
- /* nodes ARE compatible with mln */
- /* check it out! :) */
- /* id like betatesters and examplewriters!! :) */
- /* !!emailware!! */
-
-
- xl./OBJECT xn
- xl./OBJECT xl_CPObj
- xl.first()
- xl.last()
- xl.addFirst()
- xl.addLast()
- xl.remFirst()
- xl.remLast()
- xl.remove()
- xl.insert()
- xl.count()
- xl.removeFastDisposeAll()
- xl.removeFastDispose()
- xl.addLastFastNew()
- xl.cloneFastNew()
- xl.fromExecList()
- xl.listInsert()
- xl.listAddFirst()
- xl.listAddLast()
- xl.trav()
- xl.travRev()
- xli./OBJECT xni
- xli./OBJECT xli_CPObj
- xli.ordInsert()
- xli.sort()
- xli.getSumID()
- xli.getMinID()
- xli.getMaxID()
- xli.find()
- xli.cmpMap()
- xli.scroll()
-
- ----------------------
-
- xl./xn
-
- OBJECT xn
- next
- prev
- ENDOBJECT
-
-
- xl./xl_CPObj
-
- OBJECT xl_CPObj
- node
- list
- ENDOBJECT
-
-
- xl.first()
-
- NAME
- first()
- SYNOPSIS
- firstnode := xl.first()
- FUNCTION
- Get first node in list or NIL IF empty.
- RESULT
- PTR TO xn
-
-
- xl.last()
-
- NAME
- last()
- SYNOPSIS
- lastnode := xl.last()
- FUNCTION
- Get last node in list or NIL IF empty.
- RESULT
- PTR TO xn
-
- xl.addFirst()
-
- NAME
- addFirst()
- SYNOPSIS
- addednode := xl.addFirst(xn:PTR TO xn)
- FUNCTION
- See exec.library/AddHead()
-
-
- xl.addLast()
-
- NAME
- addLast()
- SYNOPSIS
- addednode := xl.addLast(xn:PTR TO xn)
- FUNCTION
- See exec.library/AddTail()
-
- xl.remFirst()
-
- NAME
- remFirst()
- SYNOPSIS
- remednode := xl.remFirst()
- FUNCTION
- See exec.library/RemHead()
-
- xl.remLast()
-
- NAME
- remLast()
- SYNOPSIS
- remednode := xl.remLast()
- FUNCTION
- See exec.library/RemTail()
-
-
- xl.addLast()
-
- NAME
- addLast()
- SYNOPSIS
- addednode := xl.addLast(xn:PTR TO xn)
- FUNCTION
- See exec.library/addTail()
-
-
- xl.remove()
-
- NAME
- remove()
- SYNOPSIS
- remednode := xl.remove(xn:PTR TO xn)
- FUNCTION
- See exec.library/Remove()
-
-
- xl.insert()
-
- NAME
- insert()
- SYNOPSIS
- addednode := xl.insert(xn:PTR TO xn)
- FUNCTION
- See exec.library/Insert()
-
-
- xl.count()
-
- NAME
- count()
- SYNOPSIS
- nrofnodes := xl.count()
- FUNCTION
- Get the number of nodes in list, NIL if empty.
-
-
- xl.removeFastDisposeAll()
-
- NAME
- removeFastDisposeAll()
- SYNOPSIS
- xl.removeFastDisposeAll(nodesize)
- FUNCTION
- removes and frees (FastDispose) all nodes in list.
- NOTES
- all nodes must ofcource have the same size
-
-
- xl.removeFastDispose()
-
- NAME
- removeFastDispose()
- SYNOPSIS
- xl.removeFastDispose(xn:PTR TO xn, nodesize)
- FUNCTION
- removes and frees (FastDispose)a node in list.
-
-
- xl.addLastFastNew()
-
- NAME
- addLastFastNew()
- SYNOPSIS
- xl.addLastFastNew(nodesize)
- FUNCTION
- Allocates (FastNew) and adds a node to the list.
- RESULT
- PTR TO xn
-
-
- xl.cloneFastNew()
-
- NAME
- cloneFastNew()
- SYNOPSIS
- clonedlist := xl.cloneFastNew(nodesize)
- FUNCTION
- Makes an exact copy of this list.
- RESULT
- PTR TO xl
-
-
- xl.fromExecList()
-
- NAME
- fromExecList()
- SYNOPSIS
- xl.fromExecList(execlistheader:PTR TO lh)
- FUNCTION
- Make xl point to nodes in an ExecList (lh/mlh)
- NOTES
- xl must be emty before doing this or all old
- nodes is lost! Be real careful with what methods
- u use when obtaining an execlist! :)
-
-
- xl.looseNodes()
-
- NAME
- looseNodes()
- SYNOPSIS
- xl.looseNodes()
- FUNCTION
- Make this list loose connection with its
- nodes. Useful if u have attached an execlist
- to it and want to get rid of it. the list
- will be completely empty.
-
-
- xl.listInsert()
-
- NAME
- listInsert()
- SYNOPSIS
- xl.listInsert(list:PTR TO xl, afterthis:PTR TO xn)
- FUNCTION
- Inserts a lists nodes into this.
-
-
- xl.listAddFirst()
-
- NAME
- listAddFirst()
- SYNOPSIS
- xl.listAddFirst(list:PTR TO xl)
- FUNCTION
- Inserts a lists nodes into this. At the top.
-
-
- xl.listAddLast()
-
- NAME
- listAddLast()
- SYNOPSIS
- xl.listAddLast(list:PTR TO xl)
- FUNCTION
- Inserts a lists nodes into this. At the bottom.
-
-
- xl.trav()
-
- NAME
- trav()
- SYNOPSIS
- xl.trav(proc, cpobj:PTR TO xl_CPObj)
- FUNCTION
- This method calls proc for each node in the list
- passing cpobj to the procedure.
-
-
- xl.travRev()
-
- NAME
- travRev()
- SYNOPSIS
- xl.travRev(proc, cpobj:PTR TO xl_CPObj)
- FUNCTION
- Same as trav() except the traversing starts
- from the bottom of the list.
-
-
- xli./xni
-
- OBJECT xni OF xn
- id
- ENDOBJECT
-
- xli./xli_CPObj
-
- OBJECT xli_CPObj OF xl_CPObj
- ENDOBJECT
-
-
- xli.ordInsert()
-
- NAME
- ordInsert()
- SYNOPSIS
- xli.ordInsert(xni:PTR TO xni)
- FUNCTION
- Insert node in list. Position depends
- on the xni.id field. Lowest value on top.
- RESULT
- PTR TO xni
-
-
- xli.sort()
-
- NAME
- sort()
- SYNOPSIS
- xli.sort()
- FUNCTION
- Sort nodes by ID. lowest on top.
- RESULT
- NONE
- NOTES
- Simple bubblesort for the moment.
-
-
- xli.getSumID()
-
- NAME
- getSumID()
- SYNOPSIS
- sumid := xli.getSumID()
- FUNCTION
- Returns the sum of all xni.id fields in list.
-
-
- xli.getMinID()
-
- NAME
- getMinID()
- SYNOPSIS
- minid := xli.getMinID()
- FUNCTION
- Returns the lowest value on xni.id fields in list.
-
-
- xli.getMaxID()
-
- NAME
- getMaxID()
- SYNOPSIS
- maxid := xli.getMaxID()
- FUNCTION
- Returns the highest value on xni.id fields in list.
-
-
- xli.find()
-
- NAME
- find()
- SYNOPSIS
- node := xli.find(id, startnode=NIL)
- FUNCTION
- Finds a node in list with the requested id.
- If startnode is specified then search starts
- from there.
- RESULT
- PTR TO xni or NIL if not found.
-
-
- xli.cmpMap()
-
- NAME
- cmpMap()
- SYNOPSIS
- bool := xli.cmpMap(xli:PTR TO xli)
- FUNCTION
- Checks if the lists are mapped the same way.
- RESULT
- TRUE if equal or FALSE.
- NOTES
- The lists MUST be sorted before using this!
- (If u havent been clever using ordInsert())
- (speed and simplicity issue)
- SEE ALSO
- xli.sort(), xli.ordInsert()
-
-
- xli.scroll()
-
- NAME
- scroll()
- SYNOPSIS
- xli.scroll(amount)
- FUNCTION
- Scrolls all nodes by index (ID).
- What it does is adding or subtracting
- the xni.id variabel on all nodes in list.
- NOTES
- amount may be negative.
-
-
-
-