PackageContentPresentations.h

00001 //
00002 //  Copyright (c) 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 
00020 #ifndef _DWFTK_PACKAGECONTENTPRESENTATIONS_H
00021 #define _DWFTK_PACKAGECONTENTPRESENTATIONS_H
00022 
00027 
00028 #include "dwfcore/XMLParser.h"
00029 
00030 #include "dwf/Toolkit.h"
00031 #include "dwf/package/XML.h"
00032 #include "dwf/presentation/ContentPresentationDocument.h"
00033 
00034 namespace DWFToolkit
00035 {
00036 
00044 class DWFPackageContentPresentations : public DWFXMLBuildable
00045                                      , public DWFContentPresentationDocument
00046 #ifndef DWFTK_READ_ONLY
00047                                      , public DWFXMLSerializable
00048 #endif
00049                                                                      _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00050 {
00051 
00052 public:
00053 
00066     _DWFTK_API
00067     DWFPackageContentPresentations( DWFPackageReader*  pPackageReader )
00068         throw();
00069 
00075     _DWFTK_API
00076     DWFPackageContentPresentations()
00077         throw();
00078 
00084     _DWFTK_API
00085     virtual ~DWFPackageContentPresentations()
00086         throw();
00087 
00095     _DWFTK_API
00096     void setHRef( const DWFString& zHRef)
00097         throw()
00098     {
00099         _zHRef = zHRef;
00100     }
00101 
00108     _DWFTK_API
00109     const DWFString& href() const
00110     {
00111         return _zHRef;
00112     }
00113 
00120     _DWFTK_API
00121     DWFInputStream* getInputStream()
00122         throw( DWFException );
00123 
00132     _DWFTK_API
00133     virtual void load( DWFContentPresentationReader* pReaderFilter = NULL )
00134         throw( DWFException );
00135 
00144     _DWFTK_API
00145     virtual void load( DWFContentPresentationReader& rCustomReader )
00146         throw( DWFException );
00147 
00151     _DWFTK_API
00152     virtual void parseAttributeList( const char** /*ppAttributeList*/ )
00153         throw( DWFException );
00154 
00155 #ifndef DWFTK_READ_ONLY
00156 
00160     _DWFTK_API
00161     const DWFXMLNamespace& addNamespace( const DWFString& zNamespace, 
00162                                          const DWFString& zXMLNS )
00163         throw( DWFException );
00164 
00168     _DWFTK_API
00169     void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00170         throw( DWFException );
00171 
00172 private:
00173 
00174     typedef std::map<DWFString, DWFXMLNamespace>    _tNamespaceMap;
00175     _tNamespaceMap                                  _oAddedNamespaces;
00176 
00177 #endif
00178 
00179 private:
00180 
00181     _DWFTK_API
00182     void _parseDocument( DWFInputStream& rDocumentStream,
00183                          DWFXMLCallback& rDocumentReader )
00184         throw( DWFException );
00185 
00192     _DWFTK_API
00193     void SetHRef( const DWFString& zID )
00194         throw()
00195     {
00196         _zHRef.assign( zID );
00197         _zHRef.append( L".presentations.xml" );
00198     }
00199 
00200 private:
00201     DWFString           _zHRef;
00202     DWFPackageReader*   _pPackageReader;
00203     bool                _bLoaded;
00204 
00205     DWFPackageContentPresentations( const DWFPackageContentPresentations& );
00206     DWFPackageContentPresentations& operator=( const DWFPackageContentPresentations& );
00207 };
00208 
00209 }
00210 
00211 #endif

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