DWFToolkit::DWFObjectDefinitionReader Class Reference
[DWF Package API]

#include "dwf/package/reader/ObjectDefinitionReader.h"

Collaboration diagram for DWFToolkit::DWFObjectDefinitionReader:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class implements the required XML parsing handlers to compose toolkit objects from the object definitions documents and provide them via the typed callbacks.

Since:
7.0.1
This class contains the processing logic particular to the known versions of the object definition documents. The algorithm is tuned specifically for this schema and is not intended to be generic.

Todo:
Provide filtering for object definition parsing.

Definition at line 58 of file ObjectDefinitionReader.h.

Public Types

enum  teProviderType {
  eProvideNone = 0x00, eProvideVersion = 0x01, eProvideProperties = 0x02, eProvideObjects = 0x04,
  eProvideInstances = 0x08, eProvideAttributes = 0x01, eProvideElements = 0x0E, eProvideAll = 0xFF
}

Public Member Functions

_DWFTK_API DWFObjectDefinitionReader (DWFPackageReader *pPackageReader=NULL, unsigned char nProviderFlags=eProvideAll) throw ()
virtual _DWFTK_API ~DWFObjectDefinitionReader () throw ()
virtual _DWFTK_API double provideVersion (double nVersion) throw ()
virtual _DWFTK_API void provideProperties (const DWFString &zID, tStringVector *pPropertyRefs, DWFProperty::tList *pPropertyList) throw ()
virtual _DWFTK_API DWFDefinedObjectprovideObject (DWFDefinedObject *pObject) throw ()
virtual _DWFTK_API DWFDefinedObjectInstanceprovideInstance (DWFDefinedObjectInstance *pInstance) throw ()
_DWFTK_API void notifyStartElement (const char *zName, const char **ppAttributeList) throw ()
_DWFTK_API void notifyEndElement (const char *zName) throw ()
_DWFTK_API void notifyStartNamespace (const char *zPrefix, const char *zURI) throw ()
_DWFTK_API void notifyEndNamespace (const char *zPrefix) throw ()
_DWFTK_API void notifyCharacterData (const char *zCData, int nLength) throw ()

Protected Attributes

DWFPackageReader_pPackageReader
DWFXMLElementBuilder _oDefaultElementBuilder
DWFXMLElementBuilder_pElementBuilder


Member Enumeration Documentation

enum DWFToolkit::DWFObjectDefinitionReader::teProviderType
 

These enumeration flags alter the behavior of the parser by restricting which elements are inflated into runtime objects. Generally this prevents unwanted object creation (and thus memory allocations) but in some cases, additional data processing can be avoided.

Enumerator:
eProvideNone  Parse the document only (no data objects will be created; no callbacks will be invoked.)
eProvideVersion  Invoke the provideVersion() attribute callback.
eProvideProperties  Invoke the provideProperties() element callback.
eProvideObjects  Invoke the provideObject() element callback.
eProvideInstances  Invoke the provideInstance() element callback.
eProvideAttributes  Equivalent to eProvideVersion
eProvideElements  Equivalent to (eProvideProperties | eProvideObjects | eProvideInstances)
eProvideAll  Equivalent to (eProvideAttributes | eProvideElements)

Definition at line 70 of file ObjectDefinitionReader.h.


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::DWFObjectDefinitionReader::DWFObjectDefinitionReader DWFPackageReader pPackageReader = NULL,
unsigned char  nProviderFlags = eProvideAll
throw ()
 

Constructor

Parameters:
pPackageReader Provides the manifest document stream.
nProviderFlags A combination of teProviderType flags.
Exceptions:
None 

virtual _DWFTK_API DWFToolkit::DWFObjectDefinitionReader::~DWFObjectDefinitionReader  )  throw () [virtual]
 

Destructor

Exceptions:
None 


Member Function Documentation

_DWFTK_API void DWFToolkit::DWFObjectDefinitionReader::notifyCharacterData const char *  zCData,
int  nLength
throw ()
 

_DWFTK_API void DWFToolkit::DWFObjectDefinitionReader::notifyEndElement const char *  zName  )  throw ()
 

_DWFTK_API void DWFToolkit::DWFObjectDefinitionReader::notifyEndNamespace const char *  zPrefix  )  throw ()
 

_DWFTK_API void DWFToolkit::DWFObjectDefinitionReader::notifyStartElement const char *  zName,
const char **  ppAttributeList
throw ()
 

_DWFTK_API void DWFToolkit::DWFObjectDefinitionReader::notifyStartNamespace const char *  zPrefix,
const char *  zURI
throw ()
 

virtual _DWFTK_API DWFDefinedObjectInstance* DWFToolkit::DWFObjectDefinitionReader::provideInstance DWFDefinedObjectInstance pInstance  )  throw () [virtual]
 

Accepts defined object instance elements.

Parameters:
pInstance The new defined object instance. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
Returns:
The filtered instance object.
Exceptions:
None 

virtual _DWFTK_API DWFDefinedObject* DWFToolkit::DWFObjectDefinitionReader::provideObject DWFDefinedObject pObject  )  throw () [virtual]
 

Accepts defined object elements.

Parameters:
pObject The new defined object. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
Returns:
The filtered defined object.
Exceptions:
None 

virtual _DWFTK_API void DWFToolkit::DWFObjectDefinitionReader::provideProperties const DWFString zID,
tStringVector *  pPropertyRefs,
DWFProperty::tList *  pPropertyList
throw () [virtual]
 

Accepts properties and property set references.

Parameters:
zID The identifier of the incoming property set.
pPropertyRefs A list of property set references (by ID). The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
pPropertyList The properties that comprise this set. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
Exceptions:
None 

virtual _DWFTK_API double DWFToolkit::DWFObjectDefinitionReader::provideVersion double  nVersion  )  throw () [virtual]
 

Accepts the object definition document version number attribute.

Parameters:
nVersion The document version.
Returns:
The filtered document version.
Exceptions:
None 


Member Data Documentation

DWFXMLElementBuilder DWFToolkit::DWFObjectDefinitionReader::_oDefaultElementBuilder [protected]
 

Default building behavior and element object allocator for readers.

Definition at line 256 of file ObjectDefinitionReader.h.

DWFXMLElementBuilder* DWFToolkit::DWFObjectDefinitionReader::_pElementBuilder [protected]
 

This will point to the default builder initially. But implementation classes can alter this pointer as necessary but they should all use only this pointer to do the actual work.

Definition at line 263 of file ObjectDefinitionReader.h.

DWFPackageReader* DWFToolkit::DWFObjectDefinitionReader::_pPackageReader [protected]
 

DWF package content source.

Definition at line 250 of file ObjectDefinitionReader.h.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:40:32 2009 for Autodesk DWF Toolkit by  doxygen 1.4.5