Package ast :: Module RangeRef :: Class RangeRef
[show private | hide private]
[frames | no frames]

Class RangeRef

ASTNode --+
          |
         RangeRef


Encapsulates a reference to a range of cells
Method Summary
  __init__(self, cornerA, cornerB)
RangeRef's constructor
  accept(self, visitor)
Method used in the visitor pattern.
RangeRef clone(self)
Returns a copy of this object
  equals(self, anObject)
Returns true if this object equals another object
    Accessors
  setSecondCorner(self, cornerB)
Sets the second corner of the range
  setFirstCorner(self, cornerA)
Sets the first corner of the range
CellRef getSecondCorner(self)
Returns the second corner of the range
CellRef getFirstCorner(self)
Returns the first corner of the range
list of CellRef getCellRefSet(self)
Returns a list of the CellRef in the rectangle created by cornerA and cornerB.
    Inherited from ASTNode
string __str__(self)
String representation of the complete AST (common to every child)

Method Details

setFirstCorner(self, cornerA)

Sets the first corner of the range
Parameters:
cornerA - first corner
           (type=CellRef)

setSecondCorner(self, cornerB)

Sets the second corner of the range
Parameters:
cornerB - second corner
           (type=CellRef)

getCellRefSet(self)

Returns a list of the CellRef in the rectangle created by cornerA and cornerB. The cells are always returned starting from the top-left cell, down to the bottom-right cell.
Returns:
list of CellRef

getFirstCorner(self)

Returns the first corner of the range
Returns:
CellRef

getSecondCorner(self)

Returns the second corner of the range
Returns:
CellRef

__init__(self, cornerA, cornerB)
(Constructor)

RangeRef's constructor
Parameters:
cornerA - First reference of the range
           (type=CellRef)
cornerB - Second reference of the range
           (type=CellRef)
Overrides:
ast.ASTNode.ASTNode.__init__

accept(self, visitor)

Method used in the visitor pattern. Calls the appropriate action to perform while visiting this object.
Parameters:
visitor - Visitor accepted by this object
           (type=Visitor)
Overrides:
ast.ASTNode.ASTNode.accept (inherited documentation)

clone(self)

Returns a copy of this object
Returns:
RangeRef
Overrides:
ast.ASTNode.ASTNode.clone

equals(self, anObject)

Returns true if this object equals another object
Parameters:
anObject - Object compared to this object
           (type=Object)
Overrides:
ast.ASTNode.ASTNode.equals (inherited documentation)

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