Declaring the Streaming Operators
First, the streaming operators are declared by putting the RW_DECLARE_VIRTUAL_STREAM_FNS macro at the beginning of the class declaration.
// real_property.h
class real_property
{
RW_DECLARE_VIRTUAL_STREAM_FNS(real_property) // 1
public:
real_property () { }
real_property (const RWCString& address,
const RWCString& size)
: address_(address), size_(size) {
}
virtual ~real_property() { }
bool
operator== (const real_property& prop) const {
return address_ == prop.address_;
}
private:
RWCString address_;
RWCString size_;
};