list
Section: OATH Reference Manual (3O)
Updated: 26 August 1991
Index
Return to Main Contents
NAME
list (listA, listG) - an ordered collection with arbitrary insertion/deletion
SYNOPSIS
#include <oath/list.h>
DESCRIPTION
The list is a deq in which objs can be inserted or removed at an position,
specified by a listPos. The listPos, a companion class to list, is a pos
which can be moved both forward and backward in the list.
The default insertion and removal on list is FIFO (list is a fifoQueue).
This is consistent with the general list concept: if you add an item
to a to-do list or a shopping list, you generally add it to the end; if
you look for the next item on one of those lists, you generally look at
the top of the list.
DERIVATION
list : deq : fifoQueue : seq : queue : bag : obj
list is an abstract type.
STATIC OPERATIONS
- listA listA:: isa (objA)
-
listA::isa(O) returns O if it is truly a list; otherwise it
returns Nil.
MEMBER OPERATIONS
- listPosA listA:: makePos (int = 0, int = FALSE)
-
L.makePos(I) makes and returns a listPos that indicates the I'th position in
list L (I=0 is the first position).
If the last argument is TRUE, then the new listPos is const.
- listA listA:: insert (listPosA, objA)
-
L.insert(P, O) inserts obj O into list L at position P, and then returns L.
Depending upon the type of L, O may fall through or be transformed.
It is an error if P is not a position in L.
- objA listA:: remove (listPosA)
-
L.remove(P) removes and returns the obj in front of the position P.
It is an error if P is not a position in L.
- listA listA:: extract (listPosA)
-
L.extract(P) removes the obj in front of the position P and returns L.
It is an error if P is not a position in L.
- listA listA:: extractX (listPosA, objA&)
-
L.extractX(P, O) sets O to access the obj in front of position P, removes
that obj from list L, and then returns L.
It is an error if P is not a position in L.
INTERNAL OPERATIONS
- virtual void listG:: insertList (const listPosG*, const objG*)
-
G->insertList(P, O) inserts obj O into list G in front of listPos P.
- virtual const objG* listG:: removeList (const listPosG*)
-
G->removeList(P) removes and returns the obj in front of position P.
SEE ALSO
OATH(3O), deq(3O), listPos(3O)
AUTHOR
Brian M. Kennedy (Computer Science Center, Texas Instruments Incorporated)
BUGS
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- DERIVATION
-
- STATIC OPERATIONS
-
- MEMBER OPERATIONS
-
- INTERNAL OPERATIONS
-
- SEE ALSO
-
- AUTHOR
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 20:37:48 GMT, July 24, 2024