Data.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 
00019 #ifndef _DWFTK_DATA_H
00020 #define _DWFTK_DATA_H
00021 
00022 
00027 
00028 #ifndef DWFTK_READ_ONLY
00029 
00030 #include "dwfcore/STL.h"
00031 #include "dwfcore/TempFile.h"
00032 #include "dwfcore/OutputStream.h"
00033 using namespace DWFCore;
00034 
00035 #include "dwf/Toolkit.h"
00036 #include "dwf/publisher/Publisher.h"
00037 
00038 namespace DWFToolkit
00039 {
00047 
00048 class DWFData : public DWFPublishableSection
00049                 _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00050 {
00051 public:
00052 
00064     _DWFTK_API
00065     DWFData( const DWFString& zDataTitle = "",
00066              const DWFString& zDataSource = "",
00067              const DWFString& zDataSourceID = "",
00068              const DWFString& zDataSourceHRef = "" )
00069         throw();
00070 
00076     _DWFTK_API
00077     ~DWFData()
00078         throw();
00079 
00085     _DWFTK_API
00086     void open()
00087         throw( DWFException );
00088 
00089 
00098     _DWFTK_API
00099     void close()
00100         throw( DWFException );
00101 
00108     _DWFTK_API
00109     void publish( DWFPublisher& rPublisher )
00110         throw( DWFException );
00111 
00112         //
00113         //
00114         // Publishable Interface
00115         //
00116         //
00117 
00121     _DWFTK_API
00122     virtual double getVersion() const
00123         throw()
00124     {
00125         return _DWF_FORMAT_DATA_VERSION_CURRENT_FLOAT;
00126     }
00127 
00131     _DWFTK_API
00132     const DWFString& getMIMEType()
00133         throw( DWFException )
00134     {
00135         _DWFCORE_THROW( DWFUnexpectedException, /*NOXLATE*/L"Data sections do not have a MIME type" );
00136     }
00137 
00141     _DWFTK_API
00142     DWFInputStream* getInputStream()
00143         throw( DWFException )
00144     {
00145         _DWFCORE_THROW( DWFUnexpectedException, /*NOXLATE*/L"Data sections do not return an input stream" );
00146     }
00147 
00151     _DWFTK_API
00152     void embedFont( DWFEmbeddedFont* pFont )
00153         throw( DWFException );
00154 
00158     _DWFTK_API
00159     void addResource( DWFPublishableResource* pResource )
00160         throw( DWFException );
00161 
00165     _DWFTK_API
00166     DWFIterator<DWFPublishableResource*>* getResources()
00167         throw( DWFException );
00168 
00169 private:
00170     bool                    _bOpen;
00171 
00172     DWFEmbeddedFont::tList          _oEmbeddedFonts;
00173     DWFPublishableResource::tList   _oResources;
00174 
00175 private:
00176 
00177     //
00178     // Not Implemented
00179     //
00180 
00181     DWFData( const DWFData& );
00182     DWFData& operator=( const DWFData& );
00183 };
00184 
00185 }
00186 
00187 #endif
00188 
00189 #endif

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