Most classes must be streamable

In most cases, every newly defined class needs to provide streaming operators in the its definition. For a list of other default behaviors for new classes, see Taligent's Guide to Designing Programs.

The main reason you need to provide stream operators is that you don't know what other users of your class will do with one of your instances. Typical operations that are done to instances are sending them to other instances, writing them to disk, and sending them across the network to another machine. Every one of these cases requires streaming.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker