beautypg.com

HP Integrity NonStop J-Series User Manual

Page 269

background image

f.Write(bounds.top);
f.Write(bounds.right);
f.Write(bounds.bottom);
}

//1 This is a macro that all subclasses of

RWCollectable

are required to compile once, and only

once. See

Chapter 15 (

How to Create an RWCollectable..

)

for more details.

//2 This is the constructor for RWRectangle that fills in the RECT structure.

//3 This is the definition of the virtual function drawWith(HDC). It simply makes a call to the

Windows function Rectangle() with appropriate arguments.

//4 Supplies an appropriate hashing value in case we ever want to retrieve this RWRectangle

from a hash table.

//5 Supplies an appropriate isEqual() implementation.

//6 This function retrieves the RWRectangle from a virtual stream.

//7 This function retrieves the RWRectangle from an

RWFile

.

//8 This function stores the RWRectangle on a virtual stream. Note how there is no need to

separate elements by white space_this will be done by the virtual stream, if necessary.

//9 This function stores the RWRectangle on an

RWFile

.

The other shapes, RWEllipse and RWText, are implemented in a similar manner.

This manual is related to the following products: