Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages | Examples

GlobalSection.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 1996-2005 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 {
00068 
00069 public:
00070 
00074     typedef vector<DWFGlobalSection*>                                           tList;
00078     typedef DWFWCharKeySkipList<DWFGlobalSection*>                              tMap;
00082     typedef multimap<const wchar_t*, DWFGlobalSection*, tDWFWCharCompareLess>   tMultiMap;
00083 
00084 public:
00085 
00095     class Factory : public DWFSection::Factory
00096     {
00097 
00098     public:
00099 
00106         _DWFTK_API
00107         Factory( const DWFString& zType )
00108             throw();
00109 
00115         _DWFTK_API
00116         virtual ~Factory()
00117             throw();
00118 
00122         _DWFTK_API
00123         virtual DWFSection* build( const DWFString&     zName,
00124                                    const DWFString&     zTitle,
00125                                    DWFPackageReader*    pPackageReader )
00126             throw( DWFException );
00127 
00131         _DWFTK_API
00132         virtual DWFSection* build( const DWFString&     zType,
00133                                    const DWFString&     zName,
00134                                    const DWFString&     zTitle,
00135                                    DWFPackageReader*    pPackageReader )
00136             throw( DWFException );
00137     };
00138 
00139 public:
00140 
00156     _DWFTK_API
00157     DWFGlobalSection( const DWFString&  zType,
00158                       const DWFString&  zName,
00159                       const DWFString&  zTitle,
00160                       DWFPackageReader* pPackageReader )
00161         throw();
00162 
00176     _DWFTK_API
00177     DWFGlobalSection( const DWFString& zType,
00178                       const DWFString& zName,
00179                       const DWFString& zTitle,
00180                       double           nVersion,
00181                       const DWFSource& rSource )
00182         throw();
00183 
00189     _DWFTK_API
00190     virtual ~DWFGlobalSection()
00191         throw();
00192 
00239     _DWFTK_API
00240     const DWFBookmark* const bookmark() const
00241         throw()
00242     {
00243         return _pRootBookmark;
00244     }
00245 
00249     _DWFTK_API
00250     const DWFResource& readDescriptor( DWFSectionDescriptorReader* pSectionDescriptorReader = NULL ) const
00251         throw( DWFException );
00252 
00253 #ifndef DWFTK_READ_ONLY
00254 
00258     _DWFTK_API
00259     virtual void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00260         throw( DWFException );
00261 
00262 #endif
00263 
00267     _DWFTK_API
00268     const char* provideName( const char* zName )
00269         throw();
00270 
00274     _DWFTK_API
00275     double provideVersion( double nVersion )
00276         throw();
00277 
00281     _DWFTK_API
00282     DWFProperty* provideProperty( DWFProperty* pProperty )
00283         throw();
00284 
00288     _DWFTK_API
00289     DWFResource* provideResource( DWFResource* pResource )
00290         throw();
00291 
00295     _DWFTK_API
00296     DWFFontResource* provideFontResource( DWFFontResource* pResource )
00297         throw();
00298 
00302     _DWFTK_API
00303     DWFGraphicResource* provideGraphicResource( DWFGraphicResource* pResource )
00304         throw();
00305 
00309     _DWFTK_API
00310     DWFImageResource* provideImageResource( DWFImageResource* pResource )
00311         throw();
00312 
00316     _DWFTK_API
00317     DWFBookmark* provideBookmark( DWFBookmark* pBookmark )
00318         throw();
00319 
00320 private:
00321 
00322     DWFBookmark*    _pRootBookmark;
00323 
00324 private:
00325 
00326     DWFGlobalSection( const DWFGlobalSection& );
00327     DWFGlobalSection& operator=( const DWFGlobalSection& );
00328 };
00329 
00337 class DWFEPlotGlobalSection : public DWFGlobalSection
00338 {
00339 
00340 public:
00341 
00351     class Factory : public DWFGlobalSection::Factory
00352     {
00353 
00354     public:
00355 
00361         _DWFTK_API
00362         Factory()
00363             throw();
00364 
00370         _DWFTK_API
00371         virtual ~Factory()
00372             throw();
00373 
00377         _DWFTK_API
00378         virtual DWFSection* build( const DWFString&     zName,
00379                                    const DWFString&     zTitle,
00380                                    DWFPackageReader*    pPackageReader )
00381             throw( DWFException );
00382     };
00383 
00384 public:
00385 
00400     _DWFTK_API
00401     DWFEPlotGlobalSection( const DWFString&  zName,
00402                            const DWFString&  zTitle,
00403                            DWFPackageReader* pPackageReader )
00404         throw()
00405         : DWFGlobalSection( _DWF_FORMAT_EPLOT_GLOBAL_TYPE_STRING, zName, zTitle, pPackageReader )
00406     {;}
00407 
00418     _DWFTK_API
00419     DWFEPlotGlobalSection( const DWFString& zTitle = L"",
00420                            const DWFSource& rSource = DWFSource(L"",L"",L"") )
00421         throw()
00422         : DWFGlobalSection( _DWF_FORMAT_EPLOT_GLOBAL_TYPE_STRING,
00423                             _DWF_FORMAT_EPLOT_GLOBAL_TYPE_STRING,
00424                              zTitle,
00425                             _DWF_FORMAT_EPLOT_VERSION_CURRENT_FLOAT,
00426                              rSource )
00427     {;}
00428 
00434     _DWFTK_API
00435     virtual ~DWFEPlotGlobalSection()
00436         throw()
00437     {;}
00438 
00439 #ifndef DWFTK_READ_ONLY
00440 
00444     _DWFTK_API
00445     void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00446         throw( DWFException );
00447 
00448 #endif
00449 
00450 private:
00451 
00452     DWFEPlotGlobalSection( const DWFEPlotGlobalSection& );
00453     DWFEPlotGlobalSection& operator=( const DWFEPlotGlobalSection& );
00454 };
00455 
00456 
00464 class DWFEModelGlobalSection : public DWFGlobalSection
00465 {
00466 
00467 public:
00468 
00478     class Factory : public DWFGlobalSection::Factory
00479     {
00480 
00481     public:
00482 
00488         _DWFTK_API
00489         Factory()
00490             throw();
00491 
00497         _DWFTK_API
00498         virtual ~Factory()
00499             throw();
00500 
00504         _DWFTK_API
00505         virtual DWFSection* build( const DWFString&     zName,
00506                                    const DWFString&     zTitle,
00507                                    DWFPackageReader*    pPackageReader )
00508             throw( DWFException );
00509     };
00510 
00511 public:
00512 
00527     _DWFTK_API
00528     DWFEModelGlobalSection( const DWFString&  zName,
00529                             const DWFString&  zTitle,
00530                             DWFPackageReader* pPackageReader )
00531         throw()
00532         : DWFGlobalSection( _DWF_FORMAT_EMODEL_GLOBAL_TYPE_STRING, zName, zTitle, pPackageReader )
00533     {;}
00534 
00545     _DWFTK_API
00546     DWFEModelGlobalSection( const DWFString& zTitle = L"",
00547                             const DWFSource& rSource = DWFSource(L"",L"",L"") )
00548         throw()
00549         : DWFGlobalSection( _DWF_FORMAT_EMODEL_GLOBAL_TYPE_STRING,
00550                             _DWF_FORMAT_EMODEL_GLOBAL_TYPE_STRING,
00551                              zTitle,
00552                             _DWF_FORMAT_EMODEL_VERSION_CURRENT_FLOAT,
00553                              rSource )
00554     {;}
00555 
00561     _DWFTK_API
00562     virtual ~DWFEModelGlobalSection()
00563         throw()
00564     {;}
00565 
00566 #ifndef DWFTK_READ_ONLY
00567 
00571     _DWFTK_API
00572     void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00573         throw( DWFException );
00574 
00575 #endif
00576 
00577 private:
00578 
00579     DWFEModelGlobalSection( const DWFEModelGlobalSection& );
00580     DWFEModelGlobalSection& operator=( const DWFEModelGlobalSection& );
00581 };
00582 
00583 }
00584 
00585 #endif

Generated on Tue May 17 12:38:50 2005 for Autodesk DWF Toolkit by  doxygen 1.4.1