RelationshipContainer.h

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 //  $Header: //DWF/Development/Components/Internal/DWF Toolkit/v7.6/develop/global/src/dwf/opc/RelationshipContainer.h#1 $
00019 //  $DateTime: 2008/02/20 08:38:28 $
00020 //  $Author: appacsviewers $
00021 //  $Change: 84992 $
00022 //  $Revision: #1 $
00023 //
00024 //
00025 
00026 #ifndef _DWFTK_OPCRELATIONSHIPCONTAINER_H
00027 #define _DWFTK_OPCRELATIONSHIPCONTAINER_H
00028 
00029 
00030 #include "dwf/opc/Relationship.h"
00031 #include "dwf/opc/RelationshipContainerInterface.h"
00032 #include "dwf/opc/reader/RelationshipContainerReader.h"
00033 
00034 
00035 namespace DWFToolkit
00036 {
00037 
00050 class OPCRelationshipContainer : public OPCRelationshipContainerInterface
00051                                , public OPCRelationshipContainerReader
00052                                _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00053 {
00054 
00055 public:
00056 
00057     _DWFTK_API
00058     OPCRelationshipContainer()
00059         throw();
00060 
00061     _DWFTK_API
00062     virtual ~OPCRelationshipContainer()
00063         throw();
00064 
00065     _DWFTK_API
00066     virtual OPCRelationship* addRelationship( OPCPart* pTargetPart, 
00067                                               const DWFString& zRelationshipType, 
00068                                               OPCRelationship::teTargetMode eTargetMode )
00069         throw( DWFException );
00070 
00071     _DWFTK_API
00072     virtual bool deleteRelationship( OPCRelationship* pRelationship )
00073         throw();
00074 
00075     _DWFTK_API
00076     virtual size_t relationshipCount() const
00077         throw();
00078 
00079     _DWFTK_API
00080     virtual OPCRelationship::tIterator* relationships()
00081         throw();
00082 
00083     _DWFTK_API
00084     virtual OPCRelationship::tIterator* relationshipsByTarget( const DWFString& zTargetURI ) const
00085         throw();
00086 
00087     _DWFTK_API
00088     virtual OPCRelationship::tIterator* relationshipsByTarget( OPCPart* pPart ) const
00089         throw();
00090 
00091     _DWFTK_API
00092     virtual OPCRelationship::tIterator* relationshipsByType( const DWFString& zType ) const
00093         throw();
00094 
00095     _DWFTK_API
00096     virtual void deleteRelationshipsByTarget( OPCPart* pPart )
00097         throw( DWFException );
00098 
00099     _DWFTK_API
00100     DWFInputStream* getInputStream()
00101         throw( DWFException );
00102 
00103     _DWFTK_API
00104     virtual void loadRelationships(DWFInputStream* pRelsInputStream)
00105         throw( DWFException );
00106 
00107 #ifndef DWFTK_READ_ONLY
00108 
00109     _DWFTK_API
00110     virtual void serializeRelationship( DWFXMLSerializer& rSerializer )
00111         throw();
00112 
00113 #endif
00114 
00115     _DWFTK_API
00116     virtual OPCRelationship* provideRelationship( OPCRelationship* pRelationship )
00117         throw();
00118 
00119 protected:
00120 
00121     //
00122     // Buffer to which the XML is written for serialization of this content.
00123     //
00124     char*           _pBuffer;
00125 
00126 private:
00127 
00128     OPCRelationship::tList _oRelationships;
00129 
00130 };
00131 
00132 }
00133 
00134 #endif

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