Solved

Serializing

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

Technology Partners: 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

Suggested Solutions

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

749 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