Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages | Examples

DWFToolkit::DWFEModelSectionDescriptorReader Class Reference
[DWF Package API]

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

Inheritance diagram for DWFToolkit::DWFEModelSectionDescriptorReader:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

This class implements the required XML parsing handlers to compose toolkit objects from EModel section descriptor 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 EModel section descriptor.xml 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 constained though the use of the DWFEModelSectionDescriptorReader::teProviderType flags.

Definition at line 72 of file EModelSectionDescriptorReader.h.

Public Types

enum  teProviderType {
  eProvideNone = 0x000, eProvideName = 0x001, eProvideVersion = 0x002, eProvidePlotOrder = 0x004,
  eProvideProperties = 0x010, eProvideResources = 0x020, eProvideUnits = 0x040, eProvideUntypedResource = 0x100,
  eProvideFontResource = 0x200, eProvideGraphicResource = 0x400, eProvideImageResource = 0x800, eProvideAttributes = 0x00F,
  eProvideElements = 0xFF0, eProvideAll = 0xFFF
}

Public Member Functions

_DWFTK_API DWFEModelSectionDescriptorReader (DWFPackageReader *pPackageReader=NULL, unsigned int nProviderFlags=eProvideAll) throw ()
virtual _DWFTK_API ~DWFEModelSectionDescriptorReader () throw ()
_DWFTK_API DWFEModelSectionDescriptorReaderfilter () const throw ()
_DWFTK_API void setFilter (DWFEModelSectionDescriptorReader *pFilter) throw ()
virtual _DWFTK_API const char * provideName (const char *zName) throw ()
virtual _DWFTK_API double provideVersion (double nVersion) throw ()
virtual _DWFTK_API double providePlotOrder (double nPlotOrder) throw ()
virtual _DWFTK_API DWFUnitsprovideUnits (DWFUnits *pUnits) throw ()
virtual _DWFTK_API DWFPropertyprovideProperty (DWFProperty *pProperty) throw ()
virtual _DWFTK_API DWFResourceprovideResource (DWFResource *pResource) throw ()
virtual _DWFTK_API DWFFontResourceprovideFontResource (DWFFontResource *pResource) throw ()
virtual _DWFTK_API DWFGraphicResourceprovideGraphicResource (DWFGraphicResource *pResource) throw ()
virtual _DWFTK_API DWFImageResourceprovideImageResource (DWFImageResource *pResource) 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 ()

Protected Member Functions

void _provideAttributes (const char **ppAttributeList) throw ()


Member Enumeration Documentation

enum DWFToolkit::DWFEModelSectionDescriptorReader::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.

Enumeration values:
eProvideNone  Parse the document only (no data objects will be created; no callbacks will be invoked.)
eProvideName  Invoke the provideName() attribute callback.
eProvideVersion  Invoke the provideVersion() attribute callback.
eProvidePlotOrder  Invoke the providePlotOrder() attribute callback.
eProvideProperties  Invoke the provideProperty() element callback.
eProvideResources  Indicates that resource elements should be processed.
eProvideUnits  Invoke the provideUnits() element callback.
eProvideUntypedResource  Invoke the provideResource() element callback.
eProvideFontResource  Invoke the provideFontResource() element callback.
eProvideGraphicResource  Invoke the provideGraphicResource() element callback.
eProvideImageResource  Invoke the provideImageResource() element callback.
eProvideAttributes  Equivalent to (eProvideName | eProvideVersion | eProvidePlotOrder )
eProvideElements  Equivalent to (eProvideUnits | eProvideProperties | eProvideResources | eProvideUntypedResource | eProvideFontResource | eProvideGraphicResource | eProvideImageResource)
eProvideAll  Equivalent to (eProvideAttributes | eProvideElements)

Reimplemented from DWFToolkit::DWFSectionDescriptorReader.

Definition at line 84 of file EModelSectionDescriptorReader.h.


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::DWFEModelSectionDescriptorReader::DWFEModelSectionDescriptorReader DWFPackageReader pPackageReader = NULL,
unsigned int  nProviderFlags = eProvideAll
throw ()
 

Constructor

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

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

Destructor

Exceptions:
None 


Member Function Documentation

void DWFToolkit::DWFEModelSectionDescriptorReader::_provideAttributes const char **  ppAttributeList  )  throw () [protected, virtual]
 

Accepts the attribute list from the XML parser for specialized processing.

Parameters:
ppAttributeList An array of null-terminated atribute name, value string pairs. The array itself is zero-terminated.
Exceptions:
None 

Reimplemented from DWFToolkit::DWFSectionDescriptorReader.

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

Reimplemented from DWFToolkit::DWFSectionDescriptorReader.

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

This method is notified by the static XML_EndElementHandler Expat parser callback function.

Parameters:
zName The name of the element (includes any namespace prefix)
Exceptions:
None 

Reimplemented from DWFToolkit::DWFSectionDescriptorReader.

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

This method is notified by the static XML_EndNamespaceDeclHandler Expat parser callback function.

This callback is not currently used.

Parameters:
zPrefix The namespace prefix.
Exceptions:
None 

Reimplemented from DWFToolkit::DWFSectionDescriptorReader.

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

This method is notified by the static XML_StartElementHandler Expat parser callback function.

Attribute list processing example:

                 size_t iAttrib = 0;
       
                 for(; ppAttributeList[iAttrib]; iAttrib += 2)
                 {
                    //
                    // dump attribute 
                    //
                    cout << "Attribute Name: " << ppAttributeList[iAttrib] << " ";
                    cout << "Attribute Value: " << ppAttributeList[iAttrib+1] << endl;
                }

Parameters:
zName The name of the element (includes any namespace prefix)
ppAttributeList An array of null-terminated atribute name, value string pairs. The array itself is zero-terminated.
Exceptions:
None 

Reimplemented from DWFToolkit::DWFSectionDescriptorReader.

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

This method is notified by the static XML_StartNamespaceDeclHandler Expat parser callback function.

This callback is not currently used.

Parameters:
zPrefix The namespace prefix.
zURI The namespace URI (may be NULL).
Exceptions:
None 

Reimplemented from DWFToolkit::DWFSectionDescriptorReader.

virtual _DWFTK_API DWFFontResource* DWFToolkit::DWFEModelSectionDescriptorReader::provideFontResource DWFFontResource pResource  )  throw () [virtual]
 

Accepts font resource element objects.

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

Reimplemented in DWFToolkit::DWFEModelSection.

virtual _DWFTK_API DWFGraphicResource* DWFToolkit::DWFEModelSectionDescriptorReader::provideGraphicResource DWFGraphicResource pResource  )  throw () [virtual]
 

Accepts graphic resource element objects.

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

Reimplemented in DWFToolkit::DWFEModelSection.

virtual _DWFTK_API DWFImageResource* DWFToolkit::DWFEModelSectionDescriptorReader::provideImageResource DWFImageResource pResource  )  throw () [virtual]
 

Accepts image resource element objects.

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

Reimplemented in DWFToolkit::DWFEModelSection.

virtual _DWFTK_API const char* DWFToolkit::DWFEModelSectionDescriptorReader::provideName const char *  zName  )  throw () [virtual]
 

Accepts the section name attribute.

Parameters:
zName The section name.
Returns:
The filtered section name.
Exceptions:
None 

Reimplemented in DWFToolkit::DWFEModelSection.

virtual _DWFTK_API double DWFToolkit::DWFEModelSectionDescriptorReader::providePlotOrder double  nPlotOrder  )  throw () [virtual]
 

Accepts the section plot order attribute.

Parameters:
nPlotOrder The plot order.
Returns:
The filtered plot order.
Exceptions:
None 

Reimplemented in DWFToolkit::DWFEModelSection.

virtual _DWFTK_API DWFProperty* DWFToolkit::DWFEModelSectionDescriptorReader::provideProperty DWFProperty pProperty  )  throw () [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::DWFEModelSection.

virtual _DWFTK_API DWFResource* DWFToolkit::DWFEModelSectionDescriptorReader::provideResource DWFResource pResource  )  throw () [virtual]
 

Accepts resource element objects.

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

Reimplemented in DWFToolkit::DWFEModelSection.

virtual _DWFTK_API DWFUnits* DWFToolkit::DWFEModelSectionDescriptorReader::provideUnits DWFUnits pUnits  )  throw () [virtual]
 

Accepts units element objects.

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

Reimplemented in DWFToolkit::DWFEModelSection.

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

Accepts the descriptor document version attribute.

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

Reimplemented in DWFToolkit::DWFEModelSection.

_DWFTK_API void DWFToolkit::DWFEModelSectionDescriptorReader::setFilter DWFEModelSectionDescriptorReader 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 


The documentation for this class was generated from the following file:
Generated on Tue May 17 12:39:03 2005 for Autodesk DWF Toolkit by  doxygen 1.4.1