com.threerings.stage.data
Class ModifyObjectsUpdate

java.lang.Object
  extended by com.threerings.whirled.data.SceneUpdate
      extended by com.threerings.stage.data.ModifyObjectsUpdate
All Implemented Interfaces:
Streamable, Cloneable

public class ModifyObjectsUpdate
extends SceneUpdate

A scene update that is broadcast when objects have been added to or removed from the scene.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
Streamable.Closure
 
Field Summary
 com.threerings.miso.data.ObjectInfo[] added
          The objects added to the scene (or null for none).
 com.threerings.miso.data.ObjectInfo[] removed
          The objects removed from the scene (or null for none).
 
Fields inherited from class com.threerings.whirled.data.SceneUpdate
_dbSer, _targetId, _targetVersion
 
Constructor Summary
ModifyObjectsUpdate()
           
 
Method Summary
 void apply(SceneModel model)
          Applies this update to the specified scene model.
 void init(int targetId, int targetVersion, com.threerings.miso.data.ObjectInfo[] added, com.threerings.miso.data.ObjectInfo[] removed)
          Initializes this update with all necessary data.
 
Methods inherited from class com.threerings.whirled.data.SceneUpdate
getSceneId, getSceneVersion, getVersionIncrement, init, persistTo, readObject, toString, toString, unpersistFrom, validate, writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

added

public com.threerings.miso.data.ObjectInfo[] added
The objects added to the scene (or null for none).


removed

public com.threerings.miso.data.ObjectInfo[] removed
The objects removed from the scene (or null for none).

Constructor Detail

ModifyObjectsUpdate

public ModifyObjectsUpdate()
Method Detail

init

public void init(int targetId,
                 int targetVersion,
                 com.threerings.miso.data.ObjectInfo[] added,
                 com.threerings.miso.data.ObjectInfo[] removed)
Initializes this update with all necessary data.

Parameters:
added - the objects added to the scene, or null for none
removed - the objects removed from the scene, or null for none

apply

public void apply(SceneModel model)
Description copied from class: SceneUpdate
Applies this update to the specified scene model. Derived classes will want to override this method and apply updates of their own, being sure to call super.apply.

Overrides:
apply in class SceneUpdate