Serialization of ACDK Objects


| Introduction | How to use | ClassLoader | Serialization | Reflection | Attributes | Mechanism |

The metainfo of ACDK can be used to serialize ACDK Objects to a stream, XML file or other formats.

Content of this chapter:

   acdk::io::ObjectReader and acdk::io::ObjectWriter
   Object::serialized_clone(), serialized_equals() and serialized_hash()
   Parameter attributes BYVAL

 acdk::io::ObjectReader and acdk::io::ObjectWriter

Similar to the JDK ACDK provides the  acdk::io::ObjectReader and  acdk::io::ObjectWriter interface to read and write ACDK Object to and from a stream.

The class  acdk::io::BinaryObjectReader and  acdk::io::BinaryObjectWriter provides ready to use compact serialization of ACDK Objects.

In the namespace  acdk::java::serialization also classes are provided to write ACDK Object in a Java compatible format.

 Object::serialized_clone(), serialized_equals() and serialized_hash()

The standard operations of  acdk::lang::Object clone, equals and hashCode has to reimplemented by most classes.

The 'serialized' version of this methods operates on the known (not foreign) members of the specific classes.
To support the serialized version of the standard methods clone, equals, hashCode, the basic metainfo has to be gerated for the corresponding classes (see  Mechanism).

 Parameter attributes BYVAL

Likely to Java in ACDK Object parameter types will be passed as reference.
The BYVALIN and BYVALOUT will copy the Object parameter types in method calls using serialization and  acdk::io::BinaryObjectReader /  acdk::io::BinaryObjectWriter.