Associations with Other Objects
In the previous examples, the object state that is streamed out and restored consists of simple attributes. An attribute is a data member that is either a primitive type (such as int or float) or a simple concrete type that is treated like a primitive type (such as RWCString or RWDate).
In real object systems, an object’s state often includes associations with other objects. In C++ these associations can take several forms. The following examples show how to provide serialization support for these various forms. As long as all other classes provide support for serialization, then associations are treated just like simple attributes.