Solved

Serializing

Posted on 1998-09-04
1
267 Views
Last Modified: 2013-11-20
The prime requirement for an object to be serialized is that it should
be derived from CObject class. But 'CString' class is not derived
from CObject. How it's still possible the CString objects ?
Adv. thanks!
0
Comment
Question by:rsraj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
motigust earned 20 total points
ID: 1321741
This is requiered only if you want to implement a "Shellow" serialization, which means writing the data of the object "as is" to the disk. the CObject implements such functionality if you uses the "DECLARE_SERIAL" and "IMPLEMENT_SERIAL" macros.

This functionality may be not usefull if your data holds pointers, because there is no meaning to write the pointer into a file.

Beside that, an object may implement/override a function named "Serialize" that gets CArchive object as a parameter, and serialize its data into it. - It has nothing with the CObject.

This is the way the "CString" object is implemented.

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

724 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