|
The Gravy Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--OObject
|
+--Observer
|
+--Model
|
+--ListModel
|
+--DequeModel
This class encapsulates a data model for Stacks
and Queues. The "stack" is built within a dequeue
such that up/down do not change the queue itself.
Author: Bruce Wallace (PolyGlotInc.com)
Defined in mvc.js
Version: 1.0
| Constructor Summary | |
DequeModel
()
|
|
| Method Summary | |
void
|
_cutback()
pseudo-Stack API: throw away items above top of pseudo-stack |
Object
|
_down()
pseudo-Stack API: non-destructive pop |
void
|
_reset( )
clear the queue and reset the pseudo-stack but dont publish |
Object
|
_up()
pseudo-Stack API: non-destructive push/get |
Object
|
addFirst(o)
DEQUE API: add given object to back of the line |
Object
|
addLast(o)
DEQUE API: add given object to front of the line |
Object
|
delFirst( )
DEQUE API: remove object from back of the line |
Object
|
delLast( )
DEQUE API: remove object from front of the line |
Object
|
dequeue( )
QUEUE API: remove object from front of the line |
Object
|
downIndex()
pseudo-Stack API: return index of next down iff we can go down |
Object
|
enqueue(o)
QUEUE API: add given object to back of the line |
void
|
konstructor( <String> optName )
|
Object
|
pop( )
STACK API: remove given object from front of the line aka top of the stack |
Object
|
push(o)
STACK API: push given object to front of the line aka top of the stack |
Object
|
top(offset)
pseudo-Stack API: return the top of the pseudo-stack |
Object
|
upIndex()
pseudo-Stack API: return index of next up iff we can go up |
| Methods inherited from class ListModel |
dump, _pop, _push, getCount, getItem, getItemStr, addItem, reset, iterate, addBefore
|
| Methods inherited from class Model |
dumpSubscribers, toString, dirty, clean, neverChanged, publish, GET, _SET, SET, updateStamp, BeginTransaction, EndTransaction, addObserver, delObserver, notifyObservers
|
| Methods inherited from class Observer |
update, subscribe
|
| Constructor Detail |
DequeModel()
| Method Detail |
void _cutback()
Object _down()
void _reset( )
Object _up()
Object addFirst(o)
Object addLast(o)
Object delFirst( )
Object delLast( )
Object dequeue( )
Object downIndex()
Object enqueue(o)
void konstructor( <String> optName )
optName - optional name of this instance
Object pop( )
Object push(o)
Object top(offset)
Object upIndex()
|
The Gravy Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||