The PersistentOffset class (See Figure 3.20) represents an object in the owner Window. The class is invisible from the user, and implements the SortableObject interface (See Section 3.2.2).
Instances of the class is used as elements of the member variable objectTable in the Windows. Each element of the table corresponds to a chunk in the owner Window. The class is completely passive and the accessors are its main functions.
The member variable offset contains the offset of the object the state of which it represents. Its LSBs are storing three flags - inUse, fragmented, and grabbed.
There are many accessors for the offset. The accessor getOffset() extracts the offset part from the variable. The accessors isInUse(), setInUse(), clearInUse() are for the inUse flag. The accessors isFragmented(), setFragemeted(), and clearFragmented() are for the fragmented flag. The accessors isGrabbed(), setGrabbed(), and clearGrabbed() are for the grabbed flag.
The other member variable grabCountReadOnly contains the number of the PersistentPointers which are read-only-grabbing the object. The accessor getGrabCountReadOnly literally extracts the value. The accessor incrementGrabCountReadOnly increments the counter, as the accessor decrementGrabCountReadOnly decrements it.