DWFToolkit::DWFInstance Class Reference
[DWF Package API]

#include "dwf/package/Instance.h"

Inheritance diagram for DWFToolkit::DWFInstance:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

An DWFInstance corresponds to a rendition of a DWFObject or a DWFFeaturable, i.e. a renderable element of the model.

Since:
7.2.0
A DWFInstance corresponds to a rendition of a DWFObject or a DWFFeaturable, i.e. a renderable element of the model. It provides the mapping between the rendered element and its graphical representation.
Examples:

ReadContentDefinition/ReadContentDefinition.cpp, and WriteContent/WriteContent.cpp.

Definition at line 61 of file Instance.h.

Public Types

typedef DWFOrderedVector<
DWFInstance * > 
tList
 This type defines a list of DWFInstance pointers.
typedef DWFStringKeySkipList<
DWFInstance * > 
tMap
 This type defines a mapped collection of DWFInstance pointers.
typedef DWFCachingIterator<
DWFInstance * > 
tCachingIterator
 This type defines a caching iterator on a collection of DWFInstance pointers, that caches the pointers in its own container.
typedef DWFIterator< DWFInstance * > tIterator
 This type defines a basic iterator on a collection of DWFInstance pointers.
typedef enum DWFToolkit::DWFInstance::teAttributes teAttributes
 This enumerates attributes of the graphics that the instance can store.
enum  teAttributes { eVisible = 0x01, eTransparent = 0x02 }
 This enumerates attributes of the graphics that the instance can store. More...

Public Member Functions

_DWFTK_API DWFInstance (const DWFString &zInstanceID, DWFRenderable *pRenderedElement, int iNodeID, unsigned int nAttributes=DWFInstance::eVisible, int nGeometricVariationIndex=-1) throw ( DWFException )
_DWFTK_API DWFInstance () throw ()
virtual _DWFTK_API ~DWFInstance () throw ()
_DWFTK_API const DWFStringid () const throw ()
_DWFTK_API DWFRenderablegetRenderedElement () const throw ()
_DWFTK_API int getNodeID () const throw ()
_DWFTK_API bool getVisibility () const throw ()
_DWFTK_API void setVisibility (bool bVisible) throw ()
_DWFTK_API bool getTransparency () const throw ()
_DWFTK_API void setTransparency (bool bTransparent) throw ()
_DWFTK_API unsigned int getGraphicsAttributes () const throw ()
_DWFTK_API void setGraphicsAttributes (unsigned int nAttributes) throw ( DWFException )
_DWFTK_API int getGeometricVariationIndex () const throw ()
_DWFTK_API void setGeometricVariationIndex (int nIndex) throw ()
virtual _DWFTK_API void parseAttributeList (const char **ppAttributeList) throw ( DWFException )
_DWFTK_API void serializeXML (DWFXMLSerializer &rSerializer, unsigned int nFlags) throw ( DWFException )
_DWFTK_API void setRenderable (DWFRenderable *pRenderable)


Member Enumeration Documentation

enum DWFToolkit::DWFInstance::teAttributes
 

This enumerates attributes of the graphics that the instance can store.

Enumerator:
eVisible  This determines whether the instance is visible or not.
eTransparent  This determines whether the instance is transparent or not.

Definition at line 92 of file Instance.h.


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::DWFInstance::DWFInstance const DWFString zInstanceID,
DWFRenderable pRenderedElement,
int  iNodeID,
unsigned int  nAttributes = DWFInstance::eVisible,
int  nGeometricVariationIndex = -1
throw ( DWFException )
 

Constructor. This constructor can be used if there is only graphical node corresponding to an element. The constructor is mainly for use by the DWFContent and the DWFXMLElementBuilder, during publishing and reading respectively.

Parameters:
zInstanceID The UUID assigned to the object.
pRenderedElement Pointer to the element that this instance renders.
iNodeID The integer ID of the graphical nodes.
nAttributes The visibility and transparency of the instance in terms of bitflags given by DWFInstance::teAttributes.
nGeometricVariationIndex The index of the geometric variation to show. The default, -1, indicates there are none.
Exceptions:
DWFException 

_DWFTK_API DWFToolkit::DWFInstance::DWFInstance  )  throw ()
 

Constructor.

The constructor is for use by the the DWFXMLElementBuilder, during reading and should not be used directly.

Exceptions:
None 

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

Destructor

Exceptions:
None 


Member Function Documentation

_DWFTK_API int DWFToolkit::DWFInstance::getGeometricVariationIndex  )  const throw () [inline]
 

Get the index of the geometric variation to activate. A negative value (-1) indicates that there are no geometric variations.

Returns:
The index of the geometric variation.
Exceptions:
None 

Definition at line 294 of file Instance.h.

_DWFTK_API unsigned int DWFToolkit::DWFInstance::getGraphicsAttributes  )  const throw () [inline]
 

Get the bit flags for the graphics attributes.

Returns:
An unsigned int that representation the graphical state of the instance. The possible values correspond to combinations of the enums in DWFInstance::teAttributes.
Exceptions:
None 

Definition at line 261 of file Instance.h.

_DWFTK_API int DWFToolkit::DWFInstance::getNodeID  )  const throw () [inline]
 

Access the graphics node ID of the instance.

Returns:
The node ID.
Exceptions:
None 

Definition at line 183 of file Instance.h.

_DWFTK_API DWFRenderable* DWFToolkit::DWFInstance::getRenderedElement  )  const throw () [inline]
 

Returns a pointer to the element being rendered.

Returns:
Pointer to the rendered element.
Exceptions:
None 

Definition at line 170 of file Instance.h.

_DWFTK_API bool DWFToolkit::DWFInstance::getTransparency  )  const throw () [inline]
 

Get the transparency of the instance.

Returns:
True if the instance is set to transparent.
Exceptions:
None 

Definition at line 228 of file Instance.h.

_DWFTK_API bool DWFToolkit::DWFInstance::getVisibility  )  const throw () [inline]
 

Get the visibility of the instance.

Returns:
True if the instance is set to visible.
Exceptions:
None 

Definition at line 196 of file Instance.h.

_DWFTK_API const DWFString& DWFToolkit::DWFInstance::id  )  const throw () [inline]
 

Returns the identifier for this instance.

Returns:
The ID.
Exceptions:
None 

Definition at line 157 of file Instance.h.

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

Implements DWFCore::DWFXMLBuildable.

_DWFTK_API void DWFToolkit::DWFInstance::serializeXML DWFXMLSerializer rSerializer,
unsigned int  nFlags
throw ( DWFException )
 

_DWFTK_API void DWFToolkit::DWFInstance::setGeometricVariationIndex int  nIndex  )  throw () [inline]
 

Set the index of the geometric variation to activate.

Exceptions:
None 
Examples:
WriteContent/WriteContent.cpp.

Definition at line 306 of file Instance.h.

_DWFTK_API void DWFToolkit::DWFInstance::setGraphicsAttributes unsigned int  nAttributes  )  throw ( DWFException ) [inline]
 

Set the graphics attributes overriding existing attributes

Parameters:
nAttributes The combination of attributes to which to set the instance to. The possible values correspond to combinations of the enums in DWFInstance::teAttributes.
Exceptions:
DWFException 

Definition at line 275 of file Instance.h.

_DWFTK_API void DWFToolkit::DWFInstance::setRenderable DWFRenderable pRenderable  )  [inline]
 

Set the renderable element of the instance. This is to be used only by the readers.

Parameters:
pRenderable The element that this instance renders.
Exceptions:
None 

Definition at line 338 of file Instance.h.

_DWFTK_API void DWFToolkit::DWFInstance::setTransparency bool  bTransparent  )  throw () [inline]
 

Set the transparency of the instance.

Exceptions:
None 

Definition at line 240 of file Instance.h.

_DWFTK_API void DWFToolkit::DWFInstance::setVisibility bool  bVisible  )  throw () [inline]
 

Set the visibility of the instance.

Exceptions:
None 
Examples:
WriteContent/WriteContent.cpp.

Definition at line 208 of file Instance.h.


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