Solved

Serializing SDI document data into two parts.

Posted on 2004-08-08
1
257 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 100 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
configuration management 2 99
Error on moodle after upgrade 3 106
sum67 challenge 35 89
abstract class with all non abstract mentods 6 71
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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…
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now