SectionContentResource.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 2005-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/package/SectionContentResource.h#3 $
00019 //  $DateTime: 2008/12/16 09:08:40 $
00020 //  $Author: klugj $
00021 //  $Change: 126623 $
00022 //  $Revision: #3 $
00023 //
00024 
00025 
00026 #ifndef _DWFTK_SECTION_CONTENT_RESOURCE_H
00027 #define _DWFTK_SECTION_CONTENT_RESOURCE_H
00028 
00033 
00034 
00035 #include "dwf/Toolkit.h"
00036 #include "dwf/package/Resource.h"
00037 
00038 namespace DWFToolkit
00039 {
00040 
00041 //
00042 // fwd declarations
00043 //
00044 class DWFContent;
00045 
00046 
00057 class DWFSectionContentResource : public DWFResource
00058                                   _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00059 {
00060 
00061 public:
00062 
00070     _DWFTK_API
00071     DWFSectionContentResource( DWFContent* pContent )
00072         throw( DWFException );
00073 
00086     _DWFTK_API
00087     DWFSectionContentResource( DWFPackageReader* pPackageReader )
00088         throw( DWFException );
00089 
00095     _DWFTK_API
00096     virtual ~DWFSectionContentResource()
00097         throw();
00098 
00102     _DWFTK_API
00103     virtual void parseAttributeList( const char** ppAttributeList )
00104         throw( DWFException );
00105 
00111     _DWFTK_API
00112     DWFString contentID() const
00113         throw()
00114     {
00115         return _oContentID[0];
00116     }
00117 
00121     _DWFTK_API
00122     virtual void setObjectID( const DWFString& zObjectID )
00123         throw();
00124 
00125 #ifndef DWFTK_READ_ONLY
00126 
00143     _DWFTK_API
00144     virtual DWFInputStream* getInputStream( bool bCache = false )
00145         throw( DWFException );
00146         
00150     _DWFTK_API
00151     void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00152         throw( DWFException );
00153 
00154 #endif
00155 
00162     _DWFTK_API
00163     DWFContent* getContent() const
00164         throw();
00165 protected:
00166 
00167     //DWFOwner
00168     _DWFTK_API
00169     virtual void notifyOwnableDeletion( DWFOwnable& rOwnable )
00170         throw( DWFException );
00171 
00172 private:
00173 
00174     //
00175     // Pointer to the content that the resource is associated with.
00176     //
00177     DWFContent*     _pContent;
00178 
00179     //
00180     // Version of the section content XML getting written out
00181     //
00182     DWFString       _zVersion;
00183 
00184     //
00185     // Buffer to which the XML is written for serialization of this content.
00186     //
00187     char*           _pBuffer;
00188         
00189         //
00190         // Variable to determine if the data is already serialized to XML
00191         //
00192         bool                    _bSerialized;
00193 
00194 };
00195 
00196 }
00197 
00198 #endif

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