2005/5/9

     
 

class ObjectWriter

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::io::ObjectWriter Class Reference

#include <ObjectWriter.h>

Inheritance diagram for acdk::io::ObjectWriter:

acdk::io::DataWriter acdk::io::AbstractObjectWriter acdk::net::srfsys::FilterObjectWriter acdkx::orb::CDRObjectWriter acdk::io::BinaryObjectWriter acdk::xml::XMLObjectWriter acdk::net::srfsys::ObjectLogWriter acdkx::orb::OrbOutputStream acdk::java::serialization::JavaObjectWriter acdkx::orb::ReplyOutputStream acdkx::orb::RequestOutputStream List of all members.

Detailed Description

Interface to write Objects.

API: ACDK<br/> See also:  Serialization.

Author:
Roger Rene Kommer (mailto:kommer@artefaktur.com)
Version:
Revision
1.16
Date:
Date
2005/04/09 19:26:45


Public Member Functions

overwrite void flush ()=0
void write (const byte *cstr, int offset, int len)
overwrite void write (byte c)=0
 default implementation: byte cbuf[2]; cbuf[1] = 0; cbuf[0] = c; return write((const byte*)cbuf, 0, 1);

overwrite void setOut (IN(RWriter) writer)=0
overwrite RStorage getStorage ()=0
overwrite RWriter getStorageWriter ()=0
 returns the unfiltered Writer

overwrite void writeBoolean (bool b)=0
overwrite void writeChar (char b)=0
overwrite void writeUcChar (uc2char b)=0
overwrite void writeShort (short b)=0
overwrite void writeInt (int b)=0
overwrite void writeLong (jlong b)=0
overwrite void writeFloat (float b)=0
overwrite void writeDouble (double b)=0
overwrite void write (IN(RbyteArray) array, int offset=0, int len=-1)=0
 writes to the unterlying data stream

overwrite void writeString (IN(RString) str)=0
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)=0
 This version writes an acdk::lang::Object to a Writer using the Class.

virtual void writeScriptVar (acdk::lang::dmi::ScriptVar &sv, bool withTypeInfo=true, bool withFlags=true)
virtual void defaultWriteObject (IN(RClass) cls, IN(acdk::lang::Object) obj)=0
 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)=0
 write a class unshared without any back references to previous written objects

virtual void writeClassDescriptor (IN(RClass) cls, IN(acdk::lang::Object) obj)=0
 writes a class descriptor of current object.


Member Function Documentation

virtual void acdk::io::ObjectWriter::defaultWriteObject IN(RClass cls,
IN(acdk::lang::Object obj
[pure virtual]
 

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

Implemented in acdk::io::AbstractObjectWriter, acdk::net::srfsys::FilterObjectWriter, and acdkx::orb::CDRObjectWriter.

overwrite void acdk::io::ObjectWriter::flush  )  [pure virtual]
 

Implements acdk::io::DataWriter.

Implemented in acdk::io::AbstractObjectWriter, acdk::net::srfsys::FilterObjectWriter, and acdkx::orb::CDRObjectWriter.

overwrite RStorage acdk::io::ObjectWriter::getStorage  )  [pure virtual]
 

Implements acdk::io::DataWriter.

Implemented in acdk::io::AbstractObjectWriter, acdk::net::srfsys::FilterObjectWriter, and acdkx::orb::CDRObjectWriter.

overwrite RWriter acdk::io::ObjectWriter::getStorageWriter  )  [pure virtual]
 

returns the unfiltered Writer

Implements acdk::io::DataWriter.

Implemented in acdk::io::AbstractObjectWriter, acdk::net::srfsys::FilterObjectWriter, and acdkx::orb::CDRObjectWriter.

overwrite void acdk::io::ObjectWriter::setOut IN(RWriter writer  )  [pure virtual]
 

Implements acdk::io::DataWriter.

Implemented in acdk::io::AbstractObjectWriter, acdk::net::srfsys::FilterObjectWriter, and acdkx::orb::CDRObjectWriter.

overwrite void acdk::io::ObjectWriter::write IN(RbyteArray array,
int  offset = 0,
int  len = -1
[pure virtual]
 

writes to the unterlying data stream

Implements acdk::io::DataWriter.

Implemented in acdk::io::AbstractObjectWriter, acdk::io::BinaryObjectWriter, acdk::net::srfsys::FilterObjectWriter, acdk::xml::XMLObjectWriter, and acdkx::orb::CDRObjectWriter.

overwrite void acdk::io::ObjectWriter::write byte  c  )  [pure virtual]
 

default implementation: byte cbuf[2]; cbuf[1] = 0; cbuf[0] = c; return write((const byte*)cbuf, 0, 1);

Implements acdk::io::DataWriter.

Implemented in acdk::io::AbstractObjectWriter, acdk::io::BinaryObjectWriter, acdk::net::srfsys::FilterObjectWriter, and acdkx::orb::CDRObjectWriter.

void acdk::io::ObjectWriter::write const byte cstr,
int  offset,
int  len
[inline, virtual]
 

Reimplemented from acdk::io::DataWriter.

Reimplemented in acdk::io::AbstractObjectWriter, acdk::io::BinaryObjectWriter, acdk::net::srfsys::FilterObjectWriter, and acdkx::orb::CDRObjectWriter.

overwrite void acdk::io::ObjectWriter::writeBoolean bool  b  )  [pure virtual]
 

Implements acdk::io::DataWriter.

Implemented in acdk::io::BinaryObjectWriter, acdk::net::srfsys::FilterObjectWriter, acdk::xml::XMLObjectWriter, and acdkx::orb::CDRObjectWriter.

overwrite void acdk::io::ObjectWriter::writeChar char  b  )  [pure virtual]
 

Implements acdk::io::DataWriter.

Implemented in acdk::io::AbstractObjectWriter, acdk::io::BinaryObjectWriter, acdk::net::srfsys::FilterObjectWriter, acdk::xml::XMLObjectWriter, and acdkx::orb::CDRObjectWriter.

virtual void acdk::io::ObjectWriter::writeClassDescriptor IN(RClass cls,
IN(acdk::lang::Object obj
[pure virtual]
 

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

Implemented in acdk::io::AbstractObjectWriter, acdk::net::srfsys::FilterObjectWriter, and acdkx::orb::CDRObjectWriter.

overwrite void acdk::io::ObjectWriter::writeDouble double  b  )  [pure virtual]
 

Implements acdk::io::DataWriter.

Implemented in acdk::io::AbstractObjectWriter, acdk::io::BinaryObjectWriter, acdk::net::srfsys::FilterObjectWriter, acdk::xml::XMLObjectWriter, and acdkx::orb::CDRObjectWriter.

overwrite void acdk::io::ObjectWriter::writeFloat float  b  )  [pure virtual]
 

Implements acdk::io::DataWriter.

Implemented in acdk::io::AbstractObjectWriter, acdk::io::BinaryObjectWriter, acdk::net::srfsys::FilterObjectWriter, acdk::xml::XMLObjectWriter, and acdkx::orb::CDRObjectWriter.

overwrite void acdk::io::ObjectWriter::writeInt int  b  )  [pure virtual]
 

Implements acdk::io::DataWriter.

Implemented in acdk::io::AbstractObjectWriter, acdk::io::BinaryObjectWriter, acdk::net::srfsys::FilterObjectWriter, acdk::xml::XMLObjectWriter, and acdkx::orb::CDRObjectWriter.

overwrite void acdk::io::ObjectWriter::writeLong jlong  b  )  [pure virtual]
 

Implements acdk::io::DataWriter.

Implemented in acdk::io::AbstractObjectWriter, acdk::io::BinaryObjectWriter, acdk::net::srfsys::FilterObjectWriter, acdk::xml::XMLObjectWriter, and acdkx::orb::CDRObjectWriter.

virtual void acdk::io::ObjectWriter::writeObject IN(RClass cls,
IN(acdk::lang::Object obj
[pure virtual]
 

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.

Implemented in acdk::io::AbstractObjectWriter, acdk::net::srfsys::FilterObjectWriter, acdk::net::srfsys::ObjectLogWriter, and acdkx::orb::CDRObjectWriter.

virtual void acdk::io::ObjectWriter::writeObject IN(acdk::lang::Object obj  )  [inline, virtual]
 

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.

Parameters:
obj the acdk::lang::Object to writer

Reimplemented in acdk::io::AbstractObjectWriter, acdk::java::serialization::JavaObjectWriter, acdk::net::srfsys::FilterObjectWriter, acdk::net::srfsys::ObjectLogWriter, and acdkx::orb::CDRObjectWriter.

virtual void acdk::io::ObjectWriter::writeScriptVar acdk::lang::dmi::ScriptVar sv,
bool  withTypeInfo = true,
bool  withFlags = true
[inline, virtual]
 

Parameters:
hasTypeInfo the the is encoded in the stream
withFlags writes also the flags

Reimplemented in acdk::io::AbstractObjectWriter, acdk::net::srfsys::FilterObjectWriter, and acdkx::orb::CDRObjectWriter.

overwrite void acdk::io::ObjectWriter::writeShort short  b  )  [pure virtual]
 

Implements acdk::io::DataWriter.

Implemented in acdk::io::AbstractObjectWriter, acdk::io::BinaryObjectWriter, acdk::net::srfsys::FilterObjectWriter, acdk::xml::XMLObjectWriter, and acdkx::orb::CDRObjectWriter.

overwrite void acdk::io::ObjectWriter::writeString IN(RString str  )  [pure virtual]
 

Implements acdk::io::DataWriter.

Implemented in acdk::io::AbstractObjectWriter, acdk::java::serialization::JavaObjectWriter, acdk::net::srfsys::FilterObjectWriter, and acdkx::orb::CDRObjectWriter.

overwrite void acdk::io::ObjectWriter::writeUcChar uc2char  b  )  [pure virtual]
 

Implements acdk::io::DataWriter.

Implemented in acdk::io::AbstractObjectWriter, acdk::io::BinaryObjectWriter, acdk::net::srfsys::FilterObjectWriter, acdk::xml::XMLObjectWriter, and acdkx::orb::CDRObjectWriter.

virtual void acdk::io::ObjectWriter::writeUnshared IN(RClass cls,
IN(acdk::lang::Object obj
[pure virtual]
 

write a class unshared without any back references to previous written objects

Implemented in acdk::io::AbstractObjectWriter, acdk::net::srfsys::FilterObjectWriter, and acdkx::orb::CDRObjectWriter.