]> SALOME platform Git repositories - modules/kernel.git/blobdiff - src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx
Salome HOME
Remove trailing space.
[modules/kernel.git] / src / SALOMEDSImpl / SALOMEDSImpl_Study.hxx
index bd8f55faf9b491937c06c28a5e69d892c6adf346..2a297f440af570e7587125fffe862edd090f1b41 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -64,7 +64,6 @@ private:
   DF_Document*             _clipboard;
   bool                     _Saved; // True if the Study is saved
   std::string              _URL; //URL of the persistent reference of the study
-  DF_Label                 _current;
   bool                     _autoFill; 
   std::string              _errorCode;
   std::vector<std::string> _lockers;
@@ -73,6 +72,7 @@ private:
   SALOMEDSImpl_UseCaseBuilder* _useCaseBuilder;
   SALOMEDSImpl_AbstractCallback* _notifier;
   SALOMEDSImpl_AbstractCallback* _genObjRegister;
+  std::string              _dumpPath; // path (folder) to the python file which is currently dumped
 
   std::map<std::string, SALOMEDSImpl_SObject> _mapOfSO;
   std::map<std::string, SALOMEDSImpl_SComponent> _mapOfSCO;
@@ -89,11 +89,11 @@ private:
 
   std::string _GetStudyVariablesScript();
   std::string _GetNoteBookAccessor();
-  std::string _GetNoteBookAccess(const std::string& theStudyVar);
+  std::string _GetNoteBookAccess();
 
 public:
 
-  static SALOMEDSImpl_Study* GetStudy(const DF_Label& theLabel);
+  static SALOMEDSImpl_Study* GetStudyImpl(const DF_Label& theLabel);
   static SALOMEDSImpl_SObject SObject(const DF_Label& theLabel);
   static SALOMEDSImpl_SComponent SComponent(const DF_Label& theLabel);
   static void IORUpdated(const SALOMEDSImpl_AttributeIOR* theAttribute);
@@ -111,18 +111,15 @@ public:
   virtual bool Open(const std::string& aStudyUrl);
 
   //! method to save a Study
-  virtual bool Save(SALOMEDSImpl_DriverFactory* aFactory, bool theMultiFile);
-
-  virtual bool SaveASCII(SALOMEDSImpl_DriverFactory* aFactory, bool theMultiFile);
+  virtual bool Save(SALOMEDSImpl_DriverFactory* aFactory,
+                    bool theMultiFile,
+                    bool theASCII);
 
   //! method to save a Study to the persistent reference aUrl
   virtual bool SaveAs(const std::string& aUrl,
                       SALOMEDSImpl_DriverFactory* aFactory,
-                      bool theMultiFile);
-
-  virtual bool SaveAsASCII(const std::string& aUrl,
-                           SALOMEDSImpl_DriverFactory* aFactory,
-                           bool theMultiFile);
+                      bool theMultiFile,
+                      bool theASCII);
 
   bool CopyLabel(SALOMEDSImpl_Driver* theEngine,
                  const int theSourceStartDepth,
@@ -154,11 +151,6 @@ public:
   //! method to Get persistent reference of study (idem URL())
   virtual std::string GetPersistentReference();
 
-  //! method to Get transient reference of study
-  virtual std::string GetTransientReference();
-
-  virtual void SetTransientReference(const std::string& theIOR);
-
   //! method to detect if a study is empty
   virtual bool IsEmpty();
 
@@ -193,24 +185,6 @@ public:
 
   std::string GetObjectPathByIOR(const std::string& theIOR);
 
-  //! method to set a context: root ('/') is UserData component
-  virtual bool SetContext(const std::string& thePath);
-
-  //! method to get a context
-  virtual std::string GetContext();  
-
-  //! method to get all object names in the given context (or in the current context, if 'theContext' is empty)
-  virtual std::vector<std::string> GetObjectNames(const std::string& theContext);
-
-  //! method to get all directory names in the given context (or in the current context, if 'theContext' is empty)
-  virtual std::vector<std::string> GetDirectoryNames(const std::string& theContext);
-
-  //! method to get all file names in the given context (or in the current context, if 'theContext' is empty)
-  virtual std::vector<std::string> GetFileNames(const std::string& theContext);
-
-  //! method to get all components names
-  virtual std::vector<std::string> GetComponentNames(const std::string& theContext);
-
   //! method to Create a ChildIterator from an SObject 
   virtual SALOMEDSImpl_ChildIterator NewChildIterator(const SALOMEDSImpl_SObject& aSO);
 
@@ -222,6 +196,9 @@ public:
  
   //! method to get study name
   virtual std::string Name();
+
+  //! method to set study name
+  virtual void  Name(const std::string& name);
   
   //! method to get if study has been saved
   virtual bool IsSaved();
@@ -265,8 +242,6 @@ public:
   virtual DF_Attribute* GetAttribute(const std::string& theEntry, 
                                                      const std::string& theType);
 
-  virtual bool HasCurrentContext() { return !_current.IsNull(); }
-
   virtual bool DumpStudy(const std::string& thePath, 
                          const std::string& theBaseName, 
                          bool isPublished,
@@ -274,6 +249,9 @@ public:
                          SALOMEDSImpl_DriverFactory* theFactory);
 
   static std::string GetDumpStudyComment(const char* theComponentName = 0);
+
+  // Returns the folder of the python script which is currently dumped
+  std::string GetDumpPath();
   
   virtual DF_Document* GetDocument() { return _doc; }