mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-06-12 09:59:03 +08:00
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.
This commit is contained in:
@@ -53,9 +53,10 @@ void PCDM_ReferenceIterator::LoadReferences(const Handle(CDM_Document)& aDocumen
|
||||
const Handle(CDM_MetaData)& aMetaData,
|
||||
const Handle(CDM_Application)& anApplication,
|
||||
const Standard_Boolean UseStorageConfiguration) {
|
||||
for (Init(aMetaData);More();Next()) {
|
||||
aDocument->CreateReference(MetaData(UseStorageConfiguration),ReferenceIdentifier(),
|
||||
anApplication,DocumentVersion(),UseStorageConfiguration);
|
||||
for (Init(aMetaData);More();Next())
|
||||
{
|
||||
aDocument->CreateReference(MetaData(anApplication->MetaDataLookUpTable(),UseStorageConfiguration),
|
||||
ReferenceIdentifier(),anApplication,DocumentVersion(),UseStorageConfiguration);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +97,9 @@ void PCDM_ReferenceIterator::Next() {
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(CDM_MetaData) PCDM_ReferenceIterator::MetaData(const Standard_Boolean ) const {
|
||||
Handle(CDM_MetaData) PCDM_ReferenceIterator::MetaData(CDM_MetaDataLookUpTable& theLookUpTable,
|
||||
const Standard_Boolean ) const
|
||||
{
|
||||
|
||||
TCollection_ExtendedString theFolder,theName;
|
||||
TCollection_ExtendedString theFile=myReferences(myIterator).FileName();
|
||||
@@ -140,8 +143,9 @@ Handle(CDM_MetaData) PCDM_ReferenceIterator::MetaData(const Standard_Boolean ) c
|
||||
theName = UTL::Name(p); theName+= UTL::Extension(p);
|
||||
#endif // _WIN32
|
||||
|
||||
return CDM_MetaData::LookUp(theFolder,theName,theFile,theFile,UTL::IsReadOnly(theFile));
|
||||
return CDM_MetaData::LookUp(theLookUpTable, theFolder, theName, theFile, theFile, UTL::IsReadOnly(theFile));
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReferenceIdentifier
|
||||
//purpose :
|
||||
|
||||
@@ -21,15 +21,13 @@
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <PCDM_SequenceOfReference.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <CDM_MetaDataLookUpTable.hxx>
|
||||
|
||||
class Message_Messenger;
|
||||
class CDM_Document;
|
||||
class CDM_MetaData;
|
||||
class CDM_Application;
|
||||
|
||||
|
||||
class PCDM_ReferenceIterator;
|
||||
DEFINE_STANDARD_HANDLE(PCDM_ReferenceIterator, Standard_Transient)
|
||||
|
||||
@@ -64,18 +62,18 @@ private:
|
||||
|
||||
Standard_EXPORT virtual void Next();
|
||||
|
||||
Standard_EXPORT virtual Handle(CDM_MetaData) MetaData (const Standard_Boolean UseStorageConfiguration) const;
|
||||
Standard_EXPORT virtual Handle(CDM_MetaData) MetaData (CDM_MetaDataLookUpTable& theLookUpTable,
|
||||
const Standard_Boolean UseStorageConfiguration) const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer ReferenceIdentifier() const;
|
||||
|
||||
//! returns the version of the document in the reference
|
||||
Standard_EXPORT virtual Standard_Integer DocumentVersion() const;
|
||||
|
||||
private:
|
||||
PCDM_SequenceOfReference myReferences;
|
||||
Standard_Integer myIterator;
|
||||
Handle(Message_Messenger) myMessageDriver;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user