DWFToolkit::DWFSectionDescriptorReader Class Reference
[DWF Package API]

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

Collaboration diagram for DWFToolkit::DWFSectionDescriptorReader:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

Since:
7.0.1
This class contains some shared processing logic particular to the known versions of the descriptor.xml section documents. The algorithm is tuned specifically for these 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 DWFSectionDescriptorReader::teProviderType flags.

Definition at line 70 of file SectionDescriptorReader.h.

Public Types

enum  teProviderType { eProvideNone = 0x00, eProvideAttributes = 0x01, eProvideType = 0x02, eProvideAll = 0xFF }

Public Member Functions

_DWFTK_API DWFSectionDescriptorReader (DWFPackageReader *pPackageReader=NULL, unsigned char nProviderFlags=eProvideAll) throw ()
virtual _DWFTK_API ~DWFSectionDescriptorReader () throw ()
_DWFTK_API DWFSectionDescriptorReaderfilter () const throw ()
_DWFTK_API void setFilter (DWFSectionDescriptorReader *pFilter) throw ()
virtual _DWFTK_API bool provideType (const char *zType) throw ()
virtual _DWFTK_API void notifyStartElement (const char *zName, const char **ppAttributeList) throw ()
virtual _DWFTK_API void notifyEndElement (const char *zName) throw ()
virtual _DWFTK_API void notifyStartNamespace (const char *zPrefix, const char *zURI) throw ()
virtual _DWFTK_API void notifyEndNamespace (const char *zPrefix) throw ()
virtual _DWFTK_API void notifyCharacterData (const char *zCData, int nLength) throw ()

Protected Attributes

DWFXMLElementBuilder _oDefaultElementBuilder
DWFXMLElementBuilder_pElementBuilder
DWFPackageReader_pPackageReader


Member Enumeration Documentation

enum DWFToolkit::DWFSectionDescriptorReader::teProviderType
 

These enumeration flags alter the behavior of the parser by restricting which elements are inflated into runtime objects. Generally these only prevent 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.)
eProvideAttributes  Invoke the _provideAttributes() callback.
eProvideType  Invoke the provideType() attribute callback.
eProvideAll  Equivalent to (eProvideAttributes | eProvideType)

Definition at line 82 of file SectionDescriptorReader.h.


Constructor & Destructor Documentation

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

Constructor

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

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

Destructor

Exceptions:
None 


Member Function Documentation

_DWFTK_API DWFSectionDescriptorReader* DWFToolkit::DWFSectionDescriptorReader::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 

virtual _DWFTK_API void DWFToolkit::DWFSectionDescriptorReader::notifyCharacterData const char *  zCData,
int  nLength
throw () [virtual]
 

virtual _DWFTK_API void DWFToolkit::DWFSectionDescriptorReader::notifyEndElement const char *  zName  )  throw () [virtual]
 

virtual _DWFTK_API void DWFToolkit::DWFSectionDescriptorReader::notifyEndNamespace const char *  zPrefix  )  throw () [virtual]
 

virtual _DWFTK_API void DWFToolkit::DWFSectionDescriptorReader::notifyStartElement const char *  zName,
const char **  ppAttributeList
throw () [virtual]
 

virtual _DWFTK_API void DWFToolkit::DWFSectionDescriptorReader::notifyStartNamespace const char *  zPrefix,
const char *  zURI
throw () [virtual]
 

virtual _DWFTK_API bool DWFToolkit::DWFSectionDescriptorReader::provideType const char *  zType  )  throw () [virtual]
 

Accepts the section type attribute.

Parameters:
zType The section type.
Returns:
If true, provide the type to the filter.
Exceptions:
None 

_DWFTK_API void DWFToolkit::DWFSectionDescriptorReader::setFilter DWFSectionDescriptorReader 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::DWFSectionDescriptorReader::_oDefaultElementBuilder [protected]
 

Default building behavior and element object allocator for readers.

Definition at line 224 of file SectionDescriptorReader.h.

DWFXMLElementBuilder* DWFToolkit::DWFSectionDescriptorReader::_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 231 of file SectionDescriptorReader.h.

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

DWF package content source.

Definition at line 236 of file SectionDescriptorReader.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