DataSection.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 
00020 #ifndef _DWFTK_DATA_SECTION_H
00021 #define _DWFTK_DATA_SECTION_H
00022 
00027 
00028 
00029 #include "dwfcore/STL.h"
00030 #include "dwfcore/SkipList.h"
00031 using namespace DWFCore;
00032 
00033 #include "dwf/Toolkit.h"
00034 #include "dwf/package/Section.h"
00035 #include "dwf/package/reader/DataSectionDescriptorReader.h"
00036 #include "dwf/package/writer/PackageWriter.h"
00037 
00038 
00039 namespace DWFToolkit
00040 {
00041 
00052 class DWFDataSection : public DWFSection
00053                      , public DWFDataSectionDescriptorReader
00054                      _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00055 {
00056 
00057 public:
00058 
00062     typedef _DWFTK_STD_VECTOR(DWFDataSection*)                                      tList;
00066     typedef DWFWCharKeySkipList<DWFDataSection*>                                    tMap;
00070     typedef std::multimap<const wchar_t*, DWFDataSection*, tDWFWCharCompareLess>    tMultiMap;
00071 
00072 public:
00073 
00079     class Factory : public DWFSection::Factory
00080                     _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00081     {
00082 
00083     public:
00084 
00090         _DWFTK_API
00091         Factory()
00092             throw();
00093 
00099         _DWFTK_API
00100         virtual ~Factory()
00101             throw();
00102 
00117         _DWFTK_API
00118         virtual DWFSection* build( const DWFString&     zName,
00119                                    const DWFString&     zTitle,
00120                                    DWFPackageReader*    pPackageReader )
00121             throw( DWFException );
00122     };
00123 
00124 public:
00125 
00140     _DWFTK_API
00141     DWFDataSection( const DWFString&  zName,
00142                     const DWFString&  zTitle,
00143                     DWFPackageReader* pPackageReader )
00144         throw();
00145 
00159     _DWFTK_API
00160     DWFDataSection( const DWFString& zTitle,
00161                     const DWFString& zObjectID,
00162                     double           nPlotOrder,
00163                     const DWFSource& rSource )
00164         throw();
00165 
00171     _DWFTK_API
00172     virtual ~DWFDataSection()
00173         throw();
00174 
00189     _DWFTK_API
00190     DWFInterface* buildInterface()
00191         throw( DWFException );
00192 
00218     _DWFTK_API
00219     const DWFResource& readDescriptor( DWFSectionDescriptorReader* pSectionDescriptorReader = NULL ) const
00220         throw( DWFException );
00221 
00222 #ifndef DWFTK_READ_ONLY
00223 
00227     _DWFTK_API
00228     void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00229         throw( DWFException );
00230 
00231 #endif
00232 
00236     _DWFTK_API
00237     const char* provideName( const char* zName )
00238         throw();
00239 
00243     _DWFTK_API
00244     const char* provideObjectID( const char* zObjectID )
00245         throw();
00246 
00250     _DWFTK_API
00251     double provideVersion( double nVersion )
00252         throw();
00253 
00257     _DWFTK_API
00258     double providePlotOrder( double nPlotOrder )
00259         throw();
00260 
00264     _DWFTK_API
00265     DWFProperty* provideProperty( DWFProperty* pProperty )
00266         throw();
00267 
00271     _DWFTK_API
00272     DWFResource* provideResource( DWFResource* pResource )
00273         throw();
00274 
00278     _DWFTK_API
00279     DWFFontResource* provideFontResource( DWFFontResource* pResource )
00280         throw();
00281 
00285     _DWFTK_API
00286     DWFImageResource* provideImageResource( DWFImageResource* pResource )
00287         throw();
00288 
00292     _DWFTK_API
00293     DWFContentPresentationResource* provideContentPresentationResource( DWFContentPresentationResource* pResource )
00294         throw();
00295 
00296 private:
00297 
00298     DWFDataSection( const DWFDataSection& );
00299     DWFDataSection& operator=( const DWFDataSection& );
00300 };
00301 
00302 }
00303 
00304 #endif

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