#include <AbstractObjectWriter.h>
Inheritance diagram for acdk::io::AbstractObjectWriter:
Public Member Functions | |
AbstractObjectWriter (IN(RWriter) out, int flags=SerializeDefaultFlags) | |
void | resetLocalRefs () |
void | flush () |
void | write (byte b) |
default implementation: byte cbuf[2]; cbuf[1] = 0; cbuf[0] = c; return write((const byte*)cbuf, 0, 1); | |
void | write (const byte *cstr, int offset, int len) |
void | setOut (IN(RWriter) writer) |
RStorage | getStorage () |
Gets the storage reader. | |
RWriter | getStorageWriter () |
returns the unfiltered Writer | |
virtual void | writeObject (IN(acdk::lang::Object) obj) |
This version write acdk::lang::Object to a Writer. | |
virtual void | writeObject (IN(RClass) cls, IN(acdk::lang::Object) obj) |
This version writes an acdk::lang::Object to a Writer using the Class. | |
bool | isNamed () |
bool | isLabeled () |
bool | isTagged () |
bool | isReduced () |
bool | joinStrings () |
bool | withSerialVersionUID () |
virtual void | writeTagStart (IN(RString) key, IN(RString) value=Nil)=0 |
Writes start of Tag. | |
virtual void | writeTagEnd (IN(RString) key, IN(RString) value=Nil)=0 |
Writes end of Tag. | |
virtual void | writeClassId (IN(::acdk::lang::RClass) cls)=0 |
Write boot-straping ID for the given, so the corresponding AbstractObjectReader::readClassId() can create an acdk::lang::Object instance. | |
virtual void | writeObjectLocalId (int id) |
In case ObjectWriter should handle writing Objects which may have cyclic references, for each acdk::lang::Object a local reference id. | |
virtual void | writeChar (char b)=0 |
From acdk::io::DataWriter. | |
virtual void | writeUcChar (uc2char b)=0 |
From acdk::io::DataWriter. | |
virtual void | writeShort (short b)=0 |
From acdk::io::DataWriter. | |
virtual void | writeInt (int b)=0 |
From acdk::io::DataWriter. | |
virtual void | writeLong (jlong b)=0 |
From acdk::io::DataWriter. | |
virtual void | writeFloat (float b)=0 |
From acdk::io::DataWriter. | |
virtual void | writeDouble (double b)=0 |
From acdk::io::DataWriter. | |
virtual void | write (IN(RbyteArray) array, int offset=0, int len=-1)=0 |
From acdk::io::DataWriter. | |
virtual void | writeOpaque (IN(RbyteArray) array) |
From acdk::io::DataWriter. | |
virtual void | writeString (IN(RString) str) |
From acdk::io::DataWriter. | |
virtual void | writeStringImpl (IN(RString) str)=0 |
virtual void | writeScriptVar (acdk::lang::dmi::ScriptVar &sv, bool withTypeInfo=true, bool withFlags=true) |
void | writeStringElement (IN(RString) str) |
void | writeBooleanElement (bool b) |
void | writeCharElement (char b) |
void | writeUcCharElement (uc2char b) |
void | writeShortElement (short b) |
void | writeIntElement (int b) |
void | writeLongElement (jlong b) |
void | writeFloatElement (float b) |
void | writeDoubleElement (double b) |
virtual void | defaultWriteObject (IN(RClass) cls, IN(acdk::lang::Object) obj) |
if a class implements the writeObject method it can call defaultWriteObject for default object serialization This method only writes the acdk::lang::Object information (the fields) of this class | |
virtual void | writeUnshared (IN(RClass) cls, IN(acdk::lang::Object) obj) |
write a class unshared without any back references to previous written objects | |
virtual void | writeClassDescriptor (IN(RClass) cls, IN(acdk::lang::Object) obj) |
writes a class descriptor of current object. | |
virtual void | writeObjectHierarchy (IN(RClass) cls, IN(acdk::lang::Object) obj) |
void | writeObject2 (IN(acdk::lang::Object) obj) |
used to write recursive objects | |
void | writeObject2 (IN(RClass) cls, IN(acdk::lang::Object) obj) |
used to write recursive objects | |
Protected Member Functions | |
int | _lookupStringRef (IN(RString) str) |
looks if a string with same content already written. | |
void | _writeObject (IN(RClass) cls, IN(acdk::lang::Object) obj) |
Private Attributes | |
int | _serializeFlags |
ObjectArray | _lrefs |
::acdk::util::RTreeMap | _stringCache |
RString -> objectId;. | |
int | _maxStringId |
|
|
|
looks if a string with same content already written. If found returns ID, otherwise -1 |
|
|
|
if a class implements the writeObject method it can call defaultWriteObject for default object serialization This method only writes the acdk::lang::Object information (the fields) of this class
Implements acdk::io::ObjectWriter. |
|
Reimplemented from acdk::io::AbstractFilterWriter. |
|
Gets the storage reader. If this contains an FilterReader instead of a Storage, the storage reader of this filter reader will be returned (recursive). Reimplemented from acdk::io::AbstractFilterWriter. |
|
returns the unfiltered Writer
Reimplemented from acdk::io::AbstractFilterWriter. |
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented from acdk::io::AbstractFilterWriter. |
|
|
|
From acdk::io::DataWriter. In the concrete class, you have to implement these classes Reimplemented from acdk::io::AbstractFilterWriter. Implemented in acdk::io::BinaryObjectWriter, and acdk::xml::XMLObjectWriter. |
|
Reimplemented from acdk::io::AbstractFilterWriter. Reimplemented in acdk::io::BinaryObjectWriter. |
|
default implementation: byte cbuf[2]; cbuf[1] = 0; cbuf[0] = c; return write((const byte*)cbuf, 0, 1);
Reimplemented from acdk::io::AbstractFilterWriter. Reimplemented in acdk::io::BinaryObjectWriter. |
|
|
|
From acdk::io::DataWriter. In the concrete class, you have to implement these classes Implements acdk::io::ObjectWriter. Implemented in acdk::io::BinaryObjectWriter, and acdk::xml::XMLObjectWriter. |
|
|
|
writes a class descriptor of current object. This method will only be called once for the most derived class The main purpose of the class descriptor is to identify the class to enable restruction out of the stream Implements acdk::io::ObjectWriter. |
|
Write boot-straping ID for the given, so the corresponding AbstractObjectReader::readClassId() can create an acdk::lang::Object instance. if withSerialVersionUID() is true the SerialVersionUID should be written too.
Implemented in acdk::io::BinaryObjectWriter, and acdk::xml::XMLObjectWriter. |
|
From acdk::io::DataWriter. In the concrete class, you have to implement these classes Implements acdk::io::ObjectWriter. Implemented in acdk::io::BinaryObjectWriter, and acdk::xml::XMLObjectWriter. |
|
|
|
From acdk::io::DataWriter. In the concrete class, you have to implement these classes Implements acdk::io::ObjectWriter. Implemented in acdk::io::BinaryObjectWriter, and acdk::xml::XMLObjectWriter. |
|
|
|
From acdk::io::DataWriter. In the concrete class, you have to implement these classes Implements acdk::io::ObjectWriter. Implemented in acdk::io::BinaryObjectWriter, and acdk::xml::XMLObjectWriter. |
|
|
|
From acdk::io::DataWriter. In the concrete class, you have to implement these classes Implements acdk::io::ObjectWriter. Implemented in acdk::io::BinaryObjectWriter, and acdk::xml::XMLObjectWriter. |
|
|
|
This version writes an acdk::lang::Object to a Writer using the Class. In normal case, thit version writes the data untagged (i.e. no meta info) into the writer. Implements acdk::io::ObjectWriter. |
|
This version write acdk::lang::Object to a Writer. In normal case, it also write a description (tagged) of the Class (for ClassLoader) at the beginning.
Reimplemented from acdk::io::ObjectWriter. Reimplemented in acdk::java::serialization::JavaObjectWriter. |
|
used to write recursive objects
|
|
used to write recursive objects
|
|
|
|
In case ObjectWriter should handle writing Objects which may have cyclic references, for each acdk::lang::Object a local reference id. Recursive and duplicated elements will be written only one in the stream. If the implementing ObjectReader does not support local reference resolutions, it should throw NotSupportedException |
|
From acdk::io::DataWriter. In the concrete class, you have to implement these classes Reimplemented from acdk::io::DataWriter. Reimplemented in acdk::xml::XMLObjectWriter. |
|
Reimplemented from acdk::io::ObjectWriter. |
|
From acdk::io::DataWriter. In the concrete class, you have to implement these classes Implements acdk::io::ObjectWriter. Implemented in acdk::io::BinaryObjectWriter, and acdk::xml::XMLObjectWriter. |
|
|
|
From acdk::io::DataWriter. Classes derived from AbstractObjectWriter should overwrite writeStringImpl. Implements acdk::io::ObjectWriter. Reimplemented in acdk::java::serialization::JavaObjectWriter. |
|
|
|
Implemented in acdk::io::BinaryObjectWriter, and acdk::xml::XMLObjectWriter. |
|
Writes end of Tag. This function will be written, to For example '' for a int type. This function will be called by writeObject if the object should be written with tags Implemented in acdk::io::BinaryObjectWriter, and acdk::xml::XMLObjectWriter. |
|
Writes start of Tag. This function will be written, toIN( For example '' for a int type in a XML style writer. This function will be called by writeObject if the object should be written with tags Implemented in acdk::io::BinaryObjectWriter, and acdk::xml::XMLObjectWriter. |
|
From acdk::io::DataWriter. In the concrete class, you have to implement these classes Implements acdk::io::ObjectWriter. Implemented in acdk::io::BinaryObjectWriter, and acdk::xml::XMLObjectWriter. |
|
|
|
write a class unshared without any back references to previous written objects
Implements acdk::io::ObjectWriter. |
|
|
|
|
|
|
|
RString -> objectId;.
|