FDO API Reference Feature Data Objects
Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

FdoXmlSerializable Class Reference

#include <Serializable.h>

Inherited by FdoFeatureSchema, FdoFeatureSchemaCollection, FdoPhysicalSchemaMapping, and FdoPhysicalSchemaMappingCollection.

Inheritance diagram for FdoXmlSerializable:

[legend]
List of all members.

Detailed Description

FdoXmlSerializable provides the ability to serialize an FDO object to an XML Document. Serialization support can be added to any class by basing it on FdoXmlSerializable and implementing the _writeXml callback.

Definition at line 28 of file Serializable.h.


Public Member Functions

virtual FDO_API FdoXmlReaderGetFromInternalStylesheet ()
 Gets the stylesheet for converting the XML document from internal to external format. When classes derived from FdoXmlSerializable define an internal format, they must override this function to return a stylesheet that does the conversion.
virtual FDO_API void WriteXml (FdoIoStream *stream, FdoXmlFlags *flags=NULL)
 Writes to a stream. A complete XML document, containing this object, is written.
virtual FDO_API void WriteXml (FdoIoTextWriter *textWriter, FdoXmlFlags *flags=NULL)
 Writes to a text writer. A complete XML document, containing this object, is written.
virtual FDO_API void WriteXml (FdoXmlWriter *xmlWriter, FdoXmlFlags *flags=NULL)
 Writes to an XML writer. This object is appended to the XML document being written. Unlike the other WriteXml() functions it is not necessarily the only object in its document.
virtual FDO_API void WriteXml (FdoString *fileName, FdoXmlFlags *flags=NULL)
 Writes this object to a file. A complete XML document, containing this object, is written.

Protected Member Functions

virtual FDO_API void _writeXml (FdoXmlWriter *xmlWriter, const FdoXmlFlags *flags)=0
 Callback for writing to XML. Derived classes must implement this function to serialize the class into XML element(s). The class must be written as one XML element (with 0 or more sub-elements).

Member Function Documentation

virtual FDO_API void FdoXmlSerializable::_writeXml FdoXmlWriter xmlWriter,
const FdoXmlFlags flags
[protected, pure virtual]
 

Callback for writing to XML. Derived classes must implement this function to serialize the class into XML element(s). The class must be written as one XML element (with 0 or more sub-elements).

Parameters:
xmlWriter Input serialize to this XML writer. FdoXmlWriter provides functions for writing elements and attributes.
flags Input the XML flags that were passed to FdoXmlSerializable::WriteXml()

Implemented in FdoPhysicalSchemaMapping, FdoPhysicalSchemaMappingCollection, FdoFeatureSchema, FdoFeatureSchemaCollection, and FdoXmlSchemaMapping.

virtual FDO_API FdoXmlReader* FdoXmlSerializable::GetFromInternalStylesheet  )  [virtual]
 

Gets the stylesheet for converting the XML document from internal to external format. When classes derived from FdoXmlSerializable define an internal format, they must override this function to return a stylesheet that does the conversion.

Returns:
Returns NULL by default (no internal format defined)

Reimplemented in FdoFeatureSchema, and FdoFeatureSchemaCollection.

virtual FDO_API void FdoXmlSerializable::WriteXml FdoIoStream stream,
FdoXmlFlags flags = NULL
[virtual]
 

Writes to a stream. A complete XML document, containing this object, is written.

Parameters:
stream Input the stream. When this function completes, the stream's current position will be just after this object.
flags Input controls the writing of the elements to the stream. If NULL then the default flags are used (see FdoXmlFlags::Create())

virtual FDO_API void FdoXmlSerializable::WriteXml FdoIoTextWriter textWriter,
FdoXmlFlags flags = NULL
[virtual]
 

Writes to a text writer. A complete XML document, containing this object, is written.

Parameters:
textWriter Input the text writer.When this function completes, the text writer's current position will be just after this object.
flags Input controls the writing of the elements to the writer. If NULL then the default flags are used (see FdoXmlFlags::Create())

virtual FDO_API void FdoXmlSerializable::WriteXml FdoXmlWriter xmlWriter,
FdoXmlFlags flags = NULL
[virtual]
 

Writes to an XML writer. This object is appended to the XML document being written. Unlike the other WriteXml() functions it is not necessarily the only object in its document.

Parameters:
xmlWriter Input the XML writer. When this function completes, the XML writer's current position will be just after this object.
flags Input controls the writing of the elements to the writer. If NULL then the default flags are used (see FdoXmlFlags::Create())

virtual FDO_API void FdoXmlSerializable::WriteXml FdoString fileName,
FdoXmlFlags flags = NULL
[virtual]
 

Writes this object to a file. A complete XML document, containing this object, is written.

Parameters:
fileName Input the file name.
flags Input controls the writing of the elements to the document. If NULL then the default flags are used (see FdoXmlFlags::Create())

The documentation for this class was generated from the following file:
Comments or suggestions? Send us feedback.