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

Class SSheetState


Class encapsulating a snapshot of SSheetData. Used as a means of communication between the Observers and the Subject
Method Summary
  __init__(self)
SSheetState clone(self)
Returns an exact copy of this object
bool equals(self, obj)
Returns true if this object equals obj
  hasCell(self, cellCoord)
Return True if this SSheetState contains cellCoord
  removeCell(self, cellCoord)
Remove the cell coordinate, if it already exists
    Accessors
  setCellValue(self, cellCoord, value)
Set the value of the specified coordinate.
  setCellFormula(self, cellCoord, formula)
Set the formula of the specified coordinate.
  setCellAST(self, cellCoord, ast)
Set the ast of the specified coordinate.
list of CellCoord getCoords(self)
Return a list of cell coordinates that this SSheetState contains.
CellValue getCellValue(self, cellCoord)
Return the cell value of the specified coordinate.
string getCellFormula(self, cellCoord)
Return the formula of the specified coordinate.
ASTNode getCellAST(self, cellCoord)
Return the abstract syntax tree of the specified coordinate.

Method Details

setCellAST(self, cellCoord, ast)

Set the ast of the specified coordinate.
Parameters:
cellCoord - cell coordinate
           (type=CellCoord)
ast - abstract syntax tree
           (type=ASTNode)

setCellFormula(self, cellCoord, formula)

Set the formula of the specified coordinate.
Parameters:
cellCoord - cell coordinate
           (type=CellCoord)
formula - formula
           (type=string)

setCellValue(self, cellCoord, value)

Set the value of the specified coordinate.
Parameters:
cellCoord - cell coordinate
           (type=CellCoord)
value - value
           (type=CellValue)

getCellAST(self, cellCoord)

Return the abstract syntax tree of the specified coordinate. Return None if the coordinate does not exists in this SSheetState.
Parameters:
cellCoord - cell coordinate
           (type=CellCoord)
Returns:
ASTNode

getCellFormula(self, cellCoord)

Return the formula of the specified coordinate. Return the empty string if the coordinate does not exists in this SSheetState
Parameters:
cellCoord - cell coordinate
           (type=CellCoord)
Returns:
string

getCellValue(self, cellCoord)

Return the cell value of the specified coordinate. Return the empty cell value if the coordinate does not exists in this SSheetState.
Parameters:
cellCoord - cell coordinate
           (type=CellCoord)
Returns:
CellValue

getCoords(self)

Return a list of cell coordinates that this SSheetState contains.
Returns:
list of CellCoord

clone(self)

Returns an exact copy of this object
Returns:
SSheetState

equals(self, obj)

Returns true if this object equals obj
Parameters:
obj - Object to be compared
           (type=Object)
Returns:
bool

hasCell(self, cellCoord)

Return True if this SSheetState contains cellCoord
Parameters:
cellCoord - cell coordinate
           (type=CellCoord)

removeCell(self, cellCoord)

Remove the cell coordinate, if it already exists
Parameters:
cellCoord - cell coordinate
           (type=CellCoord)

Generated by Epydoc 2.1 on Thu Aug 26 22:55:23 2004 http://epydoc.sf.net