The Gravey 2.0 Framework

Class MVCListModel

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

class MVCListModel
extends MVCModel


This class encapsulates a data model for a List of objects. This class implements the MVCCollection interface.
Version: 2.0

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


Constructor Summary
MVCListModel ()
           
 
Method Summary
 Object _del(i)
           delete given index from list
 Object _pop( )
           pop top item off list but dont publish
 int _push(o)
           push item onto list but dont publish
 Object _reset( )
           clear list and update timestamp but dont publish
 void addBefore(i,o)
           add the given object into the list just before the given zero-based-index
 int addItem(o)
           push given item onto list and publish
 MVCListModel clone()
           return a (deep) clone of "this" object.
 Object delItem(i)
           delete given index from list and publish
 String dump()
           debug method to return this list as a string
 int getCount( )
           return count of items in list
 Object getItem(i)
           return item in list with given index
 String getItemStr(i)
           return item in list with given index as formatted string
 Object getMemento()
           return a memento of the current state of "this"
 int hash()
           provide a "unique" number based on the state of this list NOTE: the quality of this hash code depends on the quality of the hash code provided by each list item.
 void iterate(<Function> f)
           iterate thru items in list calling specified function
 void konstructor( <String> optName )
          
 Object reset( )
           clear list and publish
 void setMemento(<Object> m)
           update "this" based on the given memento
 
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, souper_, isInstanceOf
 

Constructor Detail

MVCListModel

MVCListModel()

Method Detail

_del

Object _del(i)

_pop

Object _pop( )

_push

int _push(o)

_reset

Object _reset( )

addBefore

void addBefore(i,o)

addItem

int addItem(o)

clone

MVCListModel clone()

delItem

Object delItem(i)

dump

String dump()

getCount

int getCount( )

getItem

Object getItem(i)

getItemStr

String getItemStr(i)

getMemento

Object getMemento()

hash

int hash()

iterate

void iterate(<Function> f)

konstructor

void konstructor( <String> optName )

reset

Object reset( )

setMemento

void setMemento(<Object> m)

The Gravey 2.0 Framework

Documentation generated by JSDoc on Sat Dec 8 21:51:44 2007