1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-07-30 13:05:50 +03:00
occt/src/CDF/CDF_FWOSDriver.hxx
abv 8a39adb7d8 0031785: [REGRESSION] Application Framework - application crashes on reading XBF document in background thread
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.
2020-09-28 10:46:01 +03:00

77 lines
3.0 KiB
C++

// Created on: 1997-01-22
// Created by: Mister rmi
// 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 _CDF_FWOSDriver_HeaderFile
#define _CDF_FWOSDriver_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <CDF_MetaDataDriver.hxx>
#include <CDM_MetaDataLookUpTable.hxx>
#include <Standard_Boolean.hxx>
class TCollection_ExtendedString;
class CDM_MetaData;
class CDM_Document;
class CDF_FWOSDriver;
DEFINE_STANDARD_HANDLE(CDF_FWOSDriver, CDF_MetaDataDriver)
class CDF_FWOSDriver : public CDF_MetaDataDriver
{
public:
//! Initializes the MetaDatadriver connected to specified look-up table.
//! Note that the created driver will keep reference to the table,
//! thus it must have life time longer than this object.
Standard_EXPORT CDF_FWOSDriver(CDM_MetaDataLookUpTable& theLookUpTable);
//! indicate whether a file exists corresponding to the folder and the name
Standard_EXPORT Standard_Boolean Find (const TCollection_ExtendedString& aFolder, const TCollection_ExtendedString& aName, const TCollection_ExtendedString& aVersion) Standard_OVERRIDE;
Standard_EXPORT Standard_Boolean HasReadPermission (const TCollection_ExtendedString& aFolder, const TCollection_ExtendedString& aName, const TCollection_ExtendedString& aVersion) Standard_OVERRIDE;
Standard_EXPORT Standard_Boolean FindFolder (const TCollection_ExtendedString& aFolder) Standard_OVERRIDE;
Standard_EXPORT TCollection_ExtendedString DefaultFolder() Standard_OVERRIDE;
Standard_EXPORT TCollection_ExtendedString BuildFileName (const Handle(CDM_Document)& aDocument) Standard_OVERRIDE;
Standard_EXPORT virtual TCollection_ExtendedString SetName (const Handle(CDM_Document)& aDocument, const TCollection_ExtendedString& aName) Standard_OVERRIDE;
DEFINE_STANDARD_RTTIEXT(CDF_FWOSDriver,CDF_MetaDataDriver)
private:
Standard_EXPORT Handle(CDM_MetaData) MetaData (const TCollection_ExtendedString& aFolder, const TCollection_ExtendedString& aName, const TCollection_ExtendedString& aVersion) Standard_OVERRIDE;
Standard_EXPORT Handle(CDM_MetaData) CreateMetaData (const Handle(CDM_Document)& aDocument, const TCollection_ExtendedString& aFileName) Standard_OVERRIDE;
Standard_EXPORT static TCollection_ExtendedString Concatenate (const TCollection_ExtendedString& aFolder, const TCollection_ExtendedString& aName);
private:
CDM_MetaDataLookUpTable* myLookUpTable;
};
#endif // _CDF_FWOSDriver_HeaderFile