Solved

Serializing

Posted on 1998-09-04
1
261 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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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 video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

13 Experts available now in Live!

Get 1:1 Help Now