Jason_G
asked on
CArchive
My application file structure requires a direct access protocol that is incompatible with the file format produced by CArchive, which functions should I override?
If all you want to do is to serialize in a way that's different from the CArchive << and >> operators you don't need to override anything. Just use the CArchive Read and Write functions to access the raw data in the way you need. If you already have a file handler for the protocol, you can also use the CArchive GetFile function.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Toperators ">>" and "<<" or the function "serialize" has to be overwritten.
I think you already knew this and your question refers to an random access for serialized objects.
Because of the serialized pointers the only way I can see is to store each object (or group of objects) that are independent of each other separate in one file and add an index to refer to the objects.