Trees | Index | Help |
|
---|
Package subjectdata :: Module SSheetData :: Class SSheetData |
|
Subject
--+
|
SSheetData
Method Summary | |
---|---|
__init__(self,
subjectManager,
ID,
minCol,
minRow,
maxCol,
maxRow)
| |
Attach the specified observer to this subject. | |
Returns True if an action can be redone | |
Returns True if an action can be undone | |
Backup the cells located within the specified cell coordinates. | |
Detach the specified observer from this subject. | |
Export the contents of the spreadsheet to a file. | |
Notify all observers that a change has been performed on this subject. | |
Redo the most recent action performed, if possible. | |
Undo the previous action performed, if possible | |
Collect the strong components by performing a depth first search. | |
Create a mapping representing the reverse graph by performing a depth first search. | |
Create the topologically sorted list by performing a depth first search. | |
Evaluate the cells in topological order. | |
Returns the cell contained in this subject that are within the specified range. | |
__orderCellCoord(self,
cellCoordA,
cellCoordB)
| |
Return a hashtable mapping a given CellCoord to its dependents CellCoords. | |
Return a list of strong components of the dependency graph. | |
Return a topologically sorted list of cell coordinates | |
Accessors | |
SubjectManager
|
Returns the subject manager managing this subject |
Return a SSheetState object encapsulating each cell contained in the requested cell range. | |
Tuple (CellCoord , CellCoord )
|
Returns a tuple of cell coordinates representing the boundaries of the spreadsheet. |
int |
Returns the ID of this SSheetData |
Undoable/Redoable Actions | |
Paste the cells saved previously with a call to copy() into the requested range. | |
bool |
Import the contents of filename into the spreadsheet, which is emptied first. |
Update the state of this object, evaluate the formulas and notify the observers. |
Method Details |
---|
getID(self)Returns the ID of this SSheetData
|
getLimits(self)Returns a tuple of cell coordinates representing the boundaries of the spreadsheet. |
getState(self, cellCoordA=None, cellCoordB=None)Return a SSheetState object encapsulating each cell contained in the requested cell range. If no cell coordinates are specified, return the complete state. Note: cells AST are NOT returned. Order is not important.
|
getSubjectManager(self)Returns the subject manager managing this subject
|
paste(self, cellCoordA, cellCoordB)Paste the cells saved previously with a call to copy() into the requested range. Copy all cells even if rangeTuple is smaller than the saved range. Note: The order of the cell coordinates is not important TODO: Copy multiple times if the height/width of the range is a multiple of the saved height/width |
importFromFile(self, filename)Import the contents of filename into the spreadsheet, which is emptied first. Returns True on success, False otherwise.
|
setState(self, state)Update the state of this object, evaluate the formulas and notify the observers. Note: Cell Coordinates that are not present in state are NOT modified. To explicitely delete the data of a cell coordinate, it must be present in state (pointing to empty formula, value, ast).
|
attach(self, observer)Attach the specified observer to this subject. It will now be notified when this subject is modified.
|
canRedo(self)Returns True if an action can be redone |
canUndo(self)Returns True if an action can be undone |
copy(self, cellCoordA, cellCoordB)Backup the cells located within the specified cell coordinates. Note: The order is not important. |
detach(self, observer)Detach the specified observer from this subject. It will no longer be notified of changes to this subject.
|
exportToFile(self, filename)Export the contents of the spreadsheet to a file. Returns True on success, False otherwise.
|
notify(self)Notify all observers that a change has been performed on this subject. The observers will now retrieve the state and update themselves.
|
redo(self)Redo the most recent action performed, if possible. |
undo(self)Undo the previous action performed, if possible |
__dfsCollect(self, cellCoord, cellsLabelling, revGraph, component)Collect the strong components by performing a depth first search.
|
__dfsReverse(self, cellCoord, cellsLabelling, revGraph)Create a mapping representing the reverse graph by performing a depth first search.
|
__dfsSort(self, cellCoord, cellsLabelling, sortedList)Create the topologically sorted list by performing a depth first search.
|
__evaluate(self)Evaluate the cells in topological order. |
__getCells(self, cellCoordA, cellCoordB)Returns the cell contained in this subject that are within the specified range. |
__reverseGraph(self)Return a hashtable mapping a given CellCoord to its dependents CellCoords. |
__strongComponents(self)Return a list of strong components of the dependency graph. The strong components in topological order. |
__topoSort(self)Return a topologically sorted list of cell coordinates |
Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Tue Aug 17 18:20:06 2004 | http://epydoc.sf.net |