'@todo: docstring'

def __repr__(self):

    repr = ''
    for row in xrange((self.lastRow + 1)):
        for col in xrange((self.lastCol + 1)):
            posn = survey_MatrixElement.getPosn(row, col)
            if (posn in self.matrix):
                cell = self.matrix[posn]
                data = str(cell)
            else:
                cell = None
                data = '-'
            if self.fixedWidthRepr:
                xposn = 0
                if (cell != None):
                    if (cell.joinedWith != None):
                        parentPosn = cell.joinedWith
                        (prow, pcol) = parentPosn.split(',')
                        xposn = (col - int(pcol))
                        data = str(self.matrix[parentPosn])
                    if (xposn >= len(data)):
                        data = '*'
                if (len(data) > self.fixedWidthReprLen):
                    data = data[xposn:(xposn + self.fixedWidthReprLen)]
                else:
                    data = (data + ('    ' * (self.fixedWidthReprLen - len(data))))
            repr += data
        repr += '\n'
    return repr
