Package org.robwork.sdurw_common
Class Serializable
- java.lang.Object
-
- org.robwork.sdurw_common.Serializable
-
public class Serializable extends java.lang.Object
interface for defining serialization of classes. If a class cannot inherit
the Serializable because of non-access to code then one can instead provide
overloaded read/write methods to perform the serialization.
-
-
Constructor Summary
Constructors Constructor Description Serializable(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
static long
getCPtr(Serializable obj)
void
read(InputArchive iarchive, java.lang.String id)
Enable read-serialization of inherited class by implementing this method.void
write(OutputArchive oarchive, java.lang.String id)
Enable write-serialization of inherited class by implementing this method.
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(Serializable obj)
-
delete
public void delete()
-
read
public void read(InputArchive iarchive, java.lang.String id)
Enable read-serialization of inherited class by implementing this method. Data is read
from iarchive and filled into this object.- Parameters:
iarchive
- [in] the InputArchive from which to read data.id
- [in] The id of the serialized sobject.
Note: the id can be empty in which case the overloaded method should provide
a default identifier. E.g. the Vector3D class defined "Vector3D" as its default
id.
-
write
public void write(OutputArchive oarchive, java.lang.String id)
Enable write-serialization of inherited class by implementing this method. Data is
written to oarchive from this object.- Parameters:
oarchive
- [out] the OutputArchive in which data should be written.id
- [in] The id of the serialized sobject.
Note: the id can be empty in which case the overloaded method should provide
a default identifier. E.g. the Vector3D class defined "Vector3D" as its default
id.
-
-