Link to home
Start Free TrialLog in
Avatar of kakamna
kakamna

asked on

Serializing CMAPSTRINGTOOBJECT TYPE Object Pointer

How Can I serialize the CMapStringtoOb Type Pointer Object Using Carchieve Type Object.
ASKER CERTIFIED SOLUTION
Avatar of inpras
inpras

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kakamna
kakamna

ASKER

Hi Inpras
Thank You For U  R reply
can u Please explain why all this is necessary. Because I have red that all the classes drived from cobject support Seialization but when I use the statement
ar << mp;
where mp is Pointer Object of CMaptoStringtoOb class. The result is in the form of an exception. But when I try to use
ar << rc;
where rc is the Object of CRect class It works fine.
Waiting for U r reply
Thanx Again
KAKAMNA
Hi kakamna
True all object derived from CObject can
be serialized

"CMapStringToOb incorporates the IMPLEMENT_SERIAL macro to support serialization and dumping of its elements. Each element is serialized in turn if a map is stored to an archive, either with the overloaded insertion (<<) operator or with the Serialize member function."

But CArchive class doesnot support Collection classes properly though every help says U can serialize collection classes having micro IMPLEMENT_SERIAL but U need to do it on UR own take the example of CStringArray one more in the path of UR example.

Regards
Avatar of kakamna

ASKER

Thank U Inparse
I was able to serialize the objects one by one can you send me
your ifo thrigh mail my mail address is najum1@mailexcite.com