diff --git a/src/as/com/threerings/crowd/chat/data/ChatMarshaller.as b/src/as/com/threerings/crowd/chat/data/ChatMarshaller.as index feb8861a2..b55e36634 100644 --- a/src/as/com/threerings/crowd/chat/data/ChatMarshaller.as +++ b/src/as/com/threerings/crowd/chat/data/ChatMarshaller.as @@ -27,7 +27,7 @@ import com.threerings.presents.client.Client; import com.threerings.presents.client.InvocationService; import com.threerings.presents.client.InvocationListener; import com.threerings.presents.data.InvocationMarshaller; -import com.threerings.presents.data.ListenerMarshaller; +import com.threerings.presents.data.InvocationMarshaller_ListenerMarshaller; import com.threerings.presents.dobj.InvocationResponseEvent; import com.threerings.util.Name; @@ -56,7 +56,7 @@ public class ChatMarshaller extends InvocationMarshaller // documentation inherited from interface public function broadcast (arg1 :Client, arg2 :String, arg3 :InvocationListener) :void { - var listener3 :ListenerMarshaller = new ListenerMarshaller(); + var listener3 :InvocationMarshaller_ListenerMarshaller = new InvocationMarshaller_ListenerMarshaller(); listener3.listener = arg3; sendRequest(arg1, BROADCAST, [ arg2, listener3 ]); } diff --git a/src/as/com/threerings/crowd/chat/data/TellMarshaller.as b/src/as/com/threerings/crowd/chat/data/TellMarshaller.as index 895da3526..3a44f8524 100644 --- a/src/as/com/threerings/crowd/chat/data/TellMarshaller.as +++ b/src/as/com/threerings/crowd/chat/data/TellMarshaller.as @@ -2,11 +2,11 @@ package com.threerings.crowd.chat.data { import com.threerings.util.Long; -import com.threerings.presents.data.ListenerMarshaller; +import com.threerings.presents.data.InvocationMarshaller_ListenerMarshaller; import com.threerings.crowd.chat.client.TellListener; -public class TellMarshaller extends ListenerMarshaller +public class TellMarshaller extends InvocationMarshaller_ListenerMarshaller { /** The method id used to dispatch {@link #tellSucceeded} * responses. */ diff --git a/src/as/com/threerings/crowd/data/LocationMarshaller_MoveMarshaller.as b/src/as/com/threerings/crowd/data/LocationMarshaller_MoveMarshaller.as index 3e7dc3df2..5b8683acf 100644 --- a/src/as/com/threerings/crowd/data/LocationMarshaller_MoveMarshaller.as +++ b/src/as/com/threerings/crowd/data/LocationMarshaller_MoveMarshaller.as @@ -1,10 +1,10 @@ package com.threerings.crowd.data { -import com.threerings.presents.data.ListenerMarshaller; +import com.threerings.presents.data.InvocationMarshaller_ListenerMarshaller; import com.threerings.crowd.client.MoveListener -public class LocationMarshaller_MoveMarshaller extends ListenerMarshaller +public class LocationMarshaller_MoveMarshaller extends InvocationMarshaller_ListenerMarshaller { /** The method id used to dispatch {@link #moveSucceeded} * responses. */ diff --git a/src/as/com/threerings/crowd/data/OccupantInfo.as b/src/as/com/threerings/crowd/data/OccupantInfo.as index d331c5f79..ae75cc98f 100644 --- a/src/as/com/threerings/crowd/data/OccupantInfo.as +++ b/src/as/com/threerings/crowd/data/OccupantInfo.as @@ -63,7 +63,7 @@ public class OccupantInfo public static const X_STATUS :Array = [ "active", "idle", "discon" ]; /** The body object id of this occupant (and our entry key). */ - public var bodyOid :Integer; + public var bodyOid :int; /** The username of this occupant. */ public var username :Name; @@ -74,7 +74,7 @@ public class OccupantInfo /** Access to the body object id as an int. */ public function getBodyOid () :int { - return bodyOid.value; + return bodyOid; } // documentation inherited from interface DSet_Entry @@ -86,7 +86,7 @@ public class OccupantInfo // documentation inherited from superinterface Streamable public function writeObject (out :ObjectOutputStream) :void { - out.writeObject(bodyOid); + out.writeObject(new Integer(bodyOid)); out.writeObject(username); out.writeByte(status); } @@ -94,7 +94,7 @@ public class OccupantInfo // documentation inherited from superinterface Streamable public function readObject (ins :ObjectInputStream) :void { - bodyOid = (ins.readField(Integer) as Integer); + bodyOid = (ins.readField(Integer) as Integer).value; username = (ins.readObject() as Name); status = ins.readByte(); } diff --git a/src/as/com/threerings/io/streamers/ArrayStreamer.as b/src/as/com/threerings/io/streamers/ArrayStreamer.as index 5d9aa2978..00de835e5 100644 --- a/src/as/com/threerings/io/streamers/ArrayStreamer.as +++ b/src/as/com/threerings/io/streamers/ArrayStreamer.as @@ -15,6 +15,7 @@ public class ArrayStreamer extends Streamer public function ArrayStreamer (jname :String = "[Ljava.lang.Object;") { super(TypedArray, jname); + trace("got new ArrayStreamer for " + jname); var secondChar :String = jname.charAt(1); if (secondChar === "[") { @@ -68,6 +69,7 @@ public class ArrayStreamer extends Streamer { var ta :TypedArray = new TypedArray(_jname); ta.length = ins.readInt(); + trace("Read array length as: " + ta.length); return ta; } diff --git a/src/as/com/threerings/presents/client/InvocationDirector.as b/src/as/com/threerings/presents/client/InvocationDirector.as index d1cbc42a7..c29b2ab6f 100644 --- a/src/as/com/threerings/presents/client/InvocationDirector.as +++ b/src/as/com/threerings/presents/client/InvocationDirector.as @@ -5,7 +5,7 @@ import mx.collections.ArrayCollection; import com.threerings.util.HashMap; -import com.threerings.presents.data.ListenerMarshaller; +import com.threerings.presents.data.InvocationMarshaller_ListenerMarshaller; import com.threerings.presents.dobj.DEvent; import com.threerings.presents.dobj.DObject; @@ -138,8 +138,9 @@ public class InvocationDirector { // configure any invocation listener marshallers among the args for each (var arg :Object in args) { - if (arg is ListenerMarshaller) { - var lm :ListenerMarshaller = (arg as ListenerMarshaller); + if (arg is InvocationMarshaller_ListenerMarshaller) { + var lm :InvocationMarshaller_ListenerMarshaller = + (arg as InvocationMarshaller_ListenerMarshaller); lm.callerOid = _clobj.getOid(); lm.requestId = nextRequestId(); lm.mapStamp = new Date().getTime(); @@ -187,8 +188,8 @@ public class InvocationDirector protected function handleInvocationResponse (reqId :int, methodId :int, args :Array) :void { - var listener :ListenerMarshaller = - (_listeners.remove(reqId) as ListenerMarshaller); + var listener :InvocationMarshaller_ListenerMarshaller = + (_listeners.remove(reqId) as InvocationMarshaller_ListenerMarshaller); if (listener == null) { log.warning("Received invocation response for which we have " + "no registered listener [reqId=" + reqId + @@ -270,8 +271,8 @@ public class InvocationDirector { var then :Number = now - LISTENER_MAX_AGE; for (var skey :String in _listeners.keys()) { - var lm :ListenerMarshaller = - (_listeners.get(skey) as ListenerMarshaller); + var lm :InvocationMarshaller_ListenerMarshaller = + (_listeners.get(skey) as InvocationMarshaller_ListenerMarshaller); if (lm.mapStamp < then) { _listeners.remove(skey); } diff --git a/src/as/com/threerings/presents/data/GotTimeBaseMarshaller.as b/src/as/com/threerings/presents/data/GotTimeBaseMarshaller.as index 390f83a32..267fa252a 100644 --- a/src/as/com/threerings/presents/data/GotTimeBaseMarshaller.as +++ b/src/as/com/threerings/presents/data/GotTimeBaseMarshaller.as @@ -5,7 +5,8 @@ import com.threerings.presents.client.GotTimeBaseListener; import com.threerings.presents.dobj.InvocationResponseEvent; // TODO: this will be autogenerated -public class GotTimeBaseMarshaller extends ListenerMarshaller +public class GotTimeBaseMarshaller + extends InvocationMarshaller_ListenerMarshaller implements GotTimeBaseListener { public static const GOT_TIME_OID :int = 1; diff --git a/src/as/com/threerings/presents/data/ConfirmMarshaller.as b/src/as/com/threerings/presents/data/InvocationMarshaller_ConfirmMarshaller.as similarity index 86% rename from src/as/com/threerings/presents/data/ConfirmMarshaller.as rename to src/as/com/threerings/presents/data/InvocationMarshaller_ConfirmMarshaller.as index da28e025e..34d035ce0 100644 --- a/src/as/com/threerings/presents/data/ConfirmMarshaller.as +++ b/src/as/com/threerings/presents/data/InvocationMarshaller_ConfirmMarshaller.as @@ -2,7 +2,8 @@ package com.threerings.presents.data { import com.threerings.presents.client.ConfirmListener; -public class ConfirmMarshaller extends ListenerMarshaller +public class InvocationMarshaller_ConfirmMarshaller + extends InvocationMarshaller_ListenerMarshaller implements ConfirmListener { public static const REQUEST_PROCESSED :int = 1; diff --git a/src/as/com/threerings/presents/data/ListenerMarshaller.as b/src/as/com/threerings/presents/data/InvocationMarshaller_ListenerMarshaller.as similarity index 98% rename from src/as/com/threerings/presents/data/ListenerMarshaller.as rename to src/as/com/threerings/presents/data/InvocationMarshaller_ListenerMarshaller.as index 63ea61473..3d56972be 100644 --- a/src/as/com/threerings/presents/data/ListenerMarshaller.as +++ b/src/as/com/threerings/presents/data/InvocationMarshaller_ListenerMarshaller.as @@ -11,7 +11,7 @@ import com.threerings.presents.client.InvocationListener; import com.threerings.presents.dobj.DObjectManager; import com.threerings.presents.dobj.InvocationResponseEvent; -public class ListenerMarshaller +public class InvocationMarshaller_ListenerMarshaller implements Streamable, InvocationListener { /** The method id used to dispatch a requestFailed response. */ diff --git a/src/as/com/threerings/presents/dobj/CompoundEvent.as b/src/as/com/threerings/presents/dobj/CompoundEvent.as index 0f85e7e0e..6654d49e7 100644 --- a/src/as/com/threerings/presents/dobj/CompoundEvent.as +++ b/src/as/com/threerings/presents/dobj/CompoundEvent.as @@ -40,8 +40,14 @@ public class CompoundEvent extends DEvent /** * Constructs a compound event and prepares it for operation. */ - public function CompoundEvent (target :DObject, omgr :DObjectManager) + public function CompoundEvent ( + target :DObject = null, omgr :DObjectManager = null) { + if (target == null) { + super(); + return; + } + super(target.getOid()); // sanity check diff --git a/src/as/com/threerings/presents/dobj/DEvent.as b/src/as/com/threerings/presents/dobj/DEvent.as index 1a797efad..bbc58c4f9 100644 --- a/src/as/com/threerings/presents/dobj/DEvent.as +++ b/src/as/com/threerings/presents/dobj/DEvent.as @@ -10,7 +10,7 @@ import com.threerings.util.StringBuilder; public /* abstract */ class DEvent implements Streamable { - public function DEvent (targetOid :int) + public function DEvent (targetOid :int = 0) { _toid = targetOid; } diff --git a/src/as/com/threerings/util/ClassUtil.as b/src/as/com/threerings/util/ClassUtil.as index d3c89251f..1a81b3801 100644 --- a/src/as/com/threerings/util/ClassUtil.as +++ b/src/as/com/threerings/util/ClassUtil.as @@ -28,8 +28,16 @@ public class ClassUtil public static function getClassByName (cname :String) :Class { - // see also ApplicationDomain.currentDomain.getClass(cname) - return (getDefinitionByName(cname.replace("::", ".")) as Class); + try { + // see also ApplicationDomain.currentDomain.getClass(cname) + return (getDefinitionByName(cname.replace("::", ".")) as Class); + + } catch (error :ReferenceError) { + var log :Log = Log.getLog(ClassUtil); + log.warning("Unknown class: " + cname); + log.logStackTrace(error); + } + return null; // error case } public static function isFinal (type :Class) :Boolean diff --git a/src/as/com/threerings/util/Hashtable.as b/src/as/com/threerings/util/Hashtable.as index 80e25aac5..2f1a1df9f 100644 --- a/src/as/com/threerings/util/Hashtable.as +++ b/src/as/com/threerings/util/Hashtable.as @@ -268,6 +268,7 @@ public class Hashtable */ protected function indexFor (hash :int) :int { + // TODO: improve? return Math.abs(hash) % _entries.length; } diff --git a/src/as/com/threerings/whirled/data/SceneMarshaller.as b/src/as/com/threerings/whirled/data/SceneMarshaller.as index ea5f60bfc..f98098c6c 100644 --- a/src/as/com/threerings/whirled/data/SceneMarshaller.as +++ b/src/as/com/threerings/whirled/data/SceneMarshaller.as @@ -21,6 +21,8 @@ package com.threerings.whirled.data { +import com.threerings.util.Integer; + import com.threerings.presents.client.Client; import com.threerings.presents.data.InvocationMarshaller; import com.threerings.whirled.client.SceneService; @@ -44,7 +46,7 @@ public class SceneMarshaller extends InvocationMarshaller { var listener4 :SceneMarshaller_SceneMoveMarshaller = new SceneMarshaller_SceneMoveMarshaller(); listener4.listener = arg4; - sendRequest(arg1, MOVE_TO, [ arg2, arg3, listener4 ]); + sendRequest(arg1, MOVE_TO, [ new Integer(arg2), new Integer(arg3), listener4 ]); } } diff --git a/src/as/com/threerings/whirled/data/SceneMarshaller_SceneMoveMarshaller.as b/src/as/com/threerings/whirled/data/SceneMarshaller_SceneMoveMarshaller.as index b450f380d..fd304869e 100644 --- a/src/as/com/threerings/whirled/data/SceneMarshaller_SceneMoveMarshaller.as +++ b/src/as/com/threerings/whirled/data/SceneMarshaller_SceneMoveMarshaller.as @@ -1,8 +1,10 @@ package com.threerings.whirled.data { +import com.threerings.util.Integer; + import com.threerings.io.TypedArray; -import com.threerings.presents.data.ListenerMarshaller; +import com.threerings.presents.data.InvocationMarshaller_ListenerMarshaller; import com.threerings.crowd.data.PlaceConfig; @@ -12,7 +14,7 @@ import com.threerings.whirled.client.SceneService_SceneMoveListener; import com.threerings.whirled.data.SceneModel; import com.threerings.whirled.data.SceneUpdate; -public class SceneMarshaller_SceneMoveMarshaller extends ListenerMarshaller +public class SceneMarshaller_SceneMoveMarshaller extends InvocationMarshaller_ListenerMarshaller implements SceneService_SceneMoveListener { /** The method id used to dispatch {@link #moveSucceeded} @@ -24,7 +26,7 @@ public class SceneMarshaller_SceneMoveMarshaller extends ListenerMarshaller { omgr.postEvent(new InvocationResponseEvent( callerOid, requestId, MOVE_SUCCEEDED, - [ arg1, arg2 ])); + [ new Integer(arg1), arg2 ])); } /** The method id used to dispatch {@link #moveSucceededWithScene} @@ -36,7 +38,7 @@ public class SceneMarshaller_SceneMoveMarshaller extends ListenerMarshaller { omgr.postEvent(new InvocationResponseEvent( callerOid, requestId, MOVE_SUCCEEDED_WITH_SCENE, - [ arg1, arg2, arg3 ])); + [ new Integer(arg1), arg2, arg3 ])); } /** The method id used to dispatch {@link #moveSucceededWithUpdates} @@ -48,7 +50,7 @@ public class SceneMarshaller_SceneMoveMarshaller extends ListenerMarshaller { omgr.postEvent(new InvocationResponseEvent( callerOid, requestId, MOVE_SUCCEEDED_WITH_UPDATES, - [ arg1, arg2, arg3 ])); + [ new Integer(arg1), arg2, arg3 ])); } // documentation inherited @@ -57,17 +59,17 @@ public class SceneMarshaller_SceneMoveMarshaller extends ListenerMarshaller switch (methodId) { case MOVE_SUCCEEDED: (listener as SceneService_SceneMoveListener).moveSucceeded( - args[0] as int, args[1] as PlaceConfig); + (args[0] as Integer).value, args[1] as PlaceConfig); return; case MOVE_SUCCEEDED_WITH_SCENE: (listener as SceneService_SceneMoveListener).moveSucceededWithScene( - args[0] as int, args[1] as PlaceConfig, args[2] as SceneModel); + (args[0] as Integer).value, args[1] as PlaceConfig, args[2] as SceneModel); return; case MOVE_SUCCEEDED_WITH_UPDATES: (listener as SceneService_SceneMoveListener).moveSucceededWithUpdates( - args[0] as int, args[1] as PlaceConfig, args[2] as TypedArray); + (args[0] as Integer).value, args[1] as PlaceConfig, args[2] as TypedArray); return; default: diff --git a/src/as/com/threerings/whirled/data/SceneModel.as b/src/as/com/threerings/whirled/data/SceneModel.as index b4f8cc64b..3b020b7aa 100644 --- a/src/as/com/threerings/whirled/data/SceneModel.as +++ b/src/as/com/threerings/whirled/data/SceneModel.as @@ -83,17 +83,21 @@ public class SceneModel out.writeInt(sceneId); out.writeField(name); out.writeInt(version); - out.writeField(auxModels); + out.writeObject(auxModels); } // documentation inherited from interface Streamable public function readObject (ins :ObjectInputStream) :void { + trace("Reading sceneId"); sceneId = ins.readInt(); + trace("Reading name (sceneId=" + sceneId + ")"); name = (ins.readField(String) as String); + trace("Reading version (name=" + name + ")"); version = ins.readInt(); - auxModels = (ins.readField("[Lcom.threerings.whirled.data.AuxModel;") - as TypedArray); + trace("Reading auxes (version=" + version + ")"); + auxModels = (ins.readObject() as TypedArray); + trace("auxes=" + auxModels); } /** diff --git a/src/as/com/threerings/whirled/spot/data/SceneLocation.as b/src/as/com/threerings/whirled/spot/data/SceneLocation.as index d2de3003f..0469cb2ec 100644 --- a/src/as/com/threerings/whirled/spot/data/SceneLocation.as +++ b/src/as/com/threerings/whirled/spot/data/SceneLocation.as @@ -23,6 +23,9 @@ package com.threerings.whirled.spot.data { import com.threerings.util.Hashable; +import com.threerings.io.ObjectInputStream; +import com.threerings.io.ObjectOutputStream; + import com.threerings.presents.dobj.DSet_Entry; /** @@ -65,5 +68,19 @@ public class SceneLocation { return loc.hashCode(); } + + // documentation inherited from superinterface Streamable + public function writeObject (out :ObjectOutputStream) :void + { + out.writeInt(bodyOid); + out.writeObject(loc); + } + + // documentation inherited from superinterface Streamable + public function readObject (ins :ObjectInputStream) :void + { + bodyOid = ins.readInt(); + loc = (ins.readObject() as Location); + } } } diff --git a/src/as/com/threerings/whirled/spot/data/SpotMarshaller.as b/src/as/com/threerings/whirled/spot/data/SpotMarshaller.as index 8f79a4f7e..2ae4762f6 100644 --- a/src/as/com/threerings/whirled/spot/data/SpotMarshaller.as +++ b/src/as/com/threerings/whirled/spot/data/SpotMarshaller.as @@ -28,7 +28,7 @@ import com.threerings.presents.client.Client; import com.threerings.presents.client.InvocationService; import com.threerings.presents.client.ConfirmListener; import com.threerings.presents.data.InvocationMarshaller; -import com.threerings.presents.data.ConfirmMarshaller; +import com.threerings.presents.data.InvocationMarshaller_ConfirmMarshaller; import com.threerings.presents.dobj.InvocationResponseEvent; import com.threerings.whirled.client.SceneService; import com.threerings.whirled.client.SceneService_SceneMoveListener; @@ -52,7 +52,7 @@ public class SpotMarshaller extends InvocationMarshaller // documentation inherited from interface public function changeLocation (arg1 :Client, arg2 :int, arg3 :Location, arg4 :ConfirmListener) :void { - var listener4 :ConfirmMarshaller = new ConfirmMarshaller(); + var listener4 :InvocationMarshaller_ConfirmMarshaller = new InvocationMarshaller_ConfirmMarshaller(); listener4.listener = arg4; sendRequest(arg1, CHANGE_LOCATION, [ new Integer(arg2), arg3, listener4 @@ -76,7 +76,7 @@ public class SpotMarshaller extends InvocationMarshaller // documentation inherited from interface public function joinCluster (arg1 :Client, arg2 :int, arg3 :ConfirmListener) :void { - var listener3 :ConfirmMarshaller = new ConfirmMarshaller(); + var listener3 :InvocationMarshaller_ConfirmMarshaller = new InvocationMarshaller_ConfirmMarshaller(); listener3.listener = arg3; sendRequest(arg1, JOIN_CLUSTER, [ new Integer(arg2), listener3 diff --git a/src/as/com/threerings/whirled/spot/data/SpotSceneModel.as b/src/as/com/threerings/whirled/spot/data/SpotSceneModel.as index 49b126056..c793e342e 100644 --- a/src/as/com/threerings/whirled/spot/data/SpotSceneModel.as +++ b/src/as/com/threerings/whirled/spot/data/SpotSceneModel.as @@ -85,14 +85,14 @@ public class SpotSceneModel // documentation inherited from interface Streamable public function writeObject (out :ObjectOutputStream) :void { - out.writeField(portals); + out.writeObject(portals); out.writeInt(defaultEntranceId); } // documentation inherited from interface Streamable public function readObject (ins :ObjectInputStream) :void { - portals = (ins.readField(TypedArray.getJavaType(Portal)) as TypedArray); + portals = (ins.readObject() as TypedArray); defaultEntranceId = ins.readInt(); } diff --git a/src/as/com/threerings/whirled/spot/data/SpotSceneObject.as b/src/as/com/threerings/whirled/spot/data/SpotSceneObject.as index b5d848f05..2376c95b0 100644 --- a/src/as/com/threerings/whirled/spot/data/SpotSceneObject.as +++ b/src/as/com/threerings/whirled/spot/data/SpotSceneObject.as @@ -21,6 +21,9 @@ package com.threerings.whirled.spot.data { +import com.threerings.io.ObjectInputStream; +import com.threerings.io.ObjectOutputStream; + import com.threerings.presents.dobj.DSet; import com.threerings.whirled.data.SceneObject; @@ -52,7 +55,7 @@ public class SpotSceneObject extends SceneObject */ public function addToOccupantLocs (elem :DSet_Entry) :void { - requestEntryAdd(OCCUPANT_LOCS, occupantLocs, elem); + requestEntryAdd(OCCUPANT_LOCS, elem); } /** @@ -62,7 +65,7 @@ public class SpotSceneObject extends SceneObject */ public function removeFromOccupantLocs (key :Object) :void { - requestEntryRemove(OCCUPANT_LOCS, occupantLocs, key); + requestEntryRemove(OCCUPANT_LOCS, key); } /** @@ -72,7 +75,7 @@ public class SpotSceneObject extends SceneObject */ public function updateOccupantLocs (elem :DSet_Entry) :void { - requestEntryUpdate(OCCUPANT_LOCS, occupantLocs, elem); + requestEntryUpdate(OCCUPANT_LOCS, elem); } /** @@ -98,7 +101,7 @@ public class SpotSceneObject extends SceneObject */ public function addToClusters (elem :DSet_Entry) :void { - requestEntryAdd(CLUSTERS, clusters, elem); + requestEntryAdd(CLUSTERS, elem); } /** @@ -108,7 +111,7 @@ public class SpotSceneObject extends SceneObject */ public function removeFromClusters (key :Object) :void { - requestEntryRemove(CLUSTERS, clusters, key); + requestEntryRemove(CLUSTERS, key); } /** @@ -118,7 +121,7 @@ public class SpotSceneObject extends SceneObject */ public function updateClusters (elem :DSet_Entry) :void { - requestEntryUpdate(CLUSTERS, clusters, elem); + requestEntryUpdate(CLUSTERS, elem); } /** @@ -137,5 +140,23 @@ public class SpotSceneObject extends SceneObject this.clusters = value; } // AUTO-GENERATED: METHODS END + + // documentation inherited + public override function writeObject (out :ObjectOutputStream) :void + { + super.writeObject(out); + + out.writeObject(occupantLocs); + out.writeObject(clusters); + } + + // documentation inherited + public override function readObject (ins :ObjectInputStream) :void + { + super.readObject(ins); + + occupantLocs = (ins.readObject() as DSet); + clusters = (ins.readObject() as DSet); + } } }