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

FdoXmlDeserializable Class Reference

#include <Deserializable.h>

Inherits FdoXmlSaxHandler.

Inherited by FdoFeatureSchemaCollection, and FdoPhysicalSchemaMappingCollection.

Inheritance diagram for FdoXmlDeserializable:

[legend]
List of all members.

Detailed Description

FdoXmlDeserializable provides the ability to deserialize an FDO object from an XML Document. Deserialization support can be added to any class by basing it on FdoXmlDeserializable and implementing the FdoXmlSaxHander callbacks.

Definition at line 28 of file Deserializable.h.


Public Member Functions

virtual FDO_API FdoXmlFlagsGetDeserializationFlags ()
 Gets the XML Flags that were passed to the ReadXml() function that is currently being executed. This function would typically be called by the FdoXmlSaxHandler callbacks.
virtual FDO_API FdoXmlReaderGetFromExternalStylesheet ()
 Gets the stylesheet for converting the XML document from external to internal format. When classes derived from FdoXmlDeserializable define an internal format, they must override this function to return a stylesheet that does the conversion.
virtual FDO_API FdoXmlSaxContextGetSaxContext ()
 Gets the SAX context to pass to the FdoXmlSaxHandler callbacks. Classes derived from FdoXmlDeserializable can override this function to specify a SAX context with class-specific information.
virtual FDO_API FdoXmlReaderGetXmlReader ()
 Gets the current XML Reader. This function would typically be called by the FdoXmlSaxHandler callbacks when ReadXml() is being invoked. When ReadXml() reads from a file, stream, or text reader, a wrapping XML reader is automatically created.
virtual FDO_API void ReadXml (FdoIoStream *stream, FdoXmlFlags *flags=NULL)
 Reads an XML document from a stream.
virtual FDO_API void ReadXml (FdoIoTextReader *textReader, FdoXmlFlags *flags=NULL)
 Reads an XML document from a text reader.
virtual FDO_API void ReadXml (FdoXmlReader *xmlReader, FdoXmlFlags *flags=NULL)
 Reads an XML document from an XML reader.
virtual FDO_API void ReadXml (FdoString *fileName, FdoXmlFlags *flags=NULL)
 Reads from an XML document in a file.

Protected Member Functions

FDO_API FdoXmlDeserializable ()
virtual FDO_API ~FdoXmlDeserializable ()

Constructor & Destructor Documentation

FDO_API FdoXmlDeserializable::FdoXmlDeserializable  )  [protected]
 

virtual FDO_API FdoXmlDeserializable::~FdoXmlDeserializable  )  [protected, virtual]
 


Member Function Documentation

virtual FDO_API FdoXmlFlags* FdoXmlDeserializable::GetDeserializationFlags  )  [virtual]
 

Gets the XML Flags that were passed to the ReadXml() function that is currently being executed. This function would typically be called by the FdoXmlSaxHandler callbacks.

Returns:
Returns the XML Flags

virtual FDO_API FdoXmlReader* FdoXmlDeserializable::GetFromExternalStylesheet  )  [virtual]
 

Gets the stylesheet for converting the XML document from external to internal format. When classes derived from FdoXmlDeserializable 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 FdoFeatureSchemaCollection.

virtual FDO_API FdoXmlSaxContext* FdoXmlDeserializable::GetSaxContext  )  [virtual]
 

Gets the SAX context to pass to the FdoXmlSaxHandler callbacks. Classes derived from FdoXmlDeserializable can override this function to specify a SAX context with class-specific information.

Returns:
Returns NULL by default, the default FdoXmlSaxContext is used. The default provides basic error handling functionality.

Reimplemented in FdoPhysicalSchemaMappingCollection, and FdoFeatureSchemaCollection.

virtual FDO_API FdoXmlReader* FdoXmlDeserializable::GetXmlReader  )  [virtual]
 

Gets the current XML Reader. This function would typically be called by the FdoXmlSaxHandler callbacks when ReadXml() is being invoked. When ReadXml() reads from a file, stream, or text reader, a wrapping XML reader is automatically created.

Returns:
Returns the XML reader

virtual FDO_API void FdoXmlDeserializable::ReadXml FdoIoStream stream,
FdoXmlFlags flags = NULL
[virtual]
 

Reads an XML document from a stream.

Parameters:
stream Input the stream. Must be positioned at the start of an XML document.
flags Input controls the reading of the elements from the document. If NULL then the default flags are used (see FdoXmlFlags::Create())

virtual FDO_API void FdoXmlDeserializable::ReadXml FdoIoTextReader textReader,
FdoXmlFlags flags = NULL
[virtual]
 

Reads an XML document from a text reader.

Parameters:
textReader Input the text reader. Must be positioned at the start of an XML document.
flags Input controls the reading of the elements from the document. If NULL then the default flags are used (see FdoXmlFlags::Create())

virtual FDO_API void FdoXmlDeserializable::ReadXml FdoXmlReader xmlReader,
FdoXmlFlags flags = NULL
[virtual]
 

Reads an XML document from an XML reader.

Parameters:
xmlReader Input the XML reader.
flags Input controls the reading of the elements from the document. If NULL then the default flags are used (see FdoXmlFlags::Create())

virtual FDO_API void FdoXmlDeserializable::ReadXml FdoString fileName,
FdoXmlFlags flags = NULL
[virtual]
 

Reads from an XML document in a file.

Parameters:
fileName Input the file name. Must consist of an XML document.
flags Input controls the reading of the elements from 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.