DWFToolkit::OPCPart Class Reference

#include "dwf/opc/Part.h"

Inheritance diagram for DWFToolkit::OPCPart:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

A OPCPart corresponds to a part in the OPC specification.

Since:
7.4.0
TODO The OPCPart class ...

Definition at line 53 of file Part.h.

Public Types

typedef DWFOrderedVector<
OPCPart * > 
tList
 This type defines a list of OPCPart pointers.
typedef DWFStringKeySkipList<
OPCPart * > 
tMap
 This type defines a mapped collection of OPCPart pointers.
typedef DWFCachingIterator<
OPCPart * > 
tCachingIterator
 This type defines a caching iterator on a collection of OPCPart pointers, that caches the pointers in its own container.
typedef DWFIterator< OPCPart * > tIterator
 This type defines a basic iterator on a collection of OPCPart pointers.

Public Member Functions

_DWFTK_API OPCPart () throw ()
virtual _DWFTK_API ~OPCPart () throw ()
virtual _DWFTK_API void setPath (const DWFString &zPath) throw ()
virtual _DWFTK_API void setName (const DWFString &zName) throw ( DWFException )
virtual _DWFTK_API const DWFStringpath () const throw ()
virtual _DWFTK_API const DWFStringname () const throw ()
virtual _DWFTK_API DWFString uri () const throw ( DWFException )
virtual _DWFTK_API DWFString relationshipUri () const throw ( DWFException )
virtual _DWFTK_API OPCRelationshipaddRelationship (OPCPart *pTargetPart, const DWFString &zRelationshipType, OPCRelationship::teTargetMode eTargetMode=OPCRelationship::eInternal) throw ( DWFException )
virtual _DWFTK_API bool deleteRelationship (OPCRelationship *pRelationship) throw ()
virtual _DWFTK_API size_t relationshipCount () const throw ()
virtual _DWFTK_API OPCRelationship::tIteratorrelationships () throw ()
virtual _DWFTK_API OPCRelationship::tIteratorrelationshipsByTarget (const DWFString &zTargetURI) const throw ()
virtual _DWFTK_API OPCRelationship::tIteratorrelationshipsByTarget (OPCPart *) const throw ()
virtual _DWFTK_API OPCRelationship::tIteratorrelationshipsByType (const DWFString &zType) const throw ()
virtual _DWFTK_API void deleteRelationshipsByTarget (OPCPart *pPart) throw ( DWFException )
virtual _DWFTK_API DWFInputStreamgetInputStream () throw ( DWFException )

Protected Attributes

DWFString _zPath
DWFString _zName
DWFInputStream_pInputStream
size_t _nStreamBytes
bool _bOwnStream


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::OPCPart::OPCPart  )  throw ()
 

Constructor

Exceptions:
None 

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

Destructor

Exceptions:
None 


Member Function Documentation

virtual _DWFTK_API OPCRelationship* DWFToolkit::OPCPart::addRelationship OPCPart pTargetPart,
const DWFString zRelationshipType,
OPCRelationship::teTargetMode  eTargetMode = OPCRelationship::eInternal
throw ( DWFException ) [virtual]
 

Create and add a new relationship from the container to the specified part.

Parameters:
pTargetPart The target of the new relationship.
zRelationshipType The type to be assigned to the relationship.
eTargetMode The mode of the relationship - internal or external.
Returns:
Pointer to the new relationship
Exceptions:
DWFException 

Implements DWFToolkit::OPCRelationshipContainerInterface.

virtual _DWFTK_API bool DWFToolkit::OPCPart::deleteRelationship OPCRelationship pRelationship  )  throw () [virtual]
 

Delete a specific relationship

Parameters:
pRelationship Pointer to the relationship to be removed.
Exceptions:
None 

Implements DWFToolkit::OPCRelationshipContainerInterface.

virtual _DWFTK_API void DWFToolkit::OPCPart::deleteRelationshipsByTarget OPCPart pPart  )  throw ( DWFException ) [virtual]
 

Remove all relationships from this item to the specified target.

Parameters:
pTargetPart Relationships to this target willl be removed.
Exceptions:
None. 

Implements DWFToolkit::OPCRelationshipContainerInterface.

virtual _DWFTK_API DWFInputStream* DWFToolkit::OPCPart::getInputStream  )  throw ( DWFException ) [virtual]
 

Get the input stream that will provide the serialized bytes of all relationships in the container.

Returns:
Pointer to an input stream. It must be deleted by the caller using DWFCORE_FREE_OBJECT.
Exceptions:
DWFException 

Reimplemented from DWFToolkit::OPCRelationshipContainerInterface.

Reimplemented in DWFToolkit::DWFXResourcePart, and DWFToolkit::OPCXMLPart.

virtual _DWFTK_API const DWFString& DWFToolkit::OPCPart::name  )  const throw () [inline, virtual]
 

Get the name of to the part

Returns:
The name of the part.
Exceptions:
None 

Definition at line 146 of file Part.h.

virtual _DWFTK_API const DWFString& DWFToolkit::OPCPart::path  )  const throw () [inline, virtual]
 

Get the path of to the part

Returns:
The path of the part.
Exceptions:
None 

Definition at line 133 of file Part.h.

virtual _DWFTK_API size_t DWFToolkit::OPCPart::relationshipCount  )  const throw () [virtual]
 

Get the total number of relationships from this item.

Returns:
The number of relationships from this item.
Exceptions:
None. 

Implements DWFToolkit::OPCRelationshipContainerInterface.

virtual _DWFTK_API OPCRelationship::tIterator* DWFToolkit::OPCPart::relationships  )  throw () [virtual]
 

Get all the relationships from this item

Returns:
Pointer to an iterator over all relationships. It may be NULL. It must be deleted using DWFCORE_FREE_OBJECT.
Exceptions:
None. 

Implements DWFToolkit::OPCRelationshipContainerInterface.

virtual _DWFTK_API OPCRelationship::tIterator* DWFToolkit::OPCPart::relationshipsByTarget OPCPart  )  const throw () [virtual]
 

Get all the relationships from this item to a specific target.

Parameters:
pTargetPart Relationships to this target will be returned.
Returns:
Pointer to an iterator over the relationships. It may be NULL. It must be deleted using DWFCORE_FREE_OBJECT.
Exceptions:
None. 

Implements DWFToolkit::OPCRelationshipContainerInterface.

virtual _DWFTK_API OPCRelationship::tIterator* DWFToolkit::OPCPart::relationshipsByTarget const DWFString zTargetURI  )  const throw () [virtual]
 

Get all the relationships from this item to a specific target.

Parameters:
zTargetURI Relationships to the target with this URI will be returned.
Returns:
Pointer to an iterator over the relationships. It may be NULL. It must be deleted using DWFCORE_FREE_OBJECT.
Exceptions:
None. 

Implements DWFToolkit::OPCRelationshipContainerInterface.

virtual _DWFTK_API OPCRelationship::tIterator* DWFToolkit::OPCPart::relationshipsByType const DWFString zType  )  const throw () [virtual]
 

Get all the relationships of a given type from this item.

Parameters:
zType The type of relationships to be iterated over.
Returns:
Pointer to an iterator over the relationships. It may be NULL. It must be deleted using DWFCORE_FREE_OBJECT.
Exceptions:
None. 

Implements DWFToolkit::OPCRelationshipContainerInterface.

virtual _DWFTK_API DWFString DWFToolkit::OPCPart::relationshipUri  )  const throw ( DWFException ) [virtual]
 

Get the URI of the relationship corresponding to this part. It is usually computed from the URI. If the part URI is /path/PartURI, then the relationship URI should normally be /path/_rels/PartURI.rels

Returns:
The URI for the relationship part corresponding to the this part.
Exceptions:
DWFException 

virtual _DWFTK_API void DWFToolkit::OPCPart::setName const DWFString zName  )  throw ( DWFException ) [virtual]
 

Set the name of the part - this does not include any path information. For example if the full URI is /dwf/doc/1/part.xml this should be used to set part.xml. Note: currently nothing prevents one from setting the part name as a/b.ext. The only constraint is that it does not start with ".." or "/".

Parameters:
zName The name of the part.
Exceptions:
DWFExcetion 

virtual _DWFTK_API void DWFToolkit::OPCPart::setPath const DWFString zPath  )  throw () [inline, virtual]
 

Set the path of the part - this does not include the name of the part itself. For example if the full URI is /dwf/doc/1/part.xml this should be used to set /dwf/doc/1

Parameters:
zPath The path to the part.
Exceptions:
None 

Reimplemented in DWFToolkit::DWFXDWFSection.

Definition at line 106 of file Part.h.

virtual _DWFTK_API DWFString DWFToolkit::OPCPart::uri  )  const throw ( DWFException ) [virtual]
 

Get the URI of the part.

Returns:
The URI of the part.
Exceptions:
DWFException 


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