Re: Re: Re: Re: What is serializaton?
Re: Re: Re: Re: What is serializaton?
- Subject: Re: Re: Re: Re: What is serializaton?
- From: "Corey O'Connor" <email@hidden>
- Date: Mon, 24 Jul 2006 14:32:19 -0700
On 7/24/06, Michael Ash <email@hidden> wrote:
Or you can just use NSCoder to do all the heavy lifting for you.
According to the documentation an NSCoder implementation calls -
(void) encodeWithCoder: (NSCoder*) on the object that was requested to
be serialized and initWithCoder on an object to be deserialized. The
object still has to determine how it's particular instance variables
should be serialized and de-serialized. As I understand it, no special
magic occurs to serialize and deserialize classes without relying on
the programmer of a class explicitly implementing routines to
serialize and de-serialize an instance of a class. Properly
serializing and deserializing an arbitrary object graph is not
something provided for free. Figuring out how to do that is also most
of the work of any data marshaling implementation IMO. To me, that
means that NSCoder does do any "heavy lifting". More like it: NSCoder
provides a nice framework for implementing data marshaling where the
specifics of marshaling an object's instance variables is left up to
the programmer.
The documentation points out that 10.1 and earlier supported the
serialization of arbitrary objects without explicit programmer
support, but is deprecated now. So I'll just say that it doesn't
exists. :-)
--
-Corey O'Connor
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden