Package subjectdata :: Module SetCells :: Class SetCells
[show private | hide private]
[frames | no frames]

Class SetCells

Command --+
          |
         SetCells


Command that execute all the actions that modify the dictionnary holding the cells of a SSheetData object.
Method Summary
  __init__(self, cells)
SetCells's constructor.
bool canRedo(self)
Returns true if it is possible to redo
bool canUndo(self)
Returns true if it is possible to undo
tuple (bool, string) execute(self, nextState)
Update __cells with the data in nextState.
  reexecute(self)
Redo the next action.
  unexecute(self)
Undo the last action.

Method Details

__init__(self, cells)
(Constructor)

SetCells's constructor. Takes a reference to the dictionnary holding the cells of a SSheetData object.
Parameters:
cells - Dictionnary holding cell information.
           (type=hashtable mapping CellCoord to SSheetCell)
Overrides:
subjectdata.Command.Command.__init__

canRedo(self)

Returns true if it is possible to redo
Returns:
bool

canUndo(self)

Returns true if it is possible to undo
Returns:
bool

execute(self, nextState)

Update __cells with the data in nextState. Return a tuple to propagate parse errors. The first element of the tuple is true if the execute was a success, false otherwise. The second element is the error message.
Parameters:
nextState - state that updates __cells
           (type=SSheetState)
Returns:
tuple (bool, string)
Overrides:
subjectdata.Command.Command.execute

reexecute(self)

Redo the next action.
Overrides:
subjectdata.Command.Command.reexecute

unexecute(self)

Undo the last action.
Overrides:
subjectdata.Command.Command.unexecute

Generated by Epydoc 2.1 on Tue Aug 17 18:20:07 2004 http://epydoc.sf.net