Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Serializing SDI document data into two parts.

Posted on 2004-08-08
1
Medium Priority
?
271 Views
Last Modified: 2013-11-20
Hi,

I am working on a SDI application. My CDocument derived class holds a linked list of pointers to CObject derived objects which contains other linked lists of CObject derived objects. The first linked list contains data that almost never changes. The other linked lists  are much more variable.
Is it possible to serialize this document data into two parts for an SDI application. Lets say the more static data in a file with extension .ext1 and the more variable data in a file with extension .ext2. Is this good programming design and if it is, how presisely could this be achieved ?
0
Comment
Question by:bs161900
1 Comment
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 300 total points
ID: 11746569
>Is it possible to serialize this document data into two parts for an SDI application. Lets say the more static data in a file with
> extension .ext1 and the more variable data in a file with extension .ext2. Is this good programming design and if it is, how
> presisely could this be achieved ?
Yes, sure you can do it and could be a good programming practice if the case is proper.
By example, you can open a file with some extension, let say (.map, a city map), but as you create interest points, you can save them in a separate file (.ipt) because you don't want or you can't alter map file.
To achieve that, you have to build your own serialization functions (CDocument::Serialize is not the unique way). Also you can trap the OnNewDocument(), OnOpenDocument(), OnSaveDocument() and OnCloseDocument() document's events you manage serialization as you desire (even can not store in a standard file but in a database, or update a portion of an existing file).

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Screencast - Getting to Know the Pipeline
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question