DWFToolkit::DWFManifestReader Class Reference
[DWF Package API]

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

Inheritance diagram for DWFToolkit::DWFManifestReader:

Inheritance graph
[legend]
Collaboration diagram for DWFToolkit::DWFManifestReader:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

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

This reader (along with almost every other reader in the toolkit) is generally used in two ways:

The actual parsing logic can be constrained though the use of the DWFManifestReader::teProviderType flags.

Definition at line 80 of file PackageManifestReader.h.

Public Types

typedef enum DWFToolkit::DWFManifestReader::teProviderType teProviderType
enum  teProviderType {
  eProvideNone = 0x00, eProvideVersion = 0x01, eProvideObjectID = 0x02, eProvideDependencies = 0x04,
  eProvideInterfaces = 0x08, eProvideProperties = 0x10, eProvideSections = 0x20, eProvideContents = 0x40,
  eProvideContentPresentations = 0x80, eProvideAttributes = 0x03, eProvideElements = 0xFC, eProvideAll = 0xFF
}

Public Member Functions

_DWFTK_API DWFManifestReader (DWFPackageReader *pPackageReader=NULL, unsigned char nProviderFlags=eProvideAll) throw ()
virtual _DWFTK_API ~DWFManifestReader () throw ()
_DWFTK_API DWFManifestReaderfilter () const throw ()
_DWFTK_API void setFilter (DWFManifestReader *pFilter) throw ()
virtual _DWFTK_API double provideVersion (double nVersion) throw ( DWFException )
virtual _DWFTK_API const char * provideObjectID (const char *zObjectID) throw ( DWFException )
virtual _DWFTK_API DWFDependencyprovideDependency (DWFDependency *pDependency) throw ( DWFException )
virtual _DWFTK_API DWFInterfaceprovideInterface (DWFInterface *pInterface) throw ( DWFException )
virtual _DWFTK_API DWFPropertyprovideProperty (DWFProperty *pProperty) throw ( DWFException )
virtual _DWFTK_API DWFSectionprovideSection (DWFSection *pSection) throw ( DWFException )
virtual _DWFTK_API DWFContentprovideContent (DWFContent *pContent) throw ( DWFException )
virtual _DWFTK_API DWFPackageContentPresentationsprovideContentPresentations (DWFPackageContentPresentations *pPackageContentPresentations) throw ( DWFException )
_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 Typedef Documentation

typedef enum DWFToolkit::DWFManifestReader::teProviderType DWFToolkit::DWFManifestReader::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.


Member Enumeration Documentation

enum DWFToolkit::DWFManifestReader::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.
eProvideObjectID  Invoke the provideObjectID() attribute callback.
eProvideDependencies  Invoke the provideDependency() element callback.
eProvideInterfaces  Invoke the provideInterface() element callback.
eProvideProperties  Invoke the provideProperty() element callback.
eProvideSections  Invoke the provideSection() element callback.
eProvideContents  Invoke the provideContent() element callback.
eProvideContentPresentations  Invoke the provideContentPresentations() element callback.
eProvideAttributes  Equivalent to (eProvideVersion | eProvideObjectID)
eProvideElements  Equivalent to (eProvideDependencies | eProvideInterfaces | eProvideProperties | eProvideSections | eProvideContents | eProvideContentPresentations)
eProvideAll  Equivalent to (eProvideAttributes | eProvideElements)

Definition at line 92 of file PackageManifestReader.h.


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::DWFManifestReader::DWFManifestReader 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::DWFManifestReader::~DWFManifestReader  )  throw () [virtual]
 

Destructor

Exceptions:
None 


Member Function Documentation

_DWFTK_API DWFManifestReader* DWFToolkit::DWFManifestReader::filter  )  const throw ()
 

Returns the parser filter, if applicable.

Returns:
The external filter to be applied to this parser. This pointer must be deleted by the caller with the DWFCORE_FREE_OBJECT macro.
Exceptions:
None 

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

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

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

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

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

virtual _DWFTK_API DWFContent* DWFToolkit::DWFManifestReader::provideContent DWFContent pContent  )  throw ( DWFException ) [virtual]
 

Accepts content element objects.

Parameters:
pContent The new content. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
Returns:
The filtered content manager object.
Exceptions:
None 
Since:
7.2.0

Reimplemented in DWFToolkit::DWFManifest.

virtual _DWFTK_API DWFPackageContentPresentations* DWFToolkit::DWFManifestReader::provideContentPresentations DWFPackageContentPresentations pPackageContentPresentations  )  throw ( DWFException ) [virtual]
 

Accepts package level content content presentation

Parameters:
pPackageContentPresentations The new package content presentations. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
Returns:
The filtered package content presentation object.
Exceptions:
None 
Since:
7.3

Reimplemented in DWFToolkit::DWFManifest.

virtual _DWFTK_API DWFDependency* DWFToolkit::DWFManifestReader::provideDependency DWFDependency pDependency  )  throw ( DWFException ) [virtual]
 

Accepts dependency element objects.

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

Reimplemented in DWFToolkit::DWFManifest.

virtual _DWFTK_API DWFInterface* DWFToolkit::DWFManifestReader::provideInterface DWFInterface pInterface  )  throw ( DWFException ) [virtual]
 

Accepts interface element objects.

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

Reimplemented in DWFToolkit::DWFManifest.

virtual _DWFTK_API const char* DWFToolkit::DWFManifestReader::provideObjectID const char *  zObjectID  )  throw ( DWFException ) [virtual]
 

Accepts the unique manifest document identifier attribute.

Parameters:
zObjectID The document ID.
Returns:
The filtered document ID.
Exceptions:
None 

Reimplemented in DWFToolkit::DWFManifest.

virtual _DWFTK_API DWFProperty* DWFToolkit::DWFManifestReader::provideProperty DWFProperty pProperty  )  throw ( DWFException ) [virtual]
 

Accepts property element objects.

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

Reimplemented in DWFToolkit::DWFManifest.

virtual _DWFTK_API DWFSection* DWFToolkit::DWFManifestReader::provideSection DWFSection pSection  )  throw ( DWFException ) [virtual]
 

Accepts section element objects.

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

Reimplemented in DWFToolkit::DWFManifest.

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

Accepts the manifest document version number attribute.

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

Reimplemented in DWFToolkit::DWFManifest.

_DWFTK_API void DWFToolkit::DWFManifestReader::setFilter DWFManifestReader pFilter  )  throw ()
 

Inserts a parser filter.

Parameters:
pFilter The filter to apply to this parser. This pointer is not ever deleted by this object. This pointer must be deleted by the caller with the DWFCORE_FREE_OBJECT macro.
Exceptions:
None 


Member Data Documentation

DWFXMLElementBuilder DWFToolkit::DWFManifestReader::_oDefaultElementBuilder [protected]
 

Default building behavior and element object allocator for readers.

Definition at line 342 of file PackageManifestReader.h.

DWFXMLElementBuilder* DWFToolkit::DWFManifestReader::_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 349 of file PackageManifestReader.h.

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

DWF package content source.

Definition at line 336 of file PackageManifestReader.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