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_Application_HeaderFile
0018 #define _CDM_Application_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <Standard_Transient.hxx>
0023 #include <Standard_Integer.hxx>
0024 #include <CDM_MetaDataLookUpTable.hxx>
0025 #include <Message_ProgressRange.hxx>
0026 
0027 class CDM_MetaData;
0028 class CDM_Document;
0029 class Resource_Manager;
0030 class Message_Messenger;
0031 class PCDM_ReaderFilter;
0032 
0033 class CDM_Application;
0034 DEFINE_STANDARD_HANDLE(CDM_Application, Standard_Transient)
0035 
0036 
0037 class CDM_Application : public Standard_Transient
0038 {
0039 
0040 public:
0041 
0042   
0043   //! The manager returned by  this virtual  method will be
0044   //! used to search for Format.Retrieval  resource items.
0045   Standard_EXPORT virtual Handle(Resource_Manager) Resources() = 0;
0046   
0047   //! Returns default messenger;
0048   Standard_EXPORT virtual Handle(Message_Messenger) MessageDriver();
0049   
0050   //! this method is called before the update of a document.
0051   //! By default, writes in MessageDriver().
0052   Standard_EXPORT virtual void BeginOfUpdate (const Handle(CDM_Document)& aDocument);
0053   
0054   //! this method is called affter the update of a document.
0055   //! By default, writes in MessageDriver().
0056   Standard_EXPORT virtual void EndOfUpdate (const Handle(CDM_Document)& aDocument, const Standard_Boolean theStatus, const TCollection_ExtendedString& ErrorString);
0057   
0058   //! writes the string in the application MessagerDriver.
0059   Standard_EXPORT void Write (const Standard_ExtString aString);
0060 
0061   //! Returns the application name.
0062   Standard_EXPORT virtual TCollection_ExtendedString Name() const;
0063 
0064   //! Returns the application version.
0065   Standard_EXPORT virtual TCollection_AsciiString Version() const;
0066   
0067   //! Returns MetaData LookUpTable
0068   Standard_EXPORT virtual  CDM_MetaDataLookUpTable& MetaDataLookUpTable();
0069 
0070   //! Dumps the content of me into the stream
0071   Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
0072 
0073 friend class CDM_Reference;
0074 friend class CDM_MetaData;
0075 
0076 
0077   DEFINE_STANDARD_RTTIEXT(CDM_Application,Standard_Transient)
0078 
0079 protected:
0080 
0081   Standard_EXPORT CDM_Application();
0082 
0083   Standard_EXPORT void SetDocumentVersion (const Handle(CDM_Document)& aDocument, const Handle(CDM_MetaData)& aMetaData) const;
0084   
0085   Standard_EXPORT void SetReferenceCounter (const Handle(CDM_Document)& aDocument, const Standard_Integer aReferenceCounter);
0086 
0087 private:
0088 
0089   
0090   Standard_EXPORT virtual Handle(CDM_Document) Retrieve
0091         (const Handle(CDM_MetaData)& aMetaData, 
0092          const Standard_Boolean UseStorageConfiguration,
0093          const Handle(PCDM_ReaderFilter)& theFilter = Handle(PCDM_ReaderFilter)(),
0094          const Message_ProgressRange& theRange = Message_ProgressRange()) = 0;
0095   
0096   //! returns -1 if the metadata has no modification counter.
0097   Standard_EXPORT virtual Standard_Integer DocumentVersion (const Handle(CDM_MetaData)& aMetaData) = 0;
0098 
0099   Handle(Message_Messenger) myMessenger;
0100   CDM_MetaDataLookUpTable myMetaDataLookUpTable;
0101 
0102 };
0103 
0104 
0105 
0106 
0107 
0108 
0109 
0110 #endif // _CDM_Application_HeaderFile