previous page
next page

Summary

Many objects need some support for persistence, and ATL provides an easily extensible, table-driven implementation of the IPersistStream[Init] and the IPersistPropertyBag interfaces. These implementations save and load the properties described by the class's property map entries. By overriding the appropriate methods, you can extend this persistence support for data types that property map entries do not support. The ATL implementation of IPersistStorage allows the object to be embedded into an OLE container but doesn't take advantage of many of the capabilities of the IStorage medium.

Using and extending the stream persistence support that ATL provides allows an object to offer additional functionality to its clients. For example, you've seen how to implement IPersistMemory support to your object (which MFC-based containers prefer). In addition, you can easily add marshal-by-value semantics to your class by reusing the stream persistence functionality.


previous page
next page
Converted from CHM to HTML with chm2web Pro 2.75 (unicode)