0029195: OCAF - ensure thread safety for different documents.
[occt.git] / src / TDocStd / TDocStd_Application.hxx
index d4f3081..c168113 100644 (file)
@@ -79,9 +79,6 @@ public:
   //! Check if meta data driver was successfully loaded
   //! by the application constructor
   Standard_EXPORT Standard_Boolean IsDriverLoaded() const;
-
-  //! Redefines message driver, by default outputs to std::cout.
-  Standard_EXPORT virtual Handle(Message_Messenger) MessageDriver() Standard_OVERRIDE;
   
   //! Returns resource manager defining supported persistent formats.
   //!
@@ -286,12 +283,20 @@ public:
   //! Dumps the content of me into the stream
   Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
 
-  DEFINE_STANDARD_RTTIEXT(TDocStd_Application,CDF_Application)
+  //! Remove this application from the current session
+  Standard_EXPORT Standard_Boolean RemoveFromSession();
+
+  DEFINE_STANDARD_RTTIEXT(TDocStd_Application, CDF_Application)
 
 protected:
-  Handle(Message_Messenger) myMessageDriver;
+
   Handle(Resource_Manager) myResources;
   Standard_Boolean myIsDriverLoaded;
+
+private:
+
+  //! Add this application to the current session (register in internal container)
+  void AddToSession();
 };
 
 #endif // _TDocStd_Application_HeaderFile