#include "SALOMEDSImpl_ChildIterator.hxx"
#include "SALOMEDSImpl_GenericVariable.hxx"
-class SALOMEDSImpl_StudyManager;
+class HDFgroup;
class SALOMEDSImpl_GenericAttribute;
{
private:
std::string _name;
+ DF_Application* _appli;
DF_Document* _doc; // Document
+ DF_Document* _clipboard;
bool _Saved; // True if the Study is saved
std::string _URL; //URL of the persistent reference of the study
- int _StudyId;
DF_Label _current;
bool _autoFill;
std::string _errorCode;
static void IORUpdated(const SALOMEDSImpl_AttributeIOR* theAttribute);
//! standard constructor
- SALOMEDSImpl_Study(const DF_Document*, const std::string& study_name);
+ SALOMEDSImpl_Study();
//! standard destructor
virtual ~SALOMEDSImpl_Study();
+ virtual void Init();
+ virtual void Clear();
+
+ //! method to Open a Study from it's persistent reference
+ 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);
+
+ //! 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 CopyLabel(SALOMEDSImpl_Driver* theEngine,
+ const int theSourceStartDepth,
+ const DF_Label& theSource,
+ const DF_Label& theDestinationMain);
+
+ DF_Label PasteLabel(SALOMEDSImpl_Driver* theEngine,
+ const DF_Label& theSource,
+ const DF_Label& theDestinationStart,
+ const bool isFirstElement);
+
+ virtual bool CanCopy(const SALOMEDSImpl_SObject& theObject, SALOMEDSImpl_Driver* Engine);
+ virtual bool Copy(const SALOMEDSImpl_SObject& theObject, SALOMEDSImpl_Driver* Engine);
+ virtual bool CanPaste(const SALOMEDSImpl_SObject& theObject, SALOMEDSImpl_Driver* Engine);
+ virtual SALOMEDSImpl_SObject Paste(const SALOMEDSImpl_SObject& theObject, SALOMEDSImpl_Driver* Engine);
+
+ // _SaveAs private function called by Save and SaveAs
+ virtual bool Impl_SaveAs(const std::string& aUrl,
+ SALOMEDSImpl_DriverFactory* aFactory,
+ bool theMultiFile,
+ bool theASCII);
+
+ // _SaveObject private function called by _SaveAs
+ virtual bool Impl_SaveObject(const SALOMEDSImpl_SObject& SC, HDFgroup *hdf_group_datatype);
+
+ virtual bool Impl_SaveProperties(HDFgroup *hdf_group);
+
+
//! method to Get persistent reference of study (idem URL())
virtual std::string GetPersistentReference();
//! 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 bool IsLocked();
- virtual int StudyId();
-
- virtual void StudyId(int id);
-
virtual void DeleteIORLabelMapItem(const std::string& anIOR);
virtual void UpdateIORLabelMap(const std::string& anIOR, const std::string& aLabel);
virtual SALOMEDSImpl_UseCaseBuilder* GetUseCaseBuilder();
- virtual void Close();
-
void EnableUseCaseAutoFilling(bool isEnabled);
virtual std::string GetErrorCode() { return _errorCode; }
static void UnRegisterGenObj(const std::string& theIOR, DF_Label label);
void setGenObjRegister(SALOMEDSImpl_AbstractCallback* theRegister);
- friend class SALOMEDSImpl_StudyManager;
friend class SALOMEDSImpl_GenericAttribute;
friend class SALOMEDSImpl_GenericVariable;
};