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

DWFToolkit::DWFPackageWriter Class Reference
[DWF Package API]

#include "dwf/package/writer/PackageWriter.h"

Inheritance diagram for DWFToolkit::DWFPackageWriter:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

This class is used to publish DWF package files.
Since:
7.0.1.

Todo:
Add direct publishing to DWFOutputStream in addition to DWFFile respresentation.
Examples:

GlobalSectionWriter/GlobalSectionWriter.cpp, and SimpleEPlotWriter/SimpleEPlotWriter_UTF8.cpp.

Definition at line 68 of file PackageWriter.h.

Public Types

enum  teDocumentType
 These enumerations are used during the serialization process to alter the content produced by the serializable objects.
enum  teSectionType
 These enumerations are used during the serialization process to alter the content produced by the serializable objects.

Public Member Functions

_DWFTK_API DWFPackageWriter (const DWFFile &rDWFPackageFile, const DWFString &zDWFPackagePassword=L"", DWFPackageVersionExtension *pVersionExtension=NULL) throw ()
virtual _DWFTK_API ~DWFPackageWriter () throw ()
_DWFTK_API void addSection (DWFSection *pSection, DWFInterface *pInterface=NULL) throw ( DWFException )
_DWFTK_API void addGlobalSection (DWFGlobalSection *pSection) throw ( DWFException )
_DWFTK_API DWFInterfaceaddInterface (DWFInterface *pInterface) throw ( DWFException )
_DWFTK_API DWFPropertyContainergetManifestProperties () throw ( DWFException )
_DWFTK_API void write (const DWFString &zSourceProductVendor=L"", const DWFString &zSourceProductName=L"", const DWFString &zSourceProductVersion=L"", const DWFString &zDWFProductVendor=L"", const DWFString &zDWFProductVersion=L"", DWFZipFileDescriptor::teFileMode eCompressionMode=DWFZipFileDescriptor::eZipSmallest) throw ( DWFException )


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::DWFPackageWriter::DWFPackageWriter const DWFFile rDWFPackageFile,
const DWFString zDWFPackagePassword = L"",
DWFPackageVersionExtension pVersionExtension = NULL
throw ()
 

Constructor

Parameters:
rDWFPackageFile Identifies the DWF file to publish.
zDWFPackagePassword An optional password for protected the DWF package file.
pVersionExtension An optional plug-in for publishing package versions different from the curent one.
Exceptions:
None 

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

Destructor

Exceptions:
None 


Member Function Documentation

_DWFTK_API void DWFToolkit::DWFPackageWriter::addGlobalSection DWFGlobalSection pSection  )  throw ( DWFException )
 

Adds a type global section to the DWF package.

Parameters:
pSection The global section to publish into the package. Ownership of this section pointer will be claimed automatically. This means that, left as is, the pointer will be deleted once the package is published. In order to prevent this, the caller can explicitly reclaim ownership of the section by calling DWFSection::own().
Exceptions:
DWFException 

_DWFTK_API DWFInterface* DWFToolkit::DWFPackageWriter::addInterface DWFInterface pInterface  )  throw ( DWFException )
 

Adds an interface to the DWF package manifest.

This method is provided in addition to the addSection() method as it may be necessary to, in the case of dumb package copying for example, to include this information in the target package without having any ability to corollate the source sections and interfaces. This pointer will be deleted with the DWFCORE_FREE_OBJECT macro.

This method will check for duplicate interfaces and if pInternface is a duplicate, it will be deleted and the previously stored one will be returned.

Exceptions:
DWFException 

_DWFTK_API void DWFToolkit::DWFPackageWriter::addSection DWFSection pSection,
DWFInterface pInterface = NULL
throw ( DWFException )
 

Adds a section to the DWF package.

Parameters:
pSection The section to publish into the package. Ownership of this section pointer will be claimed automatically. This means that, left as is, the pointer will be deleted once the package is published. In order to prevent this, the caller can explicitly reclaim ownership of the section by calling DWFSection::own().
pInterface This object should be provided if pSection is a custom type that should be declared in the manifest (it will be ignored for known types.) Note that the DWF Specification dictates that at least one interface be declared in the manifest. If none exist, an exception will be thrown at write time. This pointer will be deleted with the DWFCORE_FREE_OBJECT macro.
Exceptions:
DWFException 

_DWFTK_API DWFPropertyContainer& DWFToolkit::DWFPackageWriter::getManifestProperties  )  throw ( DWFException )
 

Returns the property container interface for the package manifest.

This can be used to add package-wide properties to the DWF.

Returns:
An interface with which to add package manifest properties.
Exceptions:
DWFException 

_DWFTK_API void DWFToolkit::DWFPackageWriter::write const DWFString zSourceProductVendor = L"",
const DWFString zSourceProductName = L"",
const DWFString zSourceProductVersion = L"",
const DWFString zDWFProductVendor = L"",
const DWFString zDWFProductVersion = L"",
DWFZipFileDescriptor::teFileMode  eCompressionMode = DWFZipFileDescriptor::eZipSmallest
throw ( DWFException )
 

Writes out the DWF package.

Any sections and other objects owned by the writer and/or internal manifest will be deleted at the completion of this method. Be sure to claim ownership of any such objects that are necessary to survive after this call.

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.
zDWFProductVendor A standard property that details the vendor of the software component that was used by the source product to publish the DWF package.
zDWFProductVersion A standard property that details the version of the software component that was used by the source product to publish the DWF package.
eCompressionMode An enumeration that adjusts the zip library compression options.
Exceptions:
DWFException 


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