DWFToolkit::DWFObjectDefinition Class Reference
[DWF Package API]

#include "dwf/package/ObjectDefinition.h"

Collaboration diagram for DWFToolkit::DWFObjectDefinition:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class provides a reference implementation for the object definition document reader.

Since:
7.0.1
This implementation attempts to process and resolve the incoming reader data to minimize parsing speed while setting up te object for quicker instance and property resolution later on. These actions are delayed until requested.
Examples:

TimedXMLReader/TimedXMLReader.cpp.

Definition at line 50 of file ObjectDefinition.h.

Public Member Functions

_DWFTK_API DWFObjectDefinition (DWFPackageReader *pPackageReader) throw ()
virtual _DWFTK_API ~DWFObjectDefinition () throw ()
_DWFTK_API void getRootInstances (DWFDefinedObjectInstance::tList &rRootInstances) throw ( DWFException )
_DWFTK_API DWFPropertyContainergetInstanceProperties (DWFDefinedObjectInstance &rInstance, DWFPropertyContainer *pContainer=NULL) throw ( DWFException )
_DWFTK_API DWFPropertyContainergetInstanceProperties (const DWFString &zInstanceID) throw ( DWFException )
_DWFTK_API DWFPropertyContainergetCachedInstanceProperties (const DWFString &zInstanceID) throw ( DWFException )
_DWFTK_API double version () const throw ()
_DWFTK_API double provideVersion (double nVersion) throw ()
_DWFTK_API void provideProperties (const DWFString &zID, tStringVector *pPropertyRefs, DWFProperty::tList *pPropertyList) throw ()
_DWFTK_API DWFDefinedObjectprovideObject (DWFDefinedObject *pObject) throw ()
_DWFTK_API DWFDefinedObjectInstanceprovideInstance (DWFDefinedObjectInstance *pInstance) throw ()

Protected Attributes

double _nVersion
tPropertySetMap _oPropertySets
DWFDefinedObject::tMap _oObjects
DWFDefinedObjectInstance::tMap _oInstances
tCache _oCache


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::DWFObjectDefinition::DWFObjectDefinition DWFPackageReader pPackageReader  )  throw ()
 

Constructor

This constructor is generally only used by the parsing process when the DWFPackageReader associated with (and providing read access to) the DWF package file is available. The subsequent binding makes it possible to read section content data from the DWF package.

Parameters:
pPackageReader Provides access to section content in the DWF package.
Exceptions:
None 

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

Destructor

Exceptions:
None 


Member Function Documentation

_DWFTK_API DWFPropertyContainer& DWFToolkit::DWFObjectDefinition::getCachedInstanceProperties const DWFString zInstanceID  )  throw ( DWFException )
 

If the instance properties for the supplied instance identifier have already been resolved, this method will return them much more quickly than getInstanceProperties() would. If they have never been resolved, then the effect will be the same as if getInstanceProperties() had been invoked directly.

Parameters:
zInstanceID Uniquely identifies an obejct instance.
Returns:
A pointer to a new property container that holds the instance properties. This pointer should be deleted by the caller using the DWFCORE_FREE_OBJECT macro.
Exceptions:
DWFException 
Since:
7.3.0

_DWFTK_API DWFPropertyContainer* DWFToolkit::DWFObjectDefinition::getInstanceProperties const DWFString zInstanceID  )  throw ( DWFException )
 

Resolves all properties associated with the instance obtained from the identifier provided.

An instance can obtain properties from its derived object, references to other properties made by that derived object, and references to other properties made by the instance itself. Since properties may be effectively overridden, this method resolves them in the following order, with those resolved later overriding those resolved first:

  • Derived object property references
  • Derived object properties
  • Instance property references
  • Instance properties

Note:
This method performs no caching; all properties will be re-resolved with each invocation.
Parameters:
zInstanceID Uniquely identifies an obejct instance.
Returns:
A pointer to a new property container that holds the instance properties. This pointer should be deleted by the caller using the DWFCORE_FREE_OBJECT macro.
Exceptions:
DWFException 

_DWFTK_API DWFPropertyContainer* DWFToolkit::DWFObjectDefinition::getInstanceProperties DWFDefinedObjectInstance rInstance,
DWFPropertyContainer pContainer = NULL
throw ( DWFException )
 

Exceptions:
DWFException 

_DWFTK_API void DWFToolkit::DWFObjectDefinition::getRootInstances DWFDefinedObjectInstance::tList &  rRootInstances  )  throw ( DWFException )
 

Fully resolves the object and instance relationship hierarchy.

Parameters:
rRootInstances A reference to a list collection that will hold the resolved hierarchy.
Exceptions:
DWFException 
Todo:
Migrate away from returning collections through interface boundaries in favor of using iterator pointers for consistency across the toolkit.

_DWFTK_API DWFDefinedObjectInstance* DWFToolkit::DWFObjectDefinition::provideInstance DWFDefinedObjectInstance pInstance  )  throw ()
 

Accepts defined object instance elements.

Parameters:
pInstance The new defined object instance. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
Returns:
The filtered instance object.
Exceptions:
None 

_DWFTK_API DWFDefinedObject* DWFToolkit::DWFObjectDefinition::provideObject DWFDefinedObject pObject  )  throw ()
 

Accepts defined object elements.

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

_DWFTK_API void DWFToolkit::DWFObjectDefinition::provideProperties const DWFString zID,
tStringVector *  pPropertyRefs,
DWFProperty::tList *  pPropertyList
throw ()
 

Accepts properties and property set references.

Parameters:
zID The identifier of the incoming property set.
pPropertyRefs A list of property set references (by ID). The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
pPropertyList The properties that comprise this set. The acceptor is responsible for deleting this pointer with DWFCORE_FREE_OBJECT.
Exceptions:
None 

_DWFTK_API double DWFToolkit::DWFObjectDefinition::provideVersion double  nVersion  )  throw ()
 

Accepts the object definition document version number attribute.

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

_DWFTK_API double DWFToolkit::DWFObjectDefinition::version  )  const throw () [inline]
 

Returns the version of the object definition document schema.

Returns:
The version number.
Exceptions:
None 

Definition at line 177 of file ObjectDefinition.h.


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