Rebuilt various bits using the code generator. Annotated some Java sources

along the way.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@99 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Michael Bayne
2006-10-05 21:00:38 +00:00
parent 0ecfaac648
commit 1ad2584a17
10 changed files with 285 additions and 218 deletions
@@ -26,7 +26,7 @@ import com.threerings.util.Cloneable;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.io.Streamable;
import com.threerings.io.SimpleStreamableObject;
import com.threerings.io.TypedArray;
/**
@@ -38,8 +38,8 @@ import com.threerings.io.TypedArray;
* what is transmitted over the wire when communicating scenes from the
* server to the client.
*/
public class SceneModel
implements Streamable, Cloneable
public class SceneModel extends SimpleStreamableObject
implements Cloneable
{
/** This scene's unique identifier. */
public var sceneId :int;
@@ -56,6 +56,21 @@ public class SceneModel
/** Auxiliary scene model information. */
public var auxModels :TypedArray = TypedArray.create(AuxModel);
/**
* Creates and returns a blank scene model.
*/
public static function blankSceneModel () :SceneModel
{
var model :SceneModel = new SceneModel();
populateBlankSceneModel(model);
return model;
}
public function SceneModel ()
{
// nothing needed
}
/**
* Adds the specified auxiliary model to this scene model.
*/
@@ -81,31 +96,23 @@ public class SceneModel
}
// documentation inherited from interface Streamable
public function writeObject (out :ObjectOutputStream) :void
{
out.writeInt(sceneId);
out.writeField(name);
out.writeInt(version);
out.writeObject(auxModels);
}
// documentation inherited from interface Streamable
public function readObject (ins :ObjectInputStream) :void
override public function readObject (ins :ObjectInputStream) :void
{
super.readObject(ins);
sceneId = ins.readInt();
name = (ins.readField(String) as String);
version = ins.readInt();
auxModels = (ins.readObject() as TypedArray);
}
/**
* Creates and returns a blank scene model.
*/
public static function blankSceneModel () :SceneModel
// documentation inherited from interface Streamable
override public function writeObject (out :ObjectOutputStream) :void
{
var model :SceneModel = new SceneModel();
populateBlankSceneModel(model);
return model;
super.writeObject(out);
out.writeInt(sceneId);
out.writeField(name);
out.writeInt(version);
out.writeObject(auxModels);
}
/**