Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:20

0001 // Created on: 1997-10-22
0002 // Created by: Jean-Louis Frenkel
0003 // Copyright (c) 1997-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _CDM_Reference_HeaderFile
0018 #define _CDM_Reference_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <CDM_DocumentPointer.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <Standard_Transient.hxx>
0026 class CDM_Document;
0027 class CDM_Application;
0028 class CDM_MetaData;
0029 
0030 
0031 class CDM_Reference;
0032 DEFINE_STANDARD_HANDLE(CDM_Reference, Standard_Transient)
0033 
0034 
0035 class CDM_Reference : public Standard_Transient
0036 {
0037 
0038 public:
0039 
0040   
0041   Standard_EXPORT Handle(CDM_Document) FromDocument();
0042   
0043   Standard_EXPORT Handle(CDM_Document) ToDocument();
0044   
0045   Standard_EXPORT Standard_Integer ReferenceIdentifier();
0046   
0047   Standard_EXPORT Standard_Integer DocumentVersion() const;
0048   
0049   Standard_EXPORT Standard_Boolean IsReadOnly() const;
0050   
0051   //! Dumps the content of me into the stream
0052   Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
0053 
0054 
0055 friend class CDM_Document;
0056 
0057 
0058   DEFINE_STANDARD_RTTIEXT(CDM_Reference,Standard_Transient)
0059 
0060 protected:
0061 
0062 
0063 
0064 
0065 private:
0066 
0067   
0068   Standard_EXPORT CDM_Reference(const Handle(CDM_Document)& aFromDocument, const Handle(CDM_Document)& aToDocument, const Standard_Integer aReferenceIdentifier, const Standard_Integer aToDocumentVersion);
0069   
0070   Standard_EXPORT CDM_Reference(const Handle(CDM_Document)& aFromDocument, const Handle(CDM_MetaData)& aMetaData, const Standard_Integer aReferenceIdentifier, const Handle(CDM_Application)& anApplication, const Standard_Integer aToDocumentVersion, const Standard_Boolean UseStorageConfiguration);
0071   
0072   Standard_EXPORT void Update (const Handle(CDM_MetaData)& aMetaData);
0073   
0074   //! compares the actual document version with the
0075   //! document version at the creation of the reference
0076   Standard_EXPORT Standard_Boolean IsUpToDate() const;
0077   
0078   Standard_EXPORT void SetIsUpToDate();
0079   
0080   Standard_EXPORT void UnsetToDocument (const Handle(CDM_MetaData)& aMetaData, const Handle(CDM_Application)& anApplication);
0081   
0082   //! returns  true if the  ToDocument has been retrieved
0083   //! and opened.
0084   Standard_EXPORT Standard_Boolean IsOpened() const;
0085   
0086   Standard_EXPORT Handle(CDM_Document) Document() const;
0087   
0088   Standard_EXPORT Handle(CDM_MetaData) MetaData() const;
0089   
0090   Standard_EXPORT Handle(CDM_Application) Application() const;
0091   
0092   Standard_EXPORT Standard_Boolean UseStorageConfiguration() const;
0093   
0094   Standard_EXPORT Standard_Boolean IsInSession() const;
0095   
0096   Standard_EXPORT Standard_Boolean IsStored() const;
0097 
0098   Handle(CDM_Document) myToDocument;
0099   CDM_DocumentPointer myFromDocument;
0100   Standard_Integer myReferenceIdentifier;
0101   Handle(CDM_Application) myApplication;
0102   Handle(CDM_MetaData) myMetaData;
0103   Standard_Integer myDocumentVersion;
0104   Standard_Boolean myUseStorageConfiguration;
0105 
0106 
0107 };
0108 
0109 
0110 
0111 
0112 
0113 
0114 
0115 #endif // _CDM_Reference_HeaderFile