Overview | File | Class | Tree | Index | Help
| The Gravey Framework and RATS RIA
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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()

Version: 2.0
Author: Bruce Wallace (PolyGlotInc.com)

Method Detail

### _cutback

    void _cutback()

pseudo-Stack API: throw away items above top of pseudo-stack

### _down

    Object _down()

pseudo-Stack API: non-destructive pop

### _reset

    void _reset( )

clear the queue and reset the pseudo-stack but dont publish

### _up

    Object _up()

pseudo-Stack API: non-destructive push/get

### addFirst

    Object addFirst(o)

DEQUE API: add given object to back of the line

Returns:

item

### addLast

    Object addLast(o)

DEQUE API: add given object to front of the line

Returns:

item

### delFirst

    Object delFirst( )

DEQUE API: remove object from back of the line

Returns:

item

### delLast

    Object delLast( )

DEQUE API: remove object from front of the line

Returns:

item

### dequeue

    Object dequeue( )

QUEUE API: remove object from front of the line

Returns:

item

### downIndex

    Object downIndex()

pseudo-Stack API: return index of next down iff we can go down

### enqueue

    Object enqueue(o)

QUEUE API: add given object to back of the line

Returns:

item

### konstructor

    void konstructor( <String> optName )

Parameters:

`optName` - optional name of this instance

### pop

    Object pop( )

STACK API: remove given object from front of the line aka top of the stack

Returns:

item

### push

    Object push(o)

STACK API: push given object to front of the line aka top of the stack

Returns:

item

### top

    Object top(offset)

pseudo-Stack API: return the top of the pseudo-stack

### upIndex

    Object upIndex()

pseudo-Stack API: return index of next up iff we can go up

Overview | File | Class | Tree | Index | Help
| The Gravey Framework and RATS RIA
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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