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

DWFToolkit::DWFDefinedObjectInstance Class Reference
[DWF Package API]

#include "dwf/package/DefinedObject.h"

Inheritance diagram for DWFToolkit::DWFDefinedObjectInstance:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

This class is used to represent the realization of a defined object as a node in a graphics stream.
Since:
7.0.1.

A DWFDefinedObjectInstance corresponds to an Instance element in an object definition document. A defined object instance is a documented representation of the association between a general object definition (DWFDefinedObject) and a visual component in the DWF package.

A defined object instance is very much like a C++ object that has had its member data populated in a final state. This object may be an instantiation of a class that implements one or more property accessor interfaces. These correspond to the property set references made in the document.

These objects exist in a traditional parent-children hierarchical structure with each other. These are structural relationships only; that is, there is no attribute inheritance between a parent and a child as a result of this relationship.

Examples:

ObjectDefinitionReader/ObjectDefinitionReader.cpp, and SimpleEPlotWriter/SimpleEPlotWriter_UTF8.cpp.

Definition at line 305 of file DefinedObject.h.

Public Types

typedef vector< DWFDefinedObjectInstance * > tList
 This type defines a list of DWFDefinedObjectInstance pointers.
typedef DWFWCharKeySkipList<
DWFDefinedObjectInstance * > 
tMap
 This type defines a mapped collection of DWFDefinedObjectInstance pointers.

Public Member Functions

_DWFTK_API DWFDefinedObjectInstance (unsigned long nSequence) throw ()
_DWFTK_API DWFDefinedObjectInstance (DWFDefinedObject &rObject, const DWFString &zNode) throw ()
virtual _DWFTK_API ~DWFDefinedObjectInstance () throw ()
_DWFTK_API const DWFStringnode () const throw ()
_DWFTK_API const DWFStringobject () const throw ()
_DWFTK_API unsigned long sequence () const throw ()
_DWFTK_API DWFIterator< DWFString > * children () throw ()
_DWFTK_API void addChild (DWFDefinedObjectInstance *pChild, uint32_t nGroup=0) throw ()
_DWFTK_API void resolveObject (DWFDefinedObject *pObject) throw ()
_DWFTK_API void resolveChild (DWFDefinedObjectInstance *pInstance) throw ()
_DWFTK_API void resolveParent (DWFDefinedObjectInstance *pInstance) throw ()
_DWFTK_API DWFDefinedObjectresolvedObject () const throw ()
_DWFTK_API DWFDefinedObjectInstanceresolvedParent () const throw ()
_DWFTK_API DWFDefinedObjectInstance::tMap::Iterator * resolvedChildren () throw ()
virtual _DWFTK_API void parseAttributeList (const char **ppAttributeList) throw ( DWFException )
virtual _DWFTK_API void serializeXML (DWFXMLSerializer &rSerializer, unsigned int nFlags) throw ( DWFException )


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::DWFDefinedObjectInstance::DWFDefinedObjectInstance unsigned long  nSequence  )  throw ()
 

Constructor

Parameters:
nSequence Describes the order in which the instance was encountered during parsing.
Exceptions:
None 

_DWFTK_API DWFToolkit::DWFDefinedObjectInstance::DWFDefinedObjectInstance DWFDefinedObject rObject,
const DWFString zNode
throw ()
 

Constructor

Parameters:
rObject The defined object of which this is an instance.
zNode The graphic node associated with this instance.
Exceptions:
None 

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

Destructor

Exceptions:
None 


Member Function Documentation

_DWFTK_API void DWFToolkit::DWFDefinedObjectInstance::addChild DWFDefinedObjectInstance pChild,
uint32_t  nGroup = 0
throw ()
 

Add another instance as a child.

This is a structural relationship only. No property information is inherited as a result of this association.

Parameters:
pChild The child instance. This pointer is now owner by this object and will be deleted with the DWFCORE_FREE_OBJECT macro; as such, it must be allocated with the DWFCORE_ALLOC_OBJECT macro.
nGroup An optional parameter that preserves order relative to the other children. This value does not have to be unique, in fact, it is a group not a key. Groups are sorted in ascending order, so children in group 0 will be published before children in group 1 (or any other group for that matter.) There is no rule defined for child ordering within a group.
Exceptions:
None 

_DWFTK_API DWFIterator<DWFString>* DWFToolkit::DWFDefinedObjectInstance::children  )  throw ()
 

A collection of child instance identifiers.

Returns:
A pointer to an interator returning instance IDs. This pointer is owned by the caller and must be deleted with the DWFCORE_FREE_OBJECT macro.
Exceptions:
None 

_DWFTK_API const DWFString& DWFToolkit::DWFDefinedObjectInstance::node  )  const throw ()
 

The graphic node associated with this instance.

Returns:
The node ID.
Exceptions:
None 

_DWFTK_API const DWFString& DWFToolkit::DWFDefinedObjectInstance::object  )  const throw ()
 

The identifier of the object of which this is an instance.

Returns:
The object ID.
Exceptions:
None 

virtual _DWFTK_API void DWFToolkit::DWFDefinedObjectInstance::parseAttributeList const char **  ppAttributeList  )  throw ( DWFException ) [virtual]
 

Receives and processes an attribute list from the parser; using it to initialize class members.

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:
ppAttributeList An array of null-terminated atribute name, value string pairs. The array itself is zero-terminated.
Exceptions:
None 

Reimplemented from DWFToolkit::DWFDefinedObject.

_DWFTK_API void DWFToolkit::DWFDefinedObjectInstance::resolveChild DWFDefinedObjectInstance pInstance  )  throw ()
 

For internal use only.

This method is used by DWFObjectDefinition during the full resolution and construction of the instance tree.

Parameters:
pInstance An instance that was resolved as a child of this instance.
Exceptions:
None 

_DWFTK_API DWFDefinedObjectInstance::tMap::Iterator* DWFToolkit::DWFDefinedObjectInstance::resolvedChildren  )  throw ()
 

Returns the instances that were resolved DWFObjectDefinition::getRootInstances() as the children of this instance.

Returns:
A pointer to an iterator of child instances. This pointer is owned by the caller and must be deleted with the DWFCORE_FREE_OBJECT macro.
Exceptions:
None 

_DWFTK_API DWFDefinedObject* DWFToolkit::DWFDefinedObjectInstance::resolvedObject  )  const throw ()
 

Returns the object that was resolved by DWFObjectDefinition::getRootInstances() as the root for this instance.

Returns:
The object resolved as this instance's root [type].
Exceptions:
None 

_DWFTK_API DWFDefinedObjectInstance* DWFToolkit::DWFDefinedObjectInstance::resolvedParent  )  const throw ()
 

Returns the instance that was resolved DWFObjectDefinition::getRootInstances() as the parent of this instance.

Returns:
The instance resolved as this instance's parent.
Exceptions:
None 

_DWFTK_API void DWFToolkit::DWFDefinedObjectInstance::resolveObject DWFDefinedObject pObject  )  throw ()
 

For internal use only.

This method is used by DWFObjectDefinition during the full resolution and construction of the instance tree.

Parameters:
pObject The object that was resolved as the root [type] for this instance.
Exceptions:
None 

_DWFTK_API void DWFToolkit::DWFDefinedObjectInstance::resolveParent DWFDefinedObjectInstance pInstance  )  throw ()
 

For internal use only.

This method is used by DWFObjectDefinition during the full resolution and construction of the instance tree.

Parameters:
pInstance The instance that was resolved as the parent of this instance.
Exceptions:
None 

_DWFTK_API unsigned long DWFToolkit::DWFDefinedObjectInstance::sequence  )  const throw ()
 

The instance parsing and creation order.

Returns:
The sequence number.
Exceptions:
None 

virtual _DWFTK_API void DWFToolkit::DWFDefinedObjectInstance::serializeXML DWFXMLSerializer rSerializer,
unsigned int  nFlags
throw ( DWFException ) [virtual]
 

Writes an XML representation of the object into a stream.

Parameters:
rSerializer The object that accepts the serialization of the object.
nFlags An implementation-defined set of options for altering the serialization process of this object.

Reimplemented from DWFToolkit::DWFDefinedObject.


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