org.jbox2d.serialization
Interface JbDeserializer

All Known Implementing Classes:
PbDeserializer

public interface JbDeserializer


Nested Class Summary
static interface JbDeserializer.ObjectListener
          Called for each physics object with a tag defined.
 
Method Summary
 org.jbox2d.dynamics.Body deserializeBody(org.jbox2d.dynamics.World world, InputStream input)
          Deserializes a body
 org.jbox2d.dynamics.Fixture deserializeFixture(org.jbox2d.dynamics.Body body, InputStream input)
          Deserializes a fixture
 org.jbox2d.dynamics.joints.Joint deserializeJoint(org.jbox2d.dynamics.World world, InputStream input, Map<Integer,org.jbox2d.dynamics.Body> bodyMap, Map<Integer,org.jbox2d.dynamics.joints.Joint> jointMap)
          Deserializes a joint
 org.jbox2d.collision.shapes.Shape deserializeShape(InputStream input)
          Deserializes a shape
 org.jbox2d.dynamics.World deserializeWorld(InputStream input)
          Deserializes a world
 void setObjectListener(JbDeserializer.ObjectListener argListener)
          Sets the object listener, which allows the user to process each physics object with a tag to do any sort of custom logic.
 void setUnsupportedListener(UnsupportedListener argListener)
          Sets a listener for unsupported exceptions instead of stopping the whole deserialization process by throwing and exception.
 

Method Detail

setObjectListener

void setObjectListener(JbDeserializer.ObjectListener argListener)
Sets the object listener, which allows the user to process each physics object with a tag to do any sort of custom logic.

Parameters:
argListener -

setUnsupportedListener

void setUnsupportedListener(UnsupportedListener argListener)
Sets a listener for unsupported exceptions instead of stopping the whole deserialization process by throwing and exception.

Parameters:
argListener -

deserializeWorld

org.jbox2d.dynamics.World deserializeWorld(InputStream input)
                                           throws IOException,
                                                  UnsupportedObjectException
Deserializes a world

Parameters:
input -
Returns:
Throws:
IOException
UnsupportedObjectException - if a read physics object is unsupported by this library
See Also:
setUnsupportedListener(UnsupportedListener)

deserializeBody

org.jbox2d.dynamics.Body deserializeBody(org.jbox2d.dynamics.World world,
                                         InputStream input)
                                         throws IOException,
                                                UnsupportedObjectException
Deserializes a body

Parameters:
world -
input -
Returns:
Throws:
IOException
UnsupportedObjectException - if a read physics object is unsupported by this library
See Also:
setUnsupportedListener(UnsupportedListener)

deserializeFixture

org.jbox2d.dynamics.Fixture deserializeFixture(org.jbox2d.dynamics.Body body,
                                               InputStream input)
                                               throws IOException,
                                                      UnsupportedObjectException
Deserializes a fixture

Parameters:
body -
input -
Returns:
Throws:
IOException
UnsupportedObjectException - if a read physics object is unsupported by this library
See Also:
setUnsupportedListener(UnsupportedListener)

deserializeShape

org.jbox2d.collision.shapes.Shape deserializeShape(InputStream input)
                                                   throws IOException,
                                                          UnsupportedObjectException
Deserializes a shape

Parameters:
input -
Returns:
Throws:
IOException
UnsupportedObjectException - if a read physics object is unsupported by this library
See Also:
setUnsupportedListener(UnsupportedListener)

deserializeJoint

org.jbox2d.dynamics.joints.Joint deserializeJoint(org.jbox2d.dynamics.World world,
                                                  InputStream input,
                                                  Map<Integer,org.jbox2d.dynamics.Body> bodyMap,
                                                  Map<Integer,org.jbox2d.dynamics.joints.Joint> jointMap)
                                                  throws IOException,
                                                         UnsupportedObjectException
Deserializes a joint

Parameters:
world -
input -
bodyMap -
jointMap -
Returns:
Throws:
IOException
UnsupportedObjectException - if a read physics object is unsupported by this library
See Also:
setUnsupportedListener(UnsupportedListener)


Copyright © 2013. All Rights Reserved.