ContentPresentation.h

Go to the documentation of this file.
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_CONTENT_PRESENTATION_H
00021 #define _DWFTK_CONTENT_PRESENTATION_H
00022 
00023 
00028 
00029 #include "dwfcore/Owner.h"
00030 #include "dwfcore/DWFXMLSerializer.h"
00031 using namespace DWFCore;
00032 
00033 #include "dwf/Toolkit.h"
00034 #include "dwf/presentation/utility/ContentPresentationViewContainer.h"
00035 
00036 namespace DWFToolkit
00037 {
00038 
00039 //
00040 // fwd decl
00041 //
00042 class DWFContentPresentationContainer;
00043 
00055 class DWFContentPresentation : public DWFContentPresentationViewContainer
00056                              , public DWFXMLBuildable
00057 #ifndef DWFTK_READ_ONLY
00058                              , public DWFXMLSerializable
00059 #endif
00060                              , public DWFOwnable
00061                              _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00062 {
00063 
00064     friend class DWFContentPresentationContainer;
00065 
00066 public:
00070     typedef DWFOrderedVector<DWFContentPresentation*>            tList;
00071 
00072 public:
00073 
00077     static const char* const kzID_PackageContents;
00081     static const char* const kzID_ContentNavigation;
00085     static const char* const kzID_Views;
00086 
00087         static const char* const kzID_DefinedViews;
00091     static const char* const kzID_Layers;
00095     static const char* const kzID_Table;
00099     static const char* const kzID_Animations;
00103     static const char* const kzID_Showmotions;
00104 
00112     _DWFTK_API
00113     DWFContentPresentation( const DWFString& zLabel = /*NOXLATE*/L"",
00114                             const DWFString& zID = /*NOXLATE*/L"" )
00115         throw();
00116 
00122     _DWFTK_API
00123     virtual ~DWFContentPresentation()
00124         throw();
00125 
00132     _DWFTK_API
00133     virtual void setID( const DWFString& zID )
00134         throw( DWFException );
00135 
00143     _DWFTK_API
00144     virtual const DWFString& id() const
00145         throw();
00146 
00153     _DWFTK_API
00154     virtual void setLabel( const DWFString& zLabel )
00155         throw();
00156 
00164     _DWFTK_API
00165     virtual const DWFString& label() const
00166         throw();
00167 
00174     _DWFTK_API
00175     virtual DWFContentPresentationContainer* parent() const
00176         throw()
00177     {
00178         return _pParent;
00179     }
00180 
00184     _DWFTK_API
00185     virtual void parseAttributeList( const char** ppAttributeList )
00186         throw( DWFException );
00187 
00188 #ifndef DWFTK_READ_ONLY
00189 
00193     _DWFTK_API
00194     virtual void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00195         throw( DWFException );
00196 
00197 #endif
00198 
00199 private:
00200 
00201     DWFContentPresentation( const DWFContentPresentation& );
00202     DWFContentPresentation& operator=( const DWFContentPresentation& );
00203 
00204     void setParent( DWFContentPresentationContainer* pParent )
00205     {
00206         _pParent = pParent;
00207     }
00208 
00209 private:
00210 
00211     DWFString                               _zID;
00212     DWFString                               _zLabel;
00213     DWFContentPresentationContainer*        _pParent;
00214 };
00215 
00216     //
00217     // required for win32 dll external linkage
00218     //
00219 #ifdef  _DWFCORE_WIN32_SYSTEM
00220 #ifndef DWFTK_STATIC
00221 
00222 _declspec(selectany) const char* const DWFContentPresentation::kzID_PackageContents        = "mXbIKdssFUOrLj3K7vZWHg";
00223 _declspec(selectany) const char* const DWFContentPresentation::kzID_ContentNavigation      = "mnbIKdssFUOrLj3K7vZWHg";
00224 _declspec(selectany) const char* const DWFContentPresentation::kzID_Views                  = "m3bIKdssFUOrLj3K7vZWHg";
00225 _declspec(selectany) const char* const DWFContentPresentation::kzID_Layers                 = "nHbIKdssFUOrLj3K7vZWHg";
00226 _declspec(selectany) const char* const DWFContentPresentation::kzID_Table                  = "nXbIKdssFUOrLj3K7vZWHg";
00227 _declspec(selectany) const char* const DWFContentPresentation::kzID_Animations             = "nYbIKdssFUOrLj3K7vZWHg";
00228 _declspec(selectany) const char* const DWFContentPresentation::kzID_Showmotions            = "nZbIKdssFUOrLj3K7vZWHg";
00229 _declspec(selectany) const char* const DWFContentPresentation::kzID_DefinedViews                   = "m0bIKdssFUOrLj3K7vZWHg";
00230 
00231 #endif
00232 #endif
00233 
00234 }
00235 
00236 #endif

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