PropertyReferenceContainer.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/PropertyReferenceContainer.h#1 $
00020 //  $DateTime: 2008/02/20 08:38:28 $
00021 //  $Author: appacsviewers $
00022 //  $Change: 84992 $
00023 
00024 #ifndef _DWFTK_PROPERTY_REFERENCE_CONTAINER_H
00025 #define _DWFTK_PROPERTY_REFERENCE_CONTAINER_H
00026 
00027 
00032 
00033 #include "dwfcore/STL.h"
00034 
00035 #include "dwf/Toolkit.h"
00036 #include "dwf/presentation/PropertyReference.h"
00037 
00038 namespace DWFToolkit
00039 {
00040 
00050 class DWFPropertyReferenceContainer _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE
00051 {
00052 
00053 public:
00054 
00061     _DWFTK_API
00062     DWFPropertyReferenceContainer()
00063         throw();
00064 
00072     _DWFTK_API
00073     virtual ~DWFPropertyReferenceContainer()
00074         throw();
00075 
00085     _DWFTK_API
00086     virtual void addPropertyReference( DWFPropertyReference* pPropertyReference )
00087         throw( DWFException );
00088 
00099     _DWFTK_API
00100     virtual DWFPropertyReference::tList::Iterator* getPropertyReferences()
00101         throw();
00102 
00114     _DWFTK_API
00115     virtual void removePropertyReference( DWFPropertyReference* pPropertyReference,
00116                                           bool                  bDelete )
00117         throw( DWFException );
00118 
00119 
00120 #ifndef DWFTK_READ_ONLY
00121 
00129     DWFXMLSerializable& getSerializable() const
00130         throw()
00131     {
00132         return (DWFXMLSerializable&)_oSerializer;
00133     }
00134 #endif
00135 
00136 
00137 #ifndef DWFTK_READ_ONLY
00138 
00139 private:
00140 
00141     //
00142     // in order to avoid bizarre diamond patterns and
00143     // excessively overload base implementations,
00144     // all container classes must define and implementation this
00145     // internal [PRIVATE] class utility for serializing themselves into XML.
00146     //
00147     class _Serializer : public DWFXMLSerializable
00148                         _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00149     {
00150 
00151     public:
00152 
00153         _Serializer()
00154             throw()
00155             : DWFXMLSerializable()
00156             , _pContainer( NULL )
00157         {;}
00158 
00159         virtual ~_Serializer()
00160             throw()
00161         {;}
00162 
00163         void is( DWFPropertyReferenceContainer* pContainer )
00164         {
00165             _pContainer = pContainer;
00166         }
00167 
00168         //
00169         //
00170         //
00171         virtual void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00172             throw( DWFException );
00173 
00174     private:
00175 
00176         DWFPropertyReferenceContainer* _pContainer;
00177     };
00178 
00179 private:
00180 
00181     _Serializer _oSerializer;
00182 
00183 #endif
00184 
00185 
00186 protected:
00187 
00191     DWFPropertyReference::tList      _oPropertyReferences;
00192 
00193 private:
00194 
00195     DWFPropertyReferenceContainer( const DWFPropertyReferenceContainer& );
00196     DWFPropertyReferenceContainer& operator=( const DWFPropertyReferenceContainer& );
00197 };
00198 
00199 }
00200 
00201 #endif

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