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

DWFToolkit::DWFObjectDefinition Class Reference
[DWF Package API]

#include "dwf/package/ObjectDefinition.h"

Inheritance diagram for DWFToolkit::DWFObjectDefinition:

Inheritance graph
[legend]
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. This actions are delayed until requested.

Examples:

ObjectDefinitionReader/ObjectDefinitionReader.cpp, and TimedXMLReader/TimedXMLReader.cpp.

Definition at line 55 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) throw ( DWFException )
_DWFTK_API DWFPropertyContainergetInstanceProperties (const DWFString &zInstanceID) throw ( DWFException )
_DWFTK_API double version () const throw ()
_DWFTK_API void provideVersion (double nVersion) throw ()
_DWFTK_API void provideProperties (const DWFString &zID, vector< DWFString > *pPropertyRefs, DWFProperty::tList *pPropertyList) throw ()
_DWFTK_API void provideObject (DWFDefinedObject *pObject) throw ()
_DWFTK_API void provideInstance (DWFDefinedObjectInstance *pInstance) throw ()


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::getInstanceProperties const DWFString zInstanceID  )  throw ( DWFException )
 

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

An instance can obtain properties from it's 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  )  throw ( DWFException )
 

Resolves all properties associated with the instance provided.

An instance can obtain properties from it's 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:
rInstance The object instance for which properties will be acquired.
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 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.
Examples:
ObjectDefinitionReader/ObjectDefinitionReader.cpp.

_DWFTK_API void DWFToolkit::DWFObjectDefinition::provideInstance DWFDefinedObjectInstance pInstance  )  throw () [virtual]
 

Accepts defined object instance elements.

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

Reimplemented from DWFToolkit::DWFObjectDefinitionReader.

_DWFTK_API void DWFToolkit::DWFObjectDefinition::provideObject DWFDefinedObject pObject  )  throw () [virtual]
 

Accepts defined object elements.

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

Reimplemented from DWFToolkit::DWFObjectDefinitionReader.

_DWFTK_API void DWFToolkit::DWFObjectDefinition::provideProperties const DWFString zID,
vector< DWFString > *  pPropertyRefs,
DWFProperty::tList pPropertyList
throw () [virtual]
 

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 

Reimplemented from DWFToolkit::DWFObjectDefinitionReader.

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

Accepts the object definition document version number attribute.

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

Reimplemented from DWFToolkit::DWFObjectDefinitionReader.

_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 160 of file ObjectDefinition.h.


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