Summary
It's good object-oriented design to provide inserters, extractors, and manipulators for any user-defined classes that might be involved in I/O. The more useful the class, the more formats that class may be required to take onsuch as our course class, which had HTML, XML, horn clause, and SSPR representation. If inserters and extractors are provided for user-defined classes, the class can easily be streamed to and from containers while taking advantage of the STL algorithms. It's more work for the supplier of the class to provide inserters, extractors, and manipulators, but the user of the class benefits immediately, and the more the class is used, the higher the payoff.