The CommonPoint application system provides this global function for the primitive data types previously mentioned. For example, the following code segment shows how each stream type writes data. When the >>= function is used, it really performs f.write(x).
long x=5; // sample data in known type TFileStream f; // sample stream x >>= f; // does f.write(x)
Remember to write out the "version number" associated with this instance. These version numbers are updated whenever the external representation of the instance changes. Your stream in function looks at this when reading and takes the appropriate action. You must read in all old versions.