2005/5/9

     
 

class XMLObjectWriter

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

acdk::xml::XMLObjectWriter Class Reference

#include <XMLObjectWriter.h>

Inheritance diagram for acdk::xml::XMLObjectWriter:

acdk::io::AbstractObjectWriter acdk::io::AbstractFilterWriter acdk::io::ObjectWriter acdk::io::AbstractWriter acdk::io::FilterWriter acdk::lang::Object acdk::io::Writer acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

API: ACDK<br/> Writes all ACDK Objects with meta-info to XML.

This mechanism can also be used to store objects in a file.

Author:
Roger Rene Kommer (mailto:kommer@artefaktur.com)
Version:
Revision
1.20
Date:
Date
2005/04/10 12:52:41
Bug:
none known, but not very intensiv tested
please refer to ref[acdk_xml_XMLObjectReaderWriter_man]


Public Member Functions

 XMLObjectWriter (IN(RWriter) out, int flags=XMLSerializeDefaultFlags)
void doIdent (bool indent)
 writing formated XML for easier to read

virtual void writeBoolean (bool b)
 writing XML with members element names

virtual void writeChar (char b)
 From acdk::io::DataWriter.

virtual void writeUcChar (uc2char b)
 From acdk::io::DataWriter.

virtual void writeShort (short b)
 From acdk::io::DataWriter.

virtual void writeInt (int b)
 From acdk::io::DataWriter.

virtual void writeLong (jlong b)
 From acdk::io::DataWriter.

virtual void writeFloat (float b)
 From acdk::io::DataWriter.

virtual void writeDouble (double b)
 From acdk::io::DataWriter.

virtual void write (IN(RbyteArray) array, int offset=0, int len=-1)
 From acdk::io::DataWriter.

virtual void writeStringImpl (IN(RString) str)
virtual void writeOpaque (IN(RbyteArray) array)
 From acdk::io::DataWriter.

virtual void writeTagStart (IN(RString) key, IN(RString) value=Nil)
 Writes start of Tag.

virtual void writeTagEnd (IN(RString) key, IN(RString) value=Nil)
 Writes end of Tag.

virtual void writeClassId (IN(::acdk::lang::RClass) obj)
 Write boot-straping ID for the given, so the corresponding AbstractObjectReader::readObjectId() can create an acdk::lang::Object instance.


Static Public Member Functions

RString xmlencode (IN(RString) txt)
 In case ObjectWriter should handle writing Objects which may have cyclic references, for each acdk::lang::Object a local reference id.

RString xmldecode (IN(RString) txt)

Protected Member Functions

void _dumpindend ()

Private Attributes

bool _doIndent
 writing formated XML for easier to read

int _indent
 helper for render as text


Constructor & Destructor Documentation

acdk::xml::XMLObjectWriter::XMLObjectWriter IN(RWriter out,
int  flags = XMLSerializeDefaultFlags
 


Member Function Documentation

void acdk::xml::XMLObjectWriter::_dumpindend  )  [protected]
 

void acdk::xml::XMLObjectWriter::doIdent bool  indent  )  [inline]
 

writing formated XML for easier to read

virtual void acdk::xml::XMLObjectWriter::write IN(RbyteArray array,
int  offset = 0,
int  len = -1
[virtual]
 

From acdk::io::DataWriter.

In the concrete class, you have to implement these classes

Implements acdk::io::AbstractObjectWriter.

virtual void acdk::xml::XMLObjectWriter::writeBoolean bool  b  )  [virtual]
 

writing XML with members element names

Implements acdk::io::ObjectWriter.

virtual void acdk::xml::XMLObjectWriter::writeChar char  b  )  [virtual]
 

From acdk::io::DataWriter.

In the concrete class, you have to implement these classes

Implements acdk::io::AbstractObjectWriter.

virtual void acdk::xml::XMLObjectWriter::writeClassId IN(::acdk::lang::RClass obj  )  [virtual]
 

Write boot-straping ID for the given, so the corresponding AbstractObjectReader::readObjectId() can create an acdk::lang::Object instance.

Implements acdk::io::AbstractObjectWriter.

virtual void acdk::xml::XMLObjectWriter::writeDouble double  b  )  [virtual]
 

From acdk::io::DataWriter.

In the concrete class, you have to implement these classes

Implements acdk::io::AbstractObjectWriter.

virtual void acdk::xml::XMLObjectWriter::writeFloat float  b  )  [virtual]
 

From acdk::io::DataWriter.

In the concrete class, you have to implement these classes

Implements acdk::io::AbstractObjectWriter.

virtual void acdk::xml::XMLObjectWriter::writeInt int  b  )  [virtual]
 

From acdk::io::DataWriter.

In the concrete class, you have to implement these classes

Implements acdk::io::AbstractObjectWriter.

virtual void acdk::xml::XMLObjectWriter::writeLong jlong  b  )  [virtual]
 

From acdk::io::DataWriter.

In the concrete class, you have to implement these classes

Implements acdk::io::AbstractObjectWriter.

virtual void acdk::xml::XMLObjectWriter::writeOpaque IN(RbyteArray array  )  [virtual]
 

From acdk::io::DataWriter.

In the concrete class, you have to implement these classes

Reimplemented from acdk::io::AbstractObjectWriter.

virtual void acdk::xml::XMLObjectWriter::writeShort short  b  )  [virtual]
 

From acdk::io::DataWriter.

In the concrete class, you have to implement these classes

Implements acdk::io::AbstractObjectWriter.

virtual void acdk::xml::XMLObjectWriter::writeStringImpl IN(RString str  )  [virtual]
 

Implements acdk::io::AbstractObjectWriter.

virtual void acdk::xml::XMLObjectWriter::writeTagEnd IN(RString key,
IN(RString value = Nil
[virtual]
 

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

Implements acdk::io::AbstractObjectWriter.

virtual void acdk::xml::XMLObjectWriter::writeTagStart IN(RString key,
IN(RString value = Nil
[virtual]
 

Writes start of Tag.

This function will be written, to 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

Implements acdk::io::AbstractObjectWriter.

virtual void acdk::xml::XMLObjectWriter::writeUcChar uc2char  b  )  [virtual]
 

From acdk::io::DataWriter.

In the concrete class, you have to implement these classes

Implements acdk::io::AbstractObjectWriter.

RString acdk::xml::XMLObjectWriter::xmldecode IN(RString txt  )  [static]
 

RString acdk::xml::XMLObjectWriter::xmlencode IN(RString txt  )  [static]
 

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


Member Data Documentation

bool acdk::xml::XMLObjectWriter::_doIndent [private]
 

writing formated XML for easier to read

int acdk::xml::XMLObjectWriter::_indent [private]
 

helper for render as text