DWFToolkit::DWFContentResourceReader Class Reference
[DWF Package API]

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

Inheritance diagram for DWFToolkit::DWFContentResourceReader:

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

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 resource 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 ContentResourceReader.h.

Public Types

typedef enum DWFToolkit::DWFContentResourceReader::teProviderType teProviderType
typedef DWFXMLBuildable::tUnresolvedList tUnresolvedList
 Defined data type to collect unresolved attributes during the parsing process.
enum  teProviderType {
  eProvideNone = 0x00, eProvideVersion = 0x01, eProvideInstances = 0x10, eProvideAttributes = 0x0F,
  eProvideElements = 0xF0, eProvideAll = 0xFF
}

Public Member Functions

_DWFTK_API DWFContentResourceReader (unsigned int nProviderFlags=eProvideAll) throw ()
virtual _DWFTK_API ~DWFContentResourceReader () throw ()
_DWFTK_API void setResourceObjectID (const DWFString &zObjectID) throw ()
_DWFTK_API DWFContentResourceReaderfilter () const throw ()
_DWFTK_API void setFilter (DWFContentResourceReader *pFilter) 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 *, const char *) throw ()
_DWFTK_API void notifyEndNamespace (const char *) throw ()
_DWFTK_API void notifyCharacterData (const char *, int) throw ()
virtual _DWFTK_API const char * provideContentResourceVersion (const char *zVersion) throw ( DWFException )
virtual _DWFTK_API DWFInstanceprovideInstance (DWFInstance *pInstance, const DWFString &zRenderableID, const DWFString &zResourceObjectID) throw ( DWFException )
virtual _DWFTK_API void resolveInstances () throw ()

Protected Attributes

DWFXMLElementBuilder _oDefaultElementBuilder
DWFXMLElementBuilder_pElementBuilder


Member Typedef Documentation

typedef enum DWFToolkit::DWFContentResourceReader::teProviderType DWFToolkit::DWFContentResourceReader::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::DWFContentResourceReader::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.)
eProvideVersion  Invoke the provideContentResourceVersion() callback.
eProvideInstances  Invoke the provideInstance() element callback.
eProvideAttributes  Equivalent to (eProvideVersion | eProvideObjectID | eProvideContentID)
eProvideElements  Equivalent to eProvideInstances
eProvideAll  Equivalent to (eProvideElements | eProvideAttributes)

Definition at line 67 of file ContentResourceReader.h.


Constructor & Destructor Documentation

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

Constructor

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

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

Destructor

Exceptions:
None 


Member Function Documentation

_DWFTK_API DWFContentResourceReader* DWFToolkit::DWFContentResourceReader::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 148 of file ContentResourceReader.h.

_DWFTK_API void DWFToolkit::DWFContentResourceReader::notifyCharacterData const char *  ,
int 
throw () [inline]
 

Definition at line 201 of file ContentResourceReader.h.

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

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

Definition at line 193 of file ContentResourceReader.h.

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

_DWFTK_API void DWFToolkit::DWFContentResourceReader::notifyStartNamespace const char *  ,
const char * 
throw () [inline]
 

Definition at line 184 of file ContentResourceReader.h.

virtual _DWFTK_API const char* DWFToolkit::DWFContentResourceReader::provideContentResourceVersion const char *  zVersion  )  throw ( DWFException ) [virtual]
 

Accepts the content resource version number attribute.

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

virtual _DWFTK_API DWFInstance* DWFToolkit::DWFContentResourceReader::provideInstance DWFInstance pInstance,
const DWFString zRenderableID,
const DWFString zResourceObjectID
throw ( DWFException ) [virtual]
 

Accepts instance element objects.

Parameters:
pInstance The new instance. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
zRenderableID The renderable element ID of the instance.
zResourceObjectID The ID of the resource from which this instance is being read.
Returns:
The filtered instance object.
Exceptions:
None 

Reimplemented in DWFToolkit::DWFContent.

virtual _DWFTK_API void DWFToolkit::DWFContentResourceReader::resolveInstances  )  throw () [inline, virtual]
 

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

Exceptions:
None 

Reimplemented in DWFToolkit::DWFContent.

Definition at line 241 of file ContentResourceReader.h.

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

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

Exceptions:
None 

_DWFTK_API void DWFToolkit::DWFContentResourceReader::setResourceObjectID const DWFString zObjectID  )  throw ()
 

To read a resource using the content resource reader, the reader needs to know the object ID of the resource it will read. If this is null the reader will throw an exception later.

Parameters:
zObjectID The object ID of the resource being read in.
Exceptions:
None 


Member Data Documentation

DWFXMLElementBuilder DWFToolkit::DWFContentResourceReader::_oDefaultElementBuilder [protected]
 

Default building behavior and element object allocator for readers.

Definition at line 266 of file ContentResourceReader.h.

DWFXMLElementBuilder* DWFToolkit::DWFContentResourceReader::_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 273 of file ContentResourceReader.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