XPSFontResourceExtractor.h

00001 //
00002 //  Copyright (c) 2007 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,
00008 //  AS TO THE CORRECTNESS OF THIS CODE OR ANY DERIVATIVE
00009 //  WORKS WHICH INCORPORATE IT.
00010 //
00011 //  AUTODESK PROVIDES THE CODE ON AN "AS-IS" BASIS
00012 //  AND EXPLICITLY DISCLAIMS ANY LIABILITY, INCLUDING
00013 //  CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00014 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00015 //
00016 //  Use, duplication, or disclosure by the U.S. Government is subject to
00017 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00018 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00019 //  Data and Computer Software), as applicable.
00020 //
00021 
00022 
00023 #ifndef _DWFTK_XPSFontResourceExtractor_H
00024 #define _DWFTK_XPSFontResourceExtractor_H
00025 
00026 #include "dwfcore/XML.h"
00027 #include "dwfcore/Vector.h"
00028 #include "dwf/Toolkit.h"
00029 
00030 namespace DWFCore
00031 {
00032 //
00033 // fwd decl
00034 //
00035 class DWFXMLParser;
00036 class DWFBufferOutputStream;
00037 class DWFZipFileDescriptor;
00038 }
00039 
00040 namespace DWFToolkit
00041 {
00042 
00051 
00052 class XPSFontResourceExtractor : public DWFCore::DWFXMLCallback
00053                              _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00054 {
00055 public:
00056     _DWFTK_API
00057     XPSFontResourceExtractor( DWFInputStream* pInputStream, bool bOwnStream )
00058         throw( DWFException );
00059     
00060     _DWFTK_API
00061     virtual ~XPSFontResourceExtractor()
00062         throw();
00063 
00064     _DWFTK_API
00065     void parse()
00066         throw();
00067 
00071     _DWFTK_API
00072     void notifyStartElement( const char*   zName,
00073                              const char**  ppAttributeList )
00074         throw();
00075 
00079     _DWFTK_API
00080     void notifyEndElement( const char* zName )
00081         throw();
00082 
00086     _DWFTK_API
00087     void notifyStartNamespace( const char* zPrefix,
00088                                const char* zURI )
00089         throw();
00090 
00094     _DWFTK_API
00095     void notifyEndNamespace( const char* zPrefix )
00096         throw();
00097 
00101     _DWFTK_API
00102     void notifyCharacterData( const char* zCData, 
00103                               int nLength ) 
00104         throw();
00105 
00115     _DWFTK_API
00116     DWFInputStream* getResourceStream( const DWFString& zLocator )
00117         throw( DWFException );
00118 
00127     _DWFTK_API
00128         DWFOrderedVector<DWFString>::ConstIterator* documentURIs() const
00129         throw()
00130     {
00131         return _oDocumentURIs.constIterator();
00132     }
00133 
00134 
00135 
00136 private:
00137     DWFInputStream*             _pFixedPagePartStream;
00138     bool                        _bOwnStream;
00139     DWFCore::DWFXMLParser*      _pParser;
00140 
00141         DWFOrderedVector<DWFString> _oDocumentURIs;
00142 };
00143 
00144 }
00145 
00146 #endif

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