Solved

Serializing

Posted on 1998-09-04
1
263 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
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand data scrubbing tool 13 32
Process filename extension 3 187
WinWaitActive parameters 12 31
Capture logon name 13 75
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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…
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.

825 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