DWFToolkit::DWFPackagePublisher Class Reference
[DWF Publisher API]

#include "dwf/publisher/impl/DWFPackagePublisher.h"

Inheritance diagram for DWFToolkit::DWFPackagePublisher:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Base class for publisher implementations that produce DWF files.

Since:
7.0.1
Due to the composite nature of the the visitors, even this class can be used to extract additional data to other output pipes during the creation of the DWF package.

Todo:
Implement a full version for composite DWF packages.
Examples:

3DPublish/3DPublish_UTF8.cpp.

Definition at line 72 of file DWFPackagePublisher.h.

Public Member Functions

_DWFTK_API DWFPackagePublisher (const DWFString &zSourceProductVendor="", const DWFString &zSourceProductName="", const DWFString &zSourceProductVersion="", const DWFString &zPublisherProductVendor="", const DWFString &zPublisherProductVersion="") throw ( DWFException )
virtual _DWFTK_API ~DWFPackagePublisher () throw ()
_DWFTK_API void setVersion (DWFPublisher::teMetadataVersion eVersion) throw ( DWFException )
_DWFTK_API DWFPublisher::teMetadataVersion getVersion () const throw ()
_DWFTK_API void publish () throw ( DWFException )
_DWFTK_API DWFPublishedObject::Visitor * getPublishedObjectVisitor () throw ( DWFException )
_DWFTK_API DWFPropertyVisitorgetPropertyVisitor () throw ( DWFException )
_DWFTK_API DWFEmbeddedFontVisitorgetEmbeddedFontVisitor () throw ( DWFException )
_DWFTK_API DWFResourceVisitorgetResourceVisitor () throw ( DWFException )
_DWFTK_API DWFContentgetContent () throw ( DWFException )
_DWFTK_API void attachContentManager (DWFContentManager *pContentManager, bool bTakeOwnership=true) throw ()
_DWFTK_API void addPresentation (DWFContentPresentation *pPresentation) throw ( DWFException )
_DWFTK_API void setResourceVisitor (DWFResourceVisitor *pVisitor) throw ()
_DWFTK_API void disableContentNavigationPresentation () throw ()
_DWFTK_API void setContentNavigationPresentationLabel (const DWFString &zLabel) throw ()
_DWFTK_API void setViewsPresentationLabel (const DWFString &zLabel) throw ()
_DWFTK_API void visitPublishedObject (DWFPublishedObject &rObject) throw ( DWFException )
_DWFTK_API void visitProperty (DWFProperty &rProperty) throw ( DWFException )
_DWFTK_API void visitPropertyContainer (DWFPropertyContainer &rPropertyContainer) throw ( DWFException )
_DWFTK_API void visitEmbeddedFont (const DWFEmbeddedFont &rFont) throw ( DWFException )
_DWFTK_API void preprocess (DWFPublishable *pContent)=0 throw ( DWFException )
virtual _DWFTK_API void postprocess (DWFPublishable *pContent) throw ( DWFException )

Static Public Attributes

static const wchar_t *const kz_NamedView_Default
 The name of the default model view (see DWFModel::createView).
static const wchar_t *const kz_PropName_PolygonHandedness
 The name of the DWFProperty that captures the handedness heuristic (see DWFModel::getPolygonHandedness).
static const wchar_t *const kz_PropName_UseDefaultLighting
 The name of the DWFProperty that captures the lighting preference (see DWFModel::useModelLighting).
static const wchar_t *const kz_PropName_UseSilhouetteEdges
 The name of the DWFProperty that captures the feature edge preference (see DWFModel::useSilhouetteEdges).
static const wchar_t *const kz_PropName_EdgeColor
 The name of the DWFProperty that captures the edge color preference (see DWFModel::getEdgeColor).
static const wchar_t *const kz_PropName_DisplayMode
 The name of the DWFProperty that captures the initial display mode (see DWFModel::getDisplayMode).
static const wchar_t *const kz_PropSetName_DefaultView
 The name of the DWFPropertyContainer that bundles the default (initial) model view.
static const wchar_t *const kz_PropName_CameraProjection
 The name of the DWFProperty that decribes the default camera projection.
static const wchar_t *const kz_PropName_CameraPosition
 The name of the DWFProperty that decribes the default camera position.
static const wchar_t *const kz_PropName_CameraTarget
 The name of the DWFProperty that decribes the default camera target.
static const wchar_t *const kz_PropName_CameraUpVector
 The name of the DWFProperty that decribes the default camera up vector.
static const wchar_t *const kz_PropName_CameraField
 The name of the DWFProperty that decribes the default camera field.
static const wchar_t *const kz_PropName_ViewCubeShowCompass
 The name of the DWFProperty that decribes the default state (show/hide) of compass.
static const wchar_t *const kz_PropName_ViewCubeAngleOfNorth
 The name of the DWFProperty that decribes the default angle of north.
static const wchar_t *const kz_PropName_ViewCubeHomeCameraProjection
 The name of the DWFProperty that decribes the default camera projection.
static const wchar_t *const kz_PropName_ViewCubeHomeCameraPosition
 The name of the DWFProperty that decribes the default camera position.
static const wchar_t *const kz_PropName_ViewCubeHomeCameraTarget
 The name of the DWFProperty that decribes the default camera target.
static const wchar_t *const kz_PropName_ViewCubeHomeCameraUpVector
 The name of the DWFProperty that decribes the default camera up vector.
static const wchar_t *const kz_PropName_ViewCubeHomeCameraField
 The name of the DWFProperty that decribes the default camera field.
static const wchar_t *const kz_PropName_FrontView
 The name of the DWFPropertyContainer that set the front view by client.
static const wchar_t *const kz_PropName_FrontViewCameraProjection
static const wchar_t *const kz_PropName_FrontViewCameraPosition
static const wchar_t *const kz_PropName_FrontViewCameraTarget
static const wchar_t *const kz_PropName_FrontViewCameraUpVector
static const wchar_t *const kz_PropName_FrontViewCameraField

Protected Attributes

DWFSection_pCurrentSection
DWFResource_pCurrentGraphicResource
size_t _nSections


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::DWFPackagePublisher::DWFPackagePublisher const DWFString zSourceProductVendor = "",
const DWFString zSourceProductName = "",
const DWFString zSourceProductVersion = "",
const DWFString zPublisherProductVendor = "",
const DWFString zPublisherProductVersion = ""
throw ( DWFException )
 

Constructor

This documentation has been copied from DWFPackageWriter::write():

This method exposes the standard DWF package properties directly. It is highly recommended that at DWF publishers set these correctly with as much detail as possible.

Setting standard DWF package properties:

                Autodesk DWF Writer is a printer driver DLL that is used to generate DWF packages
                through the Windows printing system, it is a component that another application
                would use (indirectly) to publish the DWF.  The following is an example of how
                it might populate these properties when printing from Microsoft Word:
       
                zSourceProductVendor    = L"Microsoft Corporation"          <--- from Word 2003
                zSourceProductName      = L"Microsoft Office 2003"          <--- from Word 2003
                zSourceProductVersion   = L"11.0.5604"                      <--- from Word 2003
                zDWFProductVendor       = L"Autodesk, Inc."                 <--- from DWF Writer 2
                zDWFProductVersion      = L"2.0.4.0"                        <--- from DWF Writer 2

Parameters:
zSourceProductVendor A standard property detailing the vendor of the software that the produced the original content and used the DWF product in order to produce the DWF package.
zSourceProductName A standard property detailing the name of the software that the produced the original content and used the DWF product in order to produce the DWF package.
zSourceProductVersion A standard property detailing the version of the software that the produced the original content and used the DWF product in order to produce the DWF package.
zPublisherProductVendor A standard property that details the vendor of the software component that was used by the source product to publish the DWF package.
zPublisherProductVersion A standard property that details the version of the software component that was used by the source product to publish the DWF package.
Exceptions:
DWFException 

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

Destructor

Exceptions:
None 


Member Function Documentation

_DWFTK_API void DWFToolkit::DWFPackagePublisher::addPresentation DWFContentPresentation pPresentation  )  throw ( DWFException ) [inline]
 

This returns the global content presentations container. Note the caller should not delete the container.

Returns:
Pointer to the content presentations container
Exceptions:
DWFException 
Since:
7.3

Definition at line 340 of file DWFPackagePublisher.h.

_DWFTK_API void DWFToolkit::DWFPackagePublisher::attachContentManager DWFContentManager pContentManager,
bool  bTakeOwnership = true
throw ()
 

If a content manager is created outside the publisher, this method is used to attach it to the publisher.

Parameters:
pContentManager The content manager to attach.
bTakeOwnership The ownership of the content manager will be assumed by classes internal to the publisher.
Exceptions:
None 
Since:
7.2.0

_DWFTK_API void DWFToolkit::DWFPackagePublisher::disableContentNavigationPresentation  )  throw () [inline]
 

Disables the default content navigation presentation.

Exceptions:
None 

Definition at line 366 of file DWFPackagePublisher.h.

_DWFTK_API DWFContent* DWFToolkit::DWFPackagePublisher::getContent  )  throw ( DWFException )
 

Returns the content library to use for metadata publishing.

Returns:
Pointer to the primary content of a package. This pointer must not be deleted by the caller.
Exceptions:
DWFException 
Since:
7.2.0

_DWFTK_API DWFEmbeddedFontVisitor* DWFToolkit::DWFPackagePublisher::getEmbeddedFontVisitor  )  throw ( DWFException ) [inline]
 

Definition at line 283 of file DWFPackagePublisher.h.

_DWFTK_API DWFPropertyVisitor* DWFToolkit::DWFPackagePublisher::getPropertyVisitor  )  throw ( DWFException ) [inline]
 

Definition at line 273 of file DWFPackagePublisher.h.

_DWFTK_API DWFPublishedObject::Visitor* DWFToolkit::DWFPackagePublisher::getPublishedObjectVisitor  )  throw ( DWFException ) [inline]
 

Definition at line 263 of file DWFPackagePublisher.h.

_DWFTK_API DWFResourceVisitor* DWFToolkit::DWFPackagePublisher::getResourceVisitor  )  throw ( DWFException ) [inline]
 

Returns a visitor that can process a resource.

Returns:
A resource visitor. This pointer must not be deleted by the caller.
Exceptions:
DWFException 

Definition at line 296 of file DWFPackagePublisher.h.

_DWFTK_API DWFPublisher::teMetadataVersion DWFToolkit::DWFPackagePublisher::getVersion  )  const throw () [inline]
 

Get the version set for publishing.

Returns:
The metadata version to which the publisher will publish
Exceptions:
None. 

Definition at line 243 of file DWFPackagePublisher.h.

virtual _DWFTK_API void DWFToolkit::DWFPackagePublisher::postprocess DWFPublishable pContent  )  throw ( DWFException ) [virtual]
 

_DWFTK_API void DWFToolkit::DWFPackagePublisher::preprocess DWFPublishable pContent  )  throw ( DWFException ) [pure virtual]
 

_DWFTK_API void DWFToolkit::DWFPackagePublisher::publish  )  throw ( DWFException )
 

Compose all of the publishable section content and graphics data provided to this object and publish a DWF package file.

Exceptions:
DWFException 
Examples:
3DPublish/3DPublish_UTF8.cpp.

_DWFTK_API void DWFToolkit::DWFPackagePublisher::setContentNavigationPresentationLabel const DWFString zLabel  )  throw () [inline]
 

Sets the label for the content navigation presentation.

Exceptions:
None 

Definition at line 378 of file DWFPackagePublisher.h.

_DWFTK_API void DWFToolkit::DWFPackagePublisher::setResourceVisitor DWFResourceVisitor pVisitor  )  throw () [inline]
 

Sets the visitor that can process a resource.

Parameters:
pVisitor The resource visitor. This pointer will not be deleted by the publisher.
Exceptions:
None 

Definition at line 354 of file DWFPackagePublisher.h.

_DWFTK_API void DWFToolkit::DWFPackagePublisher::setVersion DWFPublisher::teMetadataVersion  eVersion  )  throw ( DWFException )
 

Set the version to publish to. The default is the current DWF file format version. For backwards compatibility one may use the version previous version numbers.

Parameters:
eVersion This defines the type of metadata that will be published with the package.
Exceptions:
A DWFUnexpectedException is thrown if the version is not recognized by the publisher.

_DWFTK_API void DWFToolkit::DWFPackagePublisher::setViewsPresentationLabel const DWFString zLabel  )  throw () [inline]
 

Sets the label for the views presentation.

Exceptions:
None 

Definition at line 390 of file DWFPackagePublisher.h.

_DWFTK_API void DWFToolkit::DWFPackagePublisher::visitEmbeddedFont const DWFEmbeddedFont rFont  )  throw ( DWFException )
 

_DWFTK_API void DWFToolkit::DWFPackagePublisher::visitProperty DWFProperty rProperty  )  throw ( DWFException )
 

Default visitation implementation. Specializations should invoke this base method to ensure any composed visitors are called.

Parameters:
rProperty A property from the publishable source.
Exceptions:
DWFException 

_DWFTK_API void DWFToolkit::DWFPackagePublisher::visitPropertyContainer DWFPropertyContainer rPropertyContainer  )  throw ( DWFException )
 

Default visitation implementation. Specializations should invoke this base method to ensure any composed visitors are called.

Parameters:
rPropertyContainer The property container from the publishable source.
Exceptions:
DWFException 

_DWFTK_API void DWFToolkit::DWFPackagePublisher::visitPublishedObject DWFPublishedObject rObject  )  throw ( DWFException )
 

This passes the call onto the published object visitor owned by the DWFPackage publisher. The base publisher's visitor is also called to ensure that composite visitors get a chance to visit the objects.


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