Second Change
Place RW_DEFINE_STREAMABLE_AS_SELF() and RW_DEFINE_STREAMABLE_POINTER() and RW_DEFINE_STREAMABLE_AS_SELF() macros in the source file which implements the rest of the class. These macros would normally go in the same source file as the streamContents() defining macros, as shown in the following code:
 
// examples\serial\simple\real_property.cpp
 
RW_BEGIN_STREAM_CONTENTS(real_property)
{
RW_STREAM_ATTR_MEMBER(address, address_)
RW_STREAM_ATTR_MEMBER(size, size_)
}
RW_END_STREAM_CONTENTS
 
RW_DEFINE_STREAMABLE_AS_SELF(real_property)
RW_DEFINE_STREAMABLE_POINTER(real_property)