mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-05-01 10:26:12 +03:00
Class CDF_Session is removed. Integrated previously but not described: 0029195: OCAF - ensure thread safety for different documents. Static local variables are eliminated in PCDM package. Global documents metadata look-up table and directory of opened documents are removed. Look-up table is maintained now as field in instances of the CDM_Application class. Methods providing iteration by components are removed from class CDF_Store; signature of methods returned Standard_ExtString is changed to return Handle(TCollection_HExtendedString). Support of different "Presentations" of documents is eliminated.
115 lines
3.7 KiB
C++
115 lines
3.7 KiB
C++
// Created on: 1997-10-22
|
|
// Created by: Jean-Louis Frenkel
|
|
// Copyright (c) 1997-1999 Matra Datavision
|
|
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
|
//
|
|
// This file is part of Open CASCADE Technology software library.
|
|
//
|
|
// This library is free software; you can redistribute it and/or modify it under
|
|
// the terms of the GNU Lesser General Public License version 2.1 as published
|
|
// by the Free Software Foundation, with special exception defined in the file
|
|
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
|
// distribution for complete text of the license and disclaimer of any warranty.
|
|
//
|
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
|
// commercial license or contractual agreement.
|
|
|
|
#ifndef _CDM_Application_HeaderFile
|
|
#define _CDM_Application_HeaderFile
|
|
|
|
#include <Standard.hxx>
|
|
#include <Standard_Type.hxx>
|
|
|
|
#include <Standard_Transient.hxx>
|
|
#include <Standard_Boolean.hxx>
|
|
#include <Standard_Integer.hxx>
|
|
#include <Standard_ExtString.hxx>
|
|
#include <TCollection_AsciiString.hxx>
|
|
#include <TCollection_ExtendedString.hxx>
|
|
#include <CDM_MetaDataLookUpTable.hxx>
|
|
#include <Message_ProgressRange.hxx>
|
|
|
|
class CDM_Reference;
|
|
class CDM_MetaData;
|
|
class CDM_Document;
|
|
class Resource_Manager;
|
|
class Message_Messenger;
|
|
|
|
class CDM_Application;
|
|
DEFINE_STANDARD_HANDLE(CDM_Application, Standard_Transient)
|
|
|
|
|
|
class CDM_Application : public Standard_Transient
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
//! The manager returned by this virtual method will be
|
|
//! used to search for Format.Retrieval resource items.
|
|
Standard_EXPORT virtual Handle(Resource_Manager) Resources() = 0;
|
|
|
|
//! Returns default messenger;
|
|
Standard_EXPORT virtual Handle(Message_Messenger) MessageDriver();
|
|
|
|
//! this method is called before the update of a document.
|
|
//! By default, writes in MessageDriver().
|
|
Standard_EXPORT virtual void BeginOfUpdate (const Handle(CDM_Document)& aDocument);
|
|
|
|
//! this method is called affter the update of a document.
|
|
//! By default, writes in MessageDriver().
|
|
Standard_EXPORT virtual void EndOfUpdate (const Handle(CDM_Document)& aDocument, const Standard_Boolean theStatus, const TCollection_ExtendedString& ErrorString);
|
|
|
|
//! writes the string in the application MessagerDriver.
|
|
Standard_EXPORT void Write (const Standard_ExtString aString);
|
|
|
|
//! Returns the application name.
|
|
Standard_EXPORT virtual TCollection_ExtendedString Name() const;
|
|
|
|
//! Returns the application version.
|
|
Standard_EXPORT virtual TCollection_AsciiString Version() const;
|
|
|
|
//! Returns MetaData LookUpTable
|
|
Standard_EXPORT virtual CDM_MetaDataLookUpTable& MetaDataLookUpTable();
|
|
|
|
//! Dumps the content of me into the stream
|
|
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
|
|
|
|
friend class CDM_Reference;
|
|
friend class CDM_MetaData;
|
|
|
|
|
|
DEFINE_STANDARD_RTTIEXT(CDM_Application,Standard_Transient)
|
|
|
|
protected:
|
|
|
|
Standard_EXPORT CDM_Application();
|
|
|
|
Standard_EXPORT void SetDocumentVersion (const Handle(CDM_Document)& aDocument, const Handle(CDM_MetaData)& aMetaData) const;
|
|
|
|
Standard_EXPORT void SetReferenceCounter (const Handle(CDM_Document)& aDocument, const Standard_Integer aReferenceCounter);
|
|
|
|
private:
|
|
|
|
|
|
Standard_EXPORT virtual Handle(CDM_Document) Retrieve
|
|
(const Handle(CDM_MetaData)& aMetaData,
|
|
const Standard_Boolean UseStorageConfiguration,
|
|
const Message_ProgressRange& theRange = Message_ProgressRange()) = 0;
|
|
|
|
//! returns -1 if the metadata has no modification counter.
|
|
Standard_EXPORT virtual Standard_Integer DocumentVersion (const Handle(CDM_MetaData)& aMetaData) = 0;
|
|
|
|
Handle(Message_Messenger) myMessenger;
|
|
CDM_MetaDataLookUpTable myMetaDataLookUpTable;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // _CDM_Application_HeaderFile
|