Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is serialization ?which function is responsible for
serializing data ?

Answers were Sorted based on User's Feedback



What is serialization ?which function is responsible for serializing data ? ..

Answer / satheeshkedarisetti

Serialization is used for object persitence. using this you
can store your object current state in disk. The same state
you can get after restarting your application.

A serializable class usually has a Serialize member
function, and it usually uses the DECLARE_SERIAL and
IMPLEMENT_SERIAL macros, as described under class CObject.

The overloaded extraction (>>) and insertion (<<) operators
are convenient archive programming interfaces that support
both primitive types and CObject-derived classes.

Is This Answer Correct ?    9 Yes 2 No

What is serialization ?which function is responsible for serializing data ? ..

Answer / rck

serialization means writing data to the file and reading
data from the file.
This is supported by CArchive class and the function is
serialize()

serialize function is like
if(ar.IsStoring())
{
//code for storing data
}
else(ar.IsLoading())
{
//Code for loading data
}

Is This Answer Correct ?    2 Yes 0 No

What is serialization ?which function is responsible for serializing data ? ..

Answer / ctharam

Serialization means conversion of Objects from bytes into streaming...and store those data in a External storage like Hard Disk.

Serialize is called by CArchive::ReadObject and CArchive::WriteObject.


Use CArchive::IsLoading or CArchive::IsStoring to determine whether the archive is loading or storing.

IsStoring():-
-------------

// example for CObject::Serialize
void CAge::Serialize( CArchive& ar )
{
CObject::Serialize( ar );
if( ar.IsStoring() )
ar << m_years;
else
ar >> m_years;
}


IsLoading() :-
---------------

int i;
extern CArchive ar;
if( ar.IsLoading() )
ar >> i;
else
ar << i;

Is This Answer Correct ?    0 Yes 0 No

What is serialization ?which function is responsible for serializing data ? ..

Answer / manish(yugma)

Serialization is a process used to read and write object
from and to secondary storage device respectively.Base
class is CArchive class of MFC. it is used basically in
doc-view architecture programming.DECLARE_SERIAL and
IMPLEMENT_SERIAL macro is used in header and .cpp file
respectively, which has to be serialize.

Is This Answer Correct ?    4 Yes 5 No

What is serialization ?which function is responsible for serializing data ? ..

Answer / abhijit

Adding to the above mentioned points i would like to add
the following:

Serialize() function has to be overridden to take advantage
of serialisation support

DECLARE_SERIAL macro provides prototypes for serialisation
functions

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More MFC Interview Questions

1)how to Display the File Dialog Box, in MFC ?

1 Answers  


What is stack size in win32 program?

1 Answers   HCL,


Explain in sort What is CTargetObject?

2 Answers  


What is a message map?

1 Answers   Mphasis,


How to access document object from view ?

1 Answers  


What is the base class for most MFC classes?

7 Answers   CMC, Siemens,


What is primitive and non-primitive application?

2 Answers   HCL,


what are the feauters of CObject

4 Answers   Siemens, Wipro,


How you create a button dynamically?

2 Answers  


1)How to change a text of a button in runtime?

2 Answers  


Hi All, I have created one MFC Dialog Based application.now if i am running the application its working fine,instead of closing he application i minimized the application,if i run the application again,i am getting the Dialog. I want to prevent the calling of application multiple times. please give me the code and let me know in which method i need to make changes. Praveer

7 Answers   HP,


What is the initial function to be called in MFC and what it will do

11 Answers   Infosys,


Categories