swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deep Serialization


From: glen e. p. ropella
Subject: Re: Deep Serialization
Date: Thu, 14 Oct 1999 15:44:01 -0700

At 03:02 PM 10/14/99 -0400, you wrote:

I realize I can check this out by trial and error but how deep does the
Archiver method -putDeep go?

Depends on the object.  Each class has to define its own
method for serializing instances of it.  If you'll take
a look at, say, the Map collection, you'll see that there's
a method defined called -lispOutDeep (there's also an
hdf5OutDeep, but, I'll stick with lisp).  Maps need this
method to adhere to the Serialization protocol.

Inside this method, you'll see that a Map, when deeply
serialized, sends the lispOutDeep to each of its keys and
members.  If the keys and the members have special
structure (that might require even deeper serialization),
then they should also implement lispOutDeep.  If they
don't have special structure, then they'll inherit the
one from the base object in Swarm, which tries to send
lispOutDeep to any instance variable of type "id".

So, the answer is that it'll continue serializing each
object it finds in the instance variables of the higher
objects until there are no more objects, unless the
class tells it otherwise.  (I.e. the leaves of the
tree will all be primitive types unless you explicitly
tell it to stop beforehand.)

glen

--
glen e. p. ropella =><= Feeding the hamster wheel.  Hail Eris!
Home: http://www.trail.com/~gepr                (505) 424-0448
Work: http://www.swarm.com                      (505) 995-0818

                 ==================================
  Swarm-Support is for discussion of the technical details of the day
  to day usage of Swarm.  For list administration needs (esp.
  [un]subscribing), please send a message to <address@hidden>
  with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]