GlobalSection.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_GLOBAL_SECTION_H
00021 #define _DWFTK_GLOBAL_SECTION_H
00022 
00023 
00024 
00029 
00030 
00031 
00032 #include "dwfcore/STL.h"
00033 #include "dwfcore/SkipList.h"
00034 using namespace DWFCore;
00035 
00036 #include "dwf/Version.h"
00037 #include "dwf/Toolkit.h"
00038 #include "dwf/package/Section.h"
00039 #include "dwf/package/reader/GlobalSectionDescriptorReader.h"
00040 
00041 
00042 namespace DWFToolkit
00043 {
00044 
00045 
00065 class DWFGlobalSection : public DWFSection,
00066                          public DWFGlobalSectionDescriptorReader
00067                          _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00068 {
00069 
00070 public:
00071 
00075     typedef _DWFTK_STD_VECTOR(DWFGlobalSection*)                                    tList;
00079     typedef DWFWCharKeySkipList<DWFGlobalSection*>                                  tMap;
00083     typedef std::multimap<const wchar_t*, DWFGlobalSection*, tDWFWCharCompareLess>  tMultiMap;
00084 
00085 public:
00086 
00096     class Factory : public DWFSection::Factory
00097                     _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00098     {
00099 
00100     public:
00101 
00108         _DWFTK_API
00109         Factory( const DWFString& zType )
00110             throw();
00111 
00117         _DWFTK_API
00118         virtual ~Factory()
00119             throw();
00120 
00135         _DWFTK_API
00136         virtual DWFSection* build( const DWFString&     zName,
00137                                    const DWFString&     zTitle,
00138                                    DWFPackageReader*    pPackageReader )
00139             throw( DWFException );
00140 
00156          _DWFTK_API
00157         virtual DWFSection* build( const DWFString&     zType,
00158                                    const DWFString&     zName,
00159                                    const DWFString&     zTitle,
00160                                    DWFPackageReader*    pPackageReader )
00161             throw( DWFException );
00162     };
00163 
00164 public:
00165 
00181     _DWFTK_API
00182     DWFGlobalSection( const DWFString&  zType,
00183                       const DWFString&  zName,
00184                       const DWFString&  zTitle,
00185                       DWFPackageReader* pPackageReader )
00186         throw();
00187 
00201     _DWFTK_API
00202     DWFGlobalSection( const DWFString& zType,
00203                       const DWFString& zName,
00204                       const DWFString& zTitle,
00205                       double           nVersion,
00206                       const DWFSource& rSource )
00207         throw();
00208 
00214     _DWFTK_API
00215     virtual ~DWFGlobalSection()
00216         throw();
00217 
00264     _DWFTK_API
00265     const DWFBookmark* const bookmark() const
00266         throw()
00267     {
00268         return _pRootBookmark;
00269     }
00270 
00274     _DWFTK_API
00275     const DWFResource& readDescriptor( DWFSectionDescriptorReader* pSectionDescriptorReader = NULL ) const
00276         throw( DWFException );
00277 
00278 #ifndef DWFTK_READ_ONLY
00279 
00283     _DWFTK_API
00284     virtual void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00285         throw( DWFException );
00286 
00287 #endif
00288 
00292     _DWFTK_API
00293     const char* provideName( const char* zName )
00294         throw();
00295 
00299     _DWFTK_API
00300     double provideVersion( double nVersion )
00301         throw();
00302 
00306     _DWFTK_API
00307     DWFProperty* provideProperty( DWFProperty* pProperty )
00308         throw();
00309 
00313     _DWFTK_API
00314     DWFResource* provideResource( DWFResource* pResource )
00315         throw();
00316 
00320     _DWFTK_API
00321     DWFFontResource* provideFontResource( DWFFontResource* pResource )
00322         throw();
00323 
00327     _DWFTK_API
00328     DWFGraphicResource* provideGraphicResource( DWFGraphicResource* pResource )
00329         throw();
00330 
00334     _DWFTK_API
00335     DWFImageResource* provideImageResource( DWFImageResource* pResource )
00336         throw();
00337 
00341     _DWFTK_API
00342     DWFBookmark* provideBookmark( DWFBookmark* pBookmark )
00343         throw();
00344 
00345 private:
00346 
00347     DWFBookmark*    _pRootBookmark;
00348 
00349 private:
00350 
00351     DWFGlobalSection( const DWFGlobalSection& );
00352     DWFGlobalSection& operator=( const DWFGlobalSection& );
00353 };
00354 
00362 class DWFEPlotGlobalSection : public DWFGlobalSection
00363                               _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00364 {
00365 
00366 public:
00367 
00377     class Factory : public DWFGlobalSection::Factory
00378                     _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00379     {
00380 
00381     public:
00382 
00388         _DWFTK_API
00389         Factory()
00390             throw();
00391 
00397         _DWFTK_API
00398         virtual ~Factory()
00399             throw();
00400 
00404         _DWFTK_API
00405         virtual DWFSection* build( const DWFString&     zName,
00406                                    const DWFString&     zTitle,
00407                                    DWFPackageReader*    pPackageReader )
00408             throw( DWFException );
00409     };
00410 
00411 public:
00412 
00427     _DWFTK_API
00428     DWFEPlotGlobalSection( const DWFString&  zName,
00429                            const DWFString&  zTitle,
00430                            DWFPackageReader* pPackageReader )
00431         throw()
00432         : DWFGlobalSection( _DWF_FORMAT_EPLOT_GLOBAL_TYPE_STRING, zName, zTitle, pPackageReader )
00433     {;}
00434 
00445     _DWFTK_API
00446     DWFEPlotGlobalSection( const DWFString& zTitle = /*NOXLATE*/L"",
00447                            const DWFSource& rSource = DWFSource(/*NOXLATE*/L"",/*NOXLATE*/L"",/*NOXLATE*/L"") )
00448         throw()
00449         : DWFGlobalSection( _DWF_FORMAT_EPLOT_GLOBAL_TYPE_STRING,
00450                             _DWF_FORMAT_EPLOT_GLOBAL_TYPE_STRING,
00451                              zTitle,
00452                             _DWF_FORMAT_EPLOT_VERSION_CURRENT_FLOAT,
00453                              rSource )
00454     {;}
00455 
00461     _DWFTK_API
00462     virtual ~DWFEPlotGlobalSection()
00463         throw()
00464     {;}
00465 
00466 #ifndef DWFTK_READ_ONLY
00467 
00471     _DWFTK_API
00472     void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00473         throw( DWFException );
00474 
00475 #endif
00476 
00477 private:
00478 
00479     DWFEPlotGlobalSection( const DWFEPlotGlobalSection& );
00480     DWFEPlotGlobalSection& operator=( const DWFEPlotGlobalSection& );
00481 };
00482 
00483 
00491 class DWFEModelGlobalSection : public DWFGlobalSection
00492                                _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00493 {
00494 
00495 public:
00496 
00506     class Factory : public DWFGlobalSection::Factory
00507                     _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00508     {
00509 
00510     public:
00511 
00517         _DWFTK_API
00518         Factory()
00519             throw();
00520 
00526         _DWFTK_API
00527         virtual ~Factory()
00528             throw();
00529 
00533         _DWFTK_API
00534         virtual DWFSection* build( const DWFString&     zName,
00535                                    const DWFString&     zTitle,
00536                                    DWFPackageReader*    pPackageReader )
00537             throw( DWFException );
00538     };
00539 
00540 public:
00541 
00556     _DWFTK_API
00557     DWFEModelGlobalSection( const DWFString&  zName,
00558                             const DWFString&  zTitle,
00559                             DWFPackageReader* pPackageReader )
00560         throw()
00561         : DWFGlobalSection( _DWF_FORMAT_EMODEL_GLOBAL_TYPE_STRING, zName, zTitle, pPackageReader )
00562     {;}
00563 
00574     _DWFTK_API
00575     DWFEModelGlobalSection( const DWFString& zTitle = /*NOXLATE*/L"",
00576                             const DWFSource& rSource = DWFSource(/*NOXLATE*/L"",/*NOXLATE*/L"",/*NOXLATE*/L"") )
00577         throw()
00578         : DWFGlobalSection( _DWF_FORMAT_EMODEL_GLOBAL_TYPE_STRING,
00579                             _DWF_FORMAT_EMODEL_GLOBAL_TYPE_STRING,
00580                              zTitle,
00581                             _DWF_FORMAT_EMODEL_VERSION_CURRENT_FLOAT,
00582                              rSource )
00583     {;}
00584 
00590     _DWFTK_API
00591     virtual ~DWFEModelGlobalSection()
00592         throw()
00593     {;}
00594 
00595 #ifndef DWFTK_READ_ONLY
00596 
00600     _DWFTK_API
00601     void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00602         throw( DWFException );
00603 
00604 #endif
00605 
00606 private:
00607 
00608     DWFEModelGlobalSection( const DWFEModelGlobalSection& );
00609     DWFEModelGlobalSection& operator=( const DWFEModelGlobalSection& );
00610 };
00611 
00612 }
00613 
00614 #endif

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