ContentPresentationViewContainer.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 //  $Header: //DWF/Development/Components/Internal/DWF Toolkit/v7.6/develop/global/src/dwf/presentation/utility/ContentPresentationViewContainer.h#3 $
00020 //  $DateTime: 2008/12/09 00:24:37 $
00021 //  $Author: gaoje $
00022 //  $Change: 125697 $
00023 
00024 #ifndef _DWFTK_CONTENT_PRESENTATION_VIEW_CONTAINER_H
00025 #define _DWFTK_CONTENT_PRESENTATION_VIEW_CONTAINER_H
00026 
00027 
00032 
00033 #include "dwfcore/STL.h"
00034 #include "dwfcore/DWFXMLSerializer.h"
00035 #include "dwfcore/SkipList.h"
00036 
00037 #include "dwf/Toolkit.h"
00038 #include "dwf/presentation/ContentPresentationView.h"
00039 
00040 namespace DWFToolkit
00041 {
00042 
00052 class DWFContentPresentationViewContainer _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE
00053 {
00054 
00055 public:
00056 
00063     _DWFTK_API
00064     DWFContentPresentationViewContainer()
00065         throw();
00066 
00074     _DWFTK_API
00075     virtual ~DWFContentPresentationViewContainer()
00076         throw();
00077 
00086     _DWFTK_API
00087     virtual void addView( DWFContentPresentationView* pView )
00088         throw( DWFException );
00089 
00100     _DWFTK_API
00101     virtual DWFContentPresentationView::tList::Iterator* getViews( )
00102         throw();
00103 
00112     _DWFTK_API
00113     virtual void removeView( DWFContentPresentationView* pView,
00114                              bool                        bDelete )
00115         throw( DWFException );
00116 
00117 #ifndef DWFTK_READ_ONLY
00118 
00126     DWFXMLSerializable& getSerializable() const
00127         throw()
00128     {
00129         return (DWFXMLSerializable&)_oSerializer;
00130     }
00131 #endif
00132 
00133 #ifndef DWFTK_READ_ONLY
00134 
00135 private:
00136 
00137     //
00138     // in order to avoid bizarre diamond patterns and
00139     // excessively overload base implementations,
00140     // all container classes must define and implementation this
00141     // internal [PRIVATE] class utility for serializing themselves into XML.
00142     //
00143     class _Serializer : public DWFXMLSerializable
00144                         _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00145     {
00146 
00147     public:
00148 
00149         _Serializer()
00150             throw()
00151             : DWFXMLSerializable()
00152             , _pContainer( NULL )
00153         {;}
00154 
00155         virtual ~_Serializer()
00156             throw()
00157         {;}
00158 
00159         void is( DWFContentPresentationViewContainer* pContainer )
00160         {
00161             _pContainer = pContainer;
00162         }
00163 
00164         //
00165         //
00166         //
00167         virtual void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00168             throw( DWFException );
00169 
00170     private:
00171 
00172         DWFContentPresentationViewContainer* _pContainer;
00173     };
00174 
00175 private:
00176 
00177     _Serializer _oSerializer;
00178 
00179 #endif
00180 
00181 
00182 protected:
00183 
00187     DWFContentPresentationView::tList      _oViews;
00188 
00189          typedef DWFStringKeySkipList<size_t>     IDToPostionMap;
00190          IDToPostionMap                                           posMap;                                                                       
00191 
00192 private:
00193 
00194     DWFContentPresentationViewContainer( const DWFContentPresentationViewContainer& );
00195     DWFContentPresentationViewContainer& operator=( const DWFContentPresentationViewContainer& );
00196 };
00197 
00198 }
00199 
00200 #endif

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