The Gravey Framework and RATS RIA

Class MVCDequeModel

Object
   |
   +--GrvObject
         |
         +--MVCObserver
               |
               +--MVCModel
                     |
                     +--MVCListModel
                           |
                           +--MVCDequeModel
Direct Known Subclasses:
MVCUndoRedoModel

class MVCDequeModel
extends MVCListModel


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.
Version: 2.0

Author: Bruce Wallace (PolyGlotInc.com)
Defined in grvMVC.js


Constructor Summary
MVCDequeModel ()
           
 
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 MVCListModel
clone, dump, hash, _pop, _push, _del, reset, getCount, getItem, getItemStr, addItem, delItem, iterate, addBefore, getMemento, setMemento
   
Methods inherited from class MVCModel
dumpSubscribers, toString, dirty, clean, publish, GET, _SET, SET, updateStamp, BeginTransaction, EndTransaction, addObserver, delObserver, notifyObservers
   
Methods inherited from class MVCObserver
update, subscribe
   
Methods inherited from class GrvObject
souper
 

Constructor Detail

MVCDequeModel

MVCDequeModel()

Method Detail

_cutback

void _cutback()

_down

Object _down()

_reset

void _reset( )

_up

Object _up()

addFirst

Object addFirst(o)

addLast

Object addLast(o)

delFirst

Object delFirst( )

delLast

Object delLast( )

dequeue

Object dequeue( )

downIndex

Object downIndex()

enqueue

Object enqueue(o)

konstructor

void konstructor( <String> optName )

pop

Object pop( )

push

Object push(o)

top

Object top(offset)

upIndex

Object upIndex()

The Gravey Framework and RATS RIA

Documentation generated by JSDoc on Thu Jan 6 12:46:18 2011