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

DWFToolkit::DWFPublisher Class Reference
[DWF Publisher API]

#include "dwf/publisher/Publisher.h"

Inheritance diagram for DWFToolkit::DWFPublisher:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Base implementation and interface defintion for objects (publishers) that can process and publish known content.
Since:
7.0.1.

Publisher objects are used to extract data from publishable structural constructs (Model, etc.) A publisher can be configured with strongly type visitors that will be called upon as the structure is traversed. Complex and compound visitors can be created for additional functionality. For example, a compound DWFPublishedObject visitor could be used to insert a record in a database for every "object" in the structure. Another is as a base class for a aggregate object that additionally implements whatever visitor interfaces it needs. This solution is preferrable if common data must be shared across visitors.

The basic publishing workflow is as follows:

  1. Create an instance of a [derived type] DWFPublisher (DWFPackagePublisher is an example implementation.)
  2. Create an instance of a [derived type] DWFPublishableSection (DWFModel is an example implementation.)
  3. Add content (DWFPublishable types) to the section.
  4. Pass the publisher to the publish() method of the section. The publisher will process the section content according to it's implementation details.
  5. Invoke the publish() method on the publisher. This will complete the process.

For a more advanced workflow, repeat steps 2, 3 and 4 above to add multiple sections to the final publication.

Note:
It should be obvious but there is nothing requiring a DWFPublisher to actually produce a DWF pacakge file. A reference implementation (DWFPackagePublisher) is provided with the toolkit.

Definition at line 413 of file Publisher.h.

Public Member Functions

_DWFTK_API DWFPublisher () throw ()
virtual _DWFTK_API ~DWFPublisher () throw ()
virtual _DWFTK_API void publish () throw ( DWFException )
virtual _DWFTK_API DWFPublishedObject::VisitorgetPublishedObjectVisitor () throw ( DWFException )
_DWFTK_API void setPublishedObjectVisitor (DWFPublishedObject::Visitor *pVisitor) throw ()
virtual _DWFTK_API DWFPropertyVisitorgetPropertyVisitor () throw ( DWFException )
_DWFTK_API void setPropertyVisitor (DWFPropertyVisitor *pVisitor) throw ()
virtual _DWFTK_API DWFEmbeddedFontVisitorgetEmbeddedFontVisitor () throw ( DWFException )
_DWFTK_API void setEmbeddedFontVisitor (DWFEmbeddedFontVisitor *pVisitor) throw ()
virtual _DWFTK_API void preprocess (DWFPublishable *pPublishable) throw ( DWFException )
virtual _DWFTK_API void postprocess (DWFPublishable *pPublishable) throw ( DWFException )


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::DWFPublisher::DWFPublisher  )  throw () [inline]
 

Constructor

Exceptions:
None 

Definition at line 424 of file Publisher.h.

virtual _DWFTK_API DWFToolkit::DWFPublisher::~DWFPublisher  )  throw () [inline, virtual]
 

Destructor

Exceptions:
None 

Definition at line 437 of file Publisher.h.


Member Function Documentation

virtual _DWFTK_API DWFEmbeddedFontVisitor* DWFToolkit::DWFPublisher::getEmbeddedFontVisitor  )  throw ( DWFException ) [inline, virtual]
 

Returns a visitor that can process a font.

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

Reimplemented in DWFToolkit::DWFPackagePublisher.

Definition at line 514 of file Publisher.h.

virtual _DWFTK_API DWFPropertyVisitor* DWFToolkit::DWFPublisher::getPropertyVisitor  )  throw ( DWFException ) [inline, virtual]
 

Returns a visitor that can process a property and/or property container.

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

Reimplemented in DWFToolkit::DWFPackagePublisher.

Definition at line 487 of file Publisher.h.

virtual _DWFTK_API DWFPublishedObject::Visitor* DWFToolkit::DWFPublisher::getPublishedObjectVisitor  )  throw ( DWFException ) [inline, virtual]
 

Returns a visitor that can process published objects in order to retrieve or characterize their structure.

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

Reimplemented in DWFToolkit::DWFPackagePublisher.

Definition at line 459 of file Publisher.h.

virtual _DWFTK_API void DWFToolkit::DWFPublisher::postprocess DWFPublishable pPublishable  )  throw ( DWFException ) [inline, virtual]
 

This callback should be invoked by pPublishable when it has completed it's publish() processing passing itself back as the parameter.

Parameters:
pPublishable The object being published.
Exceptions:
DWFException 

Reimplemented in DWFToolkit::DWFPackagePublisher.

Definition at line 558 of file Publisher.h.

virtual _DWFTK_API void DWFToolkit::DWFPublisher::preprocess DWFPublishable pPublishable  )  throw ( DWFException ) [inline, virtual]
 

This callback should be invoked by pPublishable as soon as it starts it's publish() processing passing itself back as the parameter.

Parameters:
pPublishable The object being published.
Exceptions:
DWFException 

Reimplemented in DWFToolkit::DWFPackagePublisher.

Definition at line 543 of file Publisher.h.

virtual _DWFTK_API void DWFToolkit::DWFPublisher::publish  )  throw ( DWFException ) [inline, virtual]
 

Invokes the final publication process.

Exceptions:
None 

Reimplemented in DWFToolkit::DWFPackagePublisher.

Definition at line 447 of file Publisher.h.

_DWFTK_API void DWFToolkit::DWFPublisher::setEmbeddedFontVisitor DWFEmbeddedFontVisitor pVisitor  )  throw () [inline]
 

Sets the visitor that can process a font.

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

Definition at line 528 of file Publisher.h.

_DWFTK_API void DWFToolkit::DWFPublisher::setPropertyVisitor DWFPropertyVisitor pVisitor  )  throw () [inline]
 

Sets the visitor that can process a property and/or property container.

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

Definition at line 501 of file Publisher.h.

_DWFTK_API void DWFToolkit::DWFPublisher::setPublishedObjectVisitor DWFPublishedObject::Visitor pVisitor  )  throw () [inline]
 

Sets the visitor that can process published objects in order to retrieve or characterize their structure.

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

Definition at line 474 of file Publisher.h.


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