Next: , Previous: The permute function, Up: Rows and changes



3.8 The row_block class

The row_block class is an array of rows which has associated with it a reference to an array of changes, and can recalculate itself from those changes. For example, suppose that the variable c of type vector<change> holds one lead of a method; then it is possible to define a variable of type row_class which, once it is told what the lead head is, will calculate the rows for one lead of the method.

Note that the row_block object does not store its own copy of the vector<change> object from which it is calculated. This means that the changes may be altered and the resulting rows recalculated easily; it also means that the changes must not be deallocated while the row_block object is in existence.