mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03: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:
@@ -19,7 +19,6 @@
|
||||
#include <TDocStd_Application.hxx>
|
||||
#include <TDocStd_Document.hxx>
|
||||
#include <TDocStd_XLinkTool.hxx>
|
||||
#include <CDF_Session.hxx>
|
||||
|
||||
// ====================================================================================
|
||||
// This sample contains template for typical actions with OCAF document at application
|
||||
@@ -33,23 +32,7 @@ static void Sample()
|
||||
|
||||
//...Creating application
|
||||
|
||||
Handle(TDocStd_Application) app;
|
||||
|
||||
// the application is now handled by the CDF_Session variable
|
||||
|
||||
|
||||
//...Retrieving the application
|
||||
|
||||
|
||||
if (!CDF_Session::Exists()) {
|
||||
Handle(CDF_Session) S = CDF_Session::CurrentSession();
|
||||
if (!S->HasCurrentApplication())
|
||||
Standard_DomainError::Raise("DDocStd::Find no applicative session");
|
||||
app = Handle(TDocStd_Application)::DownCast(S->CurrentApplication());
|
||||
}
|
||||
else {
|
||||
// none active application
|
||||
}
|
||||
Handle(TDocStd_Application) app = new TDocStd_Application;
|
||||
|
||||
//...Creating the new document (document conatins a framework)
|
||||
|
||||
|
Reference in New Issue
Block a user