DWFToolkit::OPCContentTypes Class Reference

#include "dwf/opc/ContentTypes.h"

Inheritance diagram for DWFToolkit::OPCContentTypes:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

The OPCContentTypes defines mappings from extensions of part names to content types.

Since:
7.4.0
The OPCContentTypes class defines a mappings from extensions of part names to the corresponding content types. It also allows overrides, i.e., mappings of specific part names to content types that are not covered by the content types or are not consistent with them.

Definition at line 47 of file ContentTypes.h.

Public Member Functions

_DWFTK_API OPCContentTypes () throw ()
virtual _DWFTK_API ~OPCContentTypes () throw ()
_DWFTK_API bool addContentType (const DWFString &zExtension, const DWFString &zType) throw ()
_DWFTK_API bool addOverride (const DWFString &zPartURI, const DWFString &zType) throw ()
_DWFTK_API DWFString extensionType (const DWFString &zExtension) const throw ()
_DWFTK_API DWFString partType (const DWFString &zPartURI) const throw ()
virtual _DWFTK_API void serializeXML (DWFXMLSerializer &rSerializer) throw ( DWFException )


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::OPCContentTypes::OPCContentTypes  )  throw ()
 

Constructor

Exceptions:
None 

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

Destructor

Exceptions:
None 


Member Function Documentation

_DWFTK_API bool DWFToolkit::OPCContentTypes::addContentType const DWFString zExtension,
const DWFString zType
throw ()
 

Add the extension and associated content type. If the extension already exists in the content types, the pair will not be added and the method will return false.

Parameters:
zExtension The extension being associated with the type.
zType The type.
Returns:
True if the pair was added, false otherwise.
Exceptions:
None. 

_DWFTK_API bool DWFToolkit::OPCContentTypes::addOverride const DWFString zPartURI,
const DWFString zType
throw ()
 

Add an override to an existing content type, or undefined content type.

Parameters:
zPartURI The URI of the OPC part.
zType The type
Returns:
True if the pair was added, false otherwise.
Exceptions:
None. 

_DWFTK_API DWFString DWFToolkit::OPCContentTypes::extensionType const DWFString zExtension  )  const throw ()
 

Given an extension, get the content type. If the extension is not listed in the content types, then this will return an empty string.

Parameters:
zExtension The extension for which we want the type.
Returns:
The type corresponding to the extension. This is empty if the extension is not found.
Exceptions:
None. 

_DWFTK_API DWFString DWFToolkit::OPCContentTypes::partType const DWFString zPartURI  )  const throw ()
 

Given a part name, get the content type. This will query the overrides first and if nothing is found, the extension is extracted and the extension-to-type map is queried.

Parameters:
zPartURI The URI of the part.
Returns:
The type corresponding to the URI. This is empty if the partname or its extension are not found.
Exceptions:
None. 

virtual _DWFTK_API void DWFToolkit::OPCContentTypes::serializeXML DWFXMLSerializer rSerializer  )  throw ( DWFException ) [virtual]
 

Write an XML representation of the object into a stream.

Parameters:
rSerializer The object that accepts the serialization of the object.
Exceptions:
DWFException 

Implements DWFToolkit::OPCXMLPart.


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