-// 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
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;
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;
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);
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,
//! 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();
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);
//! 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();
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,
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; }