ContentPresentationReferenceNode.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/ContentPresentationReferenceNode.h#2 $
00020 //  $DateTime: 2008/06/18 18:08:14 $
00021 //  $Author: gaoje $
00022 //  $Change: 101166 $
00023 
00024 #ifndef _DWFTK_CONTENT_PRESENTATION_REFERENCE_NODE_H
00025 #define _DWFTK_CONTENT_PRESENTATION_REFERENCE_NODE_H
00026 
00027 
00032 
00033 #include "dwfcore/STL.h"
00034 #include "dwfcore/Vector.h"
00035 #include "dwfcore/SkipList.h"
00036 using namespace DWFCore;
00037 
00038 #include "dwf/Toolkit.h"
00039 #include "dwf/presentation/ContentPresentationNode.h"
00040 
00041 namespace DWFToolkit
00042 {
00043 
00044 //
00045 // fwd decl
00046 //
00047 class DWFContentElement;
00048 class DWFResource;
00049 class DWFPropertyReference;
00050 
00063 
00064 class DWFContentPresentationReferenceNode : public DWFContentPresentationNode
00065                                             _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00066 {
00067     friend class DWFContentPresentationResource;
00068     friend class DWFContentPresentationReader;
00069 public:
00070 
00078     _DWFTK_API
00079     DWFContentPresentationReferenceNode( const DWFString& zLabel = /*NOXLATE*/L"",
00080                                          const DWFString& zID = /*NOXLATE*/L"" )
00081         throw();
00088     _DWFTK_API
00089     virtual ~DWFContentPresentationReferenceNode()
00090         throw();
00091 
00098     _DWFTK_API
00099     virtual void setContentElement( const DWFContentElement& rContentElement )
00100         throw();
00101 
00111     _DWFTK_API
00112     virtual const DWFString& contentElementID() const
00113         throw()
00114     {
00115         return _zContentElementID;
00116     }
00117 
00125     _DWFTK_API
00126     virtual void setResource( DWFResource& rResource, DWFSection& rContainingSection )
00127         throw();
00128 
00137     _DWFTK_API
00138     virtual void setResource( DWFResource& rResource )
00139         throw();
00140 
00147     _DWFTK_API
00148     virtual void setResource( const DWFString& rResourceURI )
00149         throw();
00150 
00160     _DWFTK_API
00161     virtual const DWFString& resourceURI() const
00162         throw()
00163     {
00164         return _zResourceURI;
00165     }
00166 
00176     _DWFTK_API
00177     virtual void setPropertyReferenceURI( DWFPropertyReference& rPropertyReference,
00178                                           const DWFString& zURI )
00179         throw(DWFException);
00180 
00190     _DWFTK_API
00191     virtual void setPropertyReferenceURI( const DWFString& zID,
00192                                           const DWFString& zURI )
00193         throw(DWFException);
00194 
00203     _DWFTK_API
00204     virtual const DWFString& getPropertyReferenceURI( const DWFPropertyReference& rPropertyReference ) const
00205         throw();
00206 
00213     _DWFTK_API
00214     virtual void setURI( const DWFString& zURI )
00215         throw()
00216     {
00217         _zURI = zURI;
00218     }
00219 
00227     _DWFTK_API
00228     virtual const DWFString& uri() const
00229         throw()
00230     {
00231         return _zURI;
00232     }
00233 
00237     _DWFTK_API
00238     virtual void parseAttributeList( const char** ppAttributeList )
00239         throw( DWFException );
00240 
00241 #ifndef DWFTK_READ_ONLY
00242 
00246     _DWFTK_API
00247     virtual void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00248         throw( DWFException );
00249 
00250 private:
00251     void serializeAttributes( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00252         throw( DWFException );
00253 
00254 #endif
00255 
00256 private:
00257 
00258     DWFResource* _containingResource();
00259     void _setContentElement( const DWFString& zID )
00260         throw()
00261     {
00262         _zContentElementID = zID;
00263     }
00264 
00265 
00266 private:
00267 
00268     typedef DWFSkipList<DWFPropertyReference*, DWFString>       _tPropertyReferenceURIMap;
00269     typedef DWFStringKeySkipList<DWFString>                     _tPropertyReferenceIDURIMap;
00270 
00271 
00272     const DWFContentElement*                        _pContentElement;
00273     DWFString                                       _zContentElementID;
00274 
00275     DWFString                                       _zResourceURI;
00276     DWFResource*                                    _pResource;
00277     DWFSection*                                     _pSectionContainingResource;
00278 
00279     DWFString                                       _zURI;
00280 
00281     _tPropertyReferenceURIMap                       _oPRMap;
00282     _tPropertyReferenceIDURIMap                     _oPRIDMap;
00283 
00284     DWFString                                       _zEmptyString;
00285 };
00286 
00287 }
00288 
00289 #endif

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