public class SceneUpdate extends Object implements com.threerings.io.Streamable, Cloneable
| Constructor and Description |
|---|
SceneUpdate() |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(SceneModel model)
Applies this update to the specified scene model.
|
int |
getSceneId()
Returns the scene id for which this update is appropriate.
|
int |
getSceneVersion()
Returns the scene version for which this update is appropriate.
|
int |
getVersionIncrement()
Returns the amount by which this update increments the scene version.
|
void |
init(int targetId,
int targetVersion)
Initializes this scene update such that it will operate on a scene with the specified target
scene and version number.
|
void |
persistTo(com.threerings.io.ObjectOutputStream out)
Serializes the bare representation of this instance without the scene id and version fields.
|
void |
readObject(com.threerings.io.ObjectInputStream in)
Reads our custom streamable fields.
|
String |
toString() |
void |
unpersistFrom(com.threerings.io.ObjectInputStream in)
Unserializes this instance from the bare representation created by
persistTo(com.threerings.io.ObjectOutputStream). |
void |
validate(SceneModel model)
Called to ensure that the scene is in the appropriate state prior to applying the update.
|
void |
writeObject(com.threerings.io.ObjectOutputStream out)
Writes our custom streamable fields.
|
public void init(int targetId,
int targetVersion)
targetId - the id of the scene on which we are to operate.targetVersion - the version of the scene on which we are to operate.public int getSceneId()
public int getSceneVersion()
public int getVersionIncrement()
public void validate(SceneModel model) throws IllegalStateException
IllegalStateException - thrown if the update cannot be applied to the scene because
it is not in a valid state (appropriate previous updates were not applied, it's the wrong
kind of scene, etc.).public void apply(SceneModel model)
super.apply.public void writeObject(com.threerings.io.ObjectOutputStream out)
throws IOException
IOExceptionpublic void readObject(com.threerings.io.ObjectInputStream in)
throws IOException,
ClassNotFoundException
IOExceptionClassNotFoundExceptionpublic void persistTo(com.threerings.io.ObjectOutputStream out)
throws IOException
IOExceptionpublic void unpersistFrom(com.threerings.io.ObjectInputStream in)
throws IOException,
ClassNotFoundException
persistTo(com.threerings.io.ObjectOutputStream).IOExceptionClassNotFoundExceptionCopyright © 2015. All rights reserved.