DWFToolkit::DWFContentReader Class Reference
[DWF Package API]

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

Inheritance diagram for DWFToolkit::DWFContentReader:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

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

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

Definition at line 56 of file ContentReader.h.

Public Types

typedef enum DWFToolkit::DWFContentReader::teProviderType teProviderType
typedef DWFXMLBuildable::tUnresolvedList tUnresolvedList
 Defined data type to collect unresolved attributes during the parsing process.
enum  teProviderType {
  eProvideNone = 0x000, eProvideClasses = 0x001, eProvideFeatures = 0x002, eProvideEntities = 0x004,
  eProvideObjects = 0x008, eProvideGroups = 0x010, eProvideSharedProperties = 0x020, eProvideVersion = 0x100,
  eProvideElements = 0x0FF, eProvideAttributes = 0xF00, eProvideAll = 0xFFF
}

Public Member Functions

_DWFTK_API DWFContentReader (unsigned int nProviderFlags=eProvideAll) throw ()
virtual _DWFTK_API ~DWFContentReader () throw ()
_DWFTK_API DWFContentReaderfilter () const throw ()
_DWFTK_API void setFilter (DWFContentReader *pFilter) throw ()
_DWFTK_API unsigned int providerFlags () const
_DWFTK_API void setProviderFlags (unsigned int nProviderFlags)
_DWFTK_API void notifyStartElement (const char *zName, const char **ppAttributeList) throw ()
_DWFTK_API void notifyEndElement (const char *zName) throw ()
const char **_DWFTK_API void notifyStartNamespace (const char *, const char *) throw ()
*_DWFTK_API void notifyEndNamespace (const char *) throw ()
int *_DWFTK_API void notifyCharacterData (const char *, int) throw ()
virtual _DWFTK_API const char * provideVersion (const char *zVersion) throw ( DWFException )
virtual _DWFTK_API DWFClassprovideClass (DWFClass *pClass, const tUnresolvedList &rUnresolved) throw ( DWFException )
virtual _DWFTK_API DWFFeatureprovideFeature (DWFFeature *pFeature, const tUnresolvedList &rUnresolved) throw ( DWFException )
virtual _DWFTK_API DWFEntityprovideEntity (DWFEntity *pEntity, const tUnresolvedList &rUnresolved) throw ( DWFException )
virtual _DWFTK_API DWFObjectprovideObject (DWFObject *pObject, const tUnresolvedList &rUnresolved) throw ( DWFException )
virtual _DWFTK_API DWFGroupprovideGroup (DWFGroup *pGroup, const tUnresolvedList &rUnresolved) throw ( DWFException )
virtual _DWFTK_API DWFPropertySetprovideSharedProperty (DWFPropertySet *pPropertySet, const tUnresolvedList &rUnresolved) throw ( DWFException )
virtual _DWFTK_API DWFObjectprovideChildObject (DWFObject *pObject, DWFObject *pParent, const tUnresolvedList &rUnresolved) throw ( DWFException )
virtual _DWFTK_API DWFPropertySetprovidePropertySet (DWFPropertySet *pPropertySet, DWFPropertyContainer *pContainer, const tUnresolvedList &rUnresolved) throw ( DWFException )
virtual _DWFTK_API void resolveClasses () throw ()
virtual _DWFTK_API void resolveFeatures () throw ()
virtual _DWFTK_API void resolveEntities () throw ()
virtual _DWFTK_API void resolveObjects () throw ()
virtual _DWFTK_API void resolveGroups () throw ()
virtual _DWFTK_API void resolvePropertySets () throw ()

Protected Attributes

DWFXMLElementBuilder _oDefaultElementBuilder
DWFXMLElementBuilder_pElementBuilder


Member Typedef Documentation

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


Member Enumeration Documentation

enum DWFToolkit::DWFContentReader::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.)
eProvideClasses  Invoke the provideClass() element callback.
eProvideFeatures  Invoke the provideFeature() element callback.
eProvideEntities  Invoke the provideEntity() element callback.
eProvideObjects  Invoke the provideObject() element callback.
eProvideGroups  Invoke the provideGroup() element callback.
eProvideSharedProperties  Invoke the provideSharedProperty() element callback.
eProvideVersion  Invoke the provideVersion() attribute callback.
eProvideElements  Equivalent to (eProvideClasses | eProvideFeatures | eProvideEntities | eProvideObjects | eProvideGroups | eProvideInstances | eProvideSharedProperties )
eProvideAttributes  Equivalent to (eProvideVersion)
eProvideAll  Equivalent to (eProvideElements | eProvideAttributes)

Definition at line 67 of file ContentReader.h.


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::DWFContentReader::DWFContentReader unsigned int  nProviderFlags = eProvideAll  )  throw ()
 

Constructor

Parameters:
nProviderFlags A combination of teProviderType flags.
Exceptions:
None 

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

Destructor

Exceptions:
None 


Member Function Documentation

_DWFTK_API DWFContentReader* DWFToolkit::DWFContentReader::filter  )  const throw () [inline]
 

User defined filter on the object definition reader. The filter is used to modify the parsing behavior.

Returns:
A pointer to a filter, an object of a class derived from the content reader with user defined behavior.
Exceptions:
None 

Definition at line 155 of file ContentReader.h.

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

* _DWFTK_API void DWFToolkit::DWFContentReader::notifyEndNamespace const char *   )  throw () [inline]
 

(const char* /*zPrefix

Definition at line 228 of file ContentReader.h.

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

virtual _DWFTK_API DWFObject* DWFToolkit::DWFContentReader::provideChildObject DWFObject pObject,
DWFObject pParent,
const tUnresolvedList rUnresolved
throw ( DWFException ) [virtual]
 

Accepts content objects that have parent content objects.

Parameters:
pObject The new object. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
pParent The content object that will become the parent.
rUnresolved List of unresolved attributes from the parsing process.
Returns:
The filtered object object.
Exceptions:
None 

Reimplemented in DWFToolkit::DWFContent.

virtual _DWFTK_API DWFClass* DWFToolkit::DWFContentReader::provideClass DWFClass pClass,
const tUnresolvedList rUnresolved
throw ( DWFException ) [virtual]
 

Accepts class element objects.

Parameters:
pClass The new class. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
rUnresolved List of unresolved attributes from the parsing process.
Returns:
The filtered class object.
Exceptions:
None 

Reimplemented in DWFToolkit::DWFContent.

virtual _DWFTK_API DWFEntity* DWFToolkit::DWFContentReader::provideEntity DWFEntity pEntity,
const tUnresolvedList rUnresolved
throw ( DWFException ) [virtual]
 

Accepts entity element objects.

Parameters:
pEntity The new entity. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
rUnresolved List of unresolved attributes from the parsing process.
Returns:
The filtered entity object.
Exceptions:
None 

Reimplemented in DWFToolkit::DWFContent.

virtual _DWFTK_API DWFFeature* DWFToolkit::DWFContentReader::provideFeature DWFFeature pFeature,
const tUnresolvedList rUnresolved
throw ( DWFException ) [virtual]
 

Accepts feature element objects.

Parameters:
pFeature The new feature. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
rUnresolved List of unresolved attributes from the parsing process.
Returns:
The filtered feature object.
Exceptions:
None 

Reimplemented in DWFToolkit::DWFContent.

virtual _DWFTK_API DWFGroup* DWFToolkit::DWFContentReader::provideGroup DWFGroup pGroup,
const tUnresolvedList rUnresolved
throw ( DWFException ) [virtual]
 

Accepts group element objects.

Parameters:
pGroup The new group. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
rUnresolved List of unresolved attributes from the parsing process.
Returns:
The filtered group object.
Exceptions:
None 

Reimplemented in DWFToolkit::DWFContent.

virtual _DWFTK_API DWFObject* DWFToolkit::DWFContentReader::provideObject DWFObject pObject,
const tUnresolvedList rUnresolved
throw ( DWFException ) [virtual]
 

Accepts object element objects.

Parameters:
pObject The new object. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
rUnresolved List of unresolved attributes from the parsing process.
Returns:
The filtered object object.
Exceptions:
None 

Reimplemented in DWFToolkit::DWFContent.

virtual _DWFTK_API DWFPropertySet* DWFToolkit::DWFContentReader::providePropertySet DWFPropertySet pPropertySet,
DWFPropertyContainer pContainer,
const tUnresolvedList rUnresolved
throw ( DWFException ) [virtual]
 

Accepts property sets contained by content elements or other property sets.

Parameters:
pPropertySet The new shared property set. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
pContainer The content element or property set that will own the property set.
rUnresolved List of unresolved attributes from the parsing process.
Returns:
The filtered property object.
Exceptions:
None 

Reimplemented in DWFToolkit::DWFContent.

_DWFTK_API unsigned int DWFToolkit::DWFContentReader::providerFlags  )  const [inline]
 

Get the current provider flags set on the reader.

Returns:
The current set of provider flags set on the reader.
Exceptions:
None 

Definition at line 180 of file ContentReader.h.

virtual _DWFTK_API DWFPropertySet* DWFToolkit::DWFContentReader::provideSharedProperty DWFPropertySet pPropertySet,
const tUnresolvedList rUnresolved
throw ( DWFException ) [virtual]
 

Accepts property sets targeted for the shared property collection.

Parameters:
pPropertySet The new shared property set. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
rUnresolved List of unresolved attributes from the parsing process.
Returns:
The filtered property object.
Exceptions:
None 

Reimplemented in DWFToolkit::DWFContent.

virtual _DWFTK_API const char* DWFToolkit::DWFContentReader::provideVersion const char *  zVersion  )  throw ( DWFException ) [virtual]
 

Accepts the content document version number attribute.

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

Reimplemented in DWFToolkit::DWFContent.

virtual _DWFTK_API void DWFToolkit::DWFContentReader::resolveClasses  )  throw () [inline, virtual]
 

Resolve the string based ID references into actual pointers. This is called once the reader has finished reading the collection of classes.

Exceptions:
None 

Reimplemented in DWFToolkit::DWFContent.

Definition at line 376 of file ContentReader.h.

virtual _DWFTK_API void DWFToolkit::DWFContentReader::resolveEntities  )  throw () [inline, virtual]
 

Resolve the string based ID references into actual pointers. This is called once the reader has finished reading the collection of entities.

Exceptions:
None 

Reimplemented in DWFToolkit::DWFContent.

Definition at line 400 of file ContentReader.h.

virtual _DWFTK_API void DWFToolkit::DWFContentReader::resolveFeatures  )  throw () [inline, virtual]
 

Resolve the string based ID references into actual pointers. This is called once the reader has finished reading the collection of features.

Exceptions:
None 

Reimplemented in DWFToolkit::DWFContent.

Definition at line 388 of file ContentReader.h.

virtual _DWFTK_API void DWFToolkit::DWFContentReader::resolveGroups  )  throw () [inline, virtual]
 

Resolve the string based ID references into actual pointers. This is called once the reader has finished reading the collection of groups.

Exceptions:
None 

Reimplemented in DWFToolkit::DWFContent.

Definition at line 424 of file ContentReader.h.

virtual _DWFTK_API void DWFToolkit::DWFContentReader::resolveObjects  )  throw () [inline, virtual]
 

Resolve the string based ID references into actual pointers. This is called once the reader has finished reading the collection of objects.

Exceptions:
None 

Reimplemented in DWFToolkit::DWFContent.

Definition at line 412 of file ContentReader.h.

virtual _DWFTK_API void DWFToolkit::DWFContentReader::resolvePropertySets  )  throw () [inline, virtual]
 

Resolve the string based ID references into actual pointers. This is called once the reader has finished reading all property sets, i.e. when all collections are complete.

Exceptions:
None 

Reimplemented in DWFToolkit::DWFContent.

Definition at line 436 of file ContentReader.h.

_DWFTK_API void DWFToolkit::DWFContentReader::setFilter DWFContentReader pFilter  )  throw () [inline]
 

Use this to set the filter on the reader to modify the parsing behavior.

Exceptions:
None 

Definition at line 167 of file ContentReader.h.

_DWFTK_API void DWFToolkit::DWFContentReader::setProviderFlags unsigned int  nProviderFlags  )  [inline]
 

Use this to set the provider flags before parsing the document, if they need to be different from the default.

Parameters:
nProviderFlags The new set of provider flags.
Exceptions:
None 

Definition at line 193 of file ContentReader.h.


Member Data Documentation

DWFXMLElementBuilder DWFToolkit::DWFContentReader::_oDefaultElementBuilder [protected]
 

Default building behavior and element object allocator for readers.

Definition at line 484 of file ContentReader.h.

DWFXMLElementBuilder* DWFToolkit::DWFContentReader::_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 491 of file ContentReader.h.


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