Re:[boost] Re: serialization and MFC

Eric Niebler wrote:
Forgive the possibly naive question -- I have never used the serialization library, but I have used MFC serialization. I am curious if the boost serialization library can be made backwards-compatible with MFC serialization; that is, if I have an old application that uses MFC serialization, would it be possible to switch to the boost serialization library and still have the ability to read old (MFC) archives?
I'd like to know: - if it's possible - how hard it would be (would it require reverse-engineering the MFC archive format? is that format stable? documented?) - what the advantages of switching are
The easiest way to switch from MFC (or any other systems is to do the following): a) add boost serialization to your code. b) when you open an archive - currently MFC, use code like the following: open stream read the first part of the stream if doesn't contain a boost serialization signature invoke MFC de-serialization else invoke boost de-serialization. c) when you save an archive - just invoke boost serialization. In this way, all your old files will be compatible and will gradually be converted to the new system. The new archives can use all the new facilities without compromise. This is much easier, and forward looking than trying to adapt to an old format wich likely isn't rich enough to support the new facilities. Robert Ramey
participants (1)
-
Robert Ramey