HP Integrity NonStop J-Series User Manual

Page 268

Advertising
background image

}

RWBoolean
RWRectangle::isEqual(const RWCollectable* c) const //5
{
if(c->isA() != isA() ) return FALSE;

const RWRectangle* r = (const RWRectangle*)c;

return bounds.left == r->bounds.left &&
bounds.top == r->bounds.top &&
bounds.right == r->bounds.right &&
bounds.bottom == r->bounds.bottom;
}

// Restore the RWRectangle from a virtual stream:
void
RWRectangle::restoreGuts(RWvistream& s) //6
{
s >> bounds.left >> bounds.top;
s >> bounds.right >> bounds.bottom;
}

// Restore from an RWFile:
void
RWRectangle::restoreGuts(RWFile& f) //7
{
f.Read(bounds.left);
f.Read(bounds.top);
f.Read(bounds.right);
f.Read(bounds.bottom);
}

void
RWRectangle::saveGuts(RWvostream& s) const //8
{
s << bounds.left << bounds.top;
s << bounds.right << bounds.bottom;
}

void
RWRectangle::saveGuts(RWFile& f) const //9
{
f.Write(bounds.left);

Advertising
This manual is related to the following products: