DWFXPackagePublisher.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 1996-2006 by Autodesk, Inc.
00003 //
00004 //  By using this code, you are agreeing to the terms and conditions of
00005 //  the License Agreement included in the documentation for this code.
00006 //
00007 //  AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE CORRECTNESS
00008 //  OF THIS CODE OR ANY DERIVATIVE WORKS WHICH INCORPORATE IT. AUTODESK
00009 //  PROVIDES THE CODE ON AN "AS-IS" BASIS AND EXPLICITLY DISCLAIMS ANY
00010 //  LIABILITY, INCLUDING CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00011 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00012 //
00013 //  Use, duplication, or disclosure by the U.S. Government is subject to
00014 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00015 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00016 //  Data and Computer Software), as applicable.
00017 //
00018 //  $Header: //DWF/Development/Components/Internal/DWF Toolkit/v7.6/develop/global/src/dwf/publisher/impl/DWFXPackagePublisher.h#2 $
00019 //  $DateTime: 2008/06/18 18:08:14 $
00020 //  $Author: gaoje $
00021 //  $Change: 101166 $
00022 //  $Revision: #2 $
00023 //
00024 
00025 #ifndef _DWFTK_DWFX_PACKAGE_PUBLISHER_H
00026 #define _DWFTK_DWFX_PACKAGE_PUBLISHER_H
00027 
00028 
00033 
00034 
00035 #ifndef DWFTK_READ_ONLY
00036 
00037 #include "dwfcore/File.h"
00038 
00039 using namespace DWFCore;
00040 
00041 #include "dwf/Toolkit.h"
00042 #include "dwf/package/Section.h"
00043 #include "dwf/package/writer/DWFXPackageWriter.h"
00044 #include "dwf/publisher/Image.h"
00045 #include "dwf/publisher/impl/DWFPackagePublisher.h"
00046 #include "dwf/publisher/model/Model.h"
00047 #include "dwf/publisher/plot/Plot.h"
00048 #include "dwf/publisher/data/Data.h"
00049 #include "dwf/publisher/impl/DWFResourceVisitor.h"
00050 
00051 namespace DWFToolkit
00052 {
00053 
00054 //
00055 //  fwd declaration
00056 //
00057 class DWFContent;
00058 class DWFPublishedContentElementListener;
00059 
00074 class DWFXPackagePublisher : public DWFPackagePublisher
00075                            _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00076 {
00077 
00078 public:
00079         
00087     typedef enum teProxyGraphicsRulesType
00088     {
00089         eAlways                     ,
00090         eIfNoPageOutput             ,
00091         eIfOnlyPartialPageOutput
00092     } teProxyGraphicsRulesType;
00093 
00137     _DWFTK_API
00138     DWFXPackagePublisher( const DWFFile&   rDWFFile,
00139                                                   const DWFString& zPassword                = "",
00140                           const DWFString& zSourceProductVendor     = "",
00141                           const DWFString& zSourceProductName       = "",
00142                           const DWFString& zSourceProductVersion    = "",
00143                           const DWFString& zPublisherProductVendor  = "",
00144                           const DWFString& zPublisherProductVersion = "", 
00145                                                   bool  bNoPasswordSalting = true  )
00146         throw( DWFException );
00147 
00153     _DWFTK_API
00154     virtual ~DWFXPackagePublisher()
00155         throw();
00156 
00168     _DWFTK_API
00169     virtual void addProxyGraphicsSection( DWFPlot* pProxyPlot, teProxyGraphicsRulesType eRules=eAlways, bool bAsFirstPage=true )
00170         throw( DWFException );
00171 
00179         _DWFTK_API
00180     virtual void addProxyPage( const DWFString& zProxyPageXPSPath )
00181         throw( DWFException );
00182 
00183 
00184 protected:
00185 
00186     virtual DWFPackageWriter* getPackageWriter( )
00187         throw( DWFException )
00188     {
00189         return &_oPackageWriter;
00190     }
00191         
00192         virtual DWFGraphicResource* getGraphicResource()
00193                 throw( DWFException )
00194         {
00195                 return _pGraphicResource;
00196         }
00197 
00198         virtual void postprocess( DWFPublishable* pContent )
00199         throw( DWFException );
00200         
00201         virtual void preprocess( DWFPublishable* pContent )
00202                 throw( DWFException );
00203 
00204     virtual void postprocessPlot( DWFPlot* pW2DPlot )
00205         throw( DWFException );
00206 
00207         virtual void postprocessModel( DWFModel* pW3DModel )
00208         throw( DWFException );
00209 
00210 private:
00211 
00212     DWFXPackageWriter                   _oPackageWriter;
00213         DWFGraphicResource*                                     _pGraphicResource;
00214 
00215 private:
00216 
00217     DWFXPackagePublisher( const DWFXPackagePublisher& );
00218     DWFXPackagePublisher& operator=( const DWFXPackagePublisher& );
00219         
00220 };
00221 
00222 }
00223 
00224 
00225 
00226 #endif
00227 #endif
00228 

Generated on Tue Jan 6 22:40:03 2009 for Autodesk DWF Toolkit by  doxygen 1.4.5