From: srn Date: Wed, 18 Jul 2007 11:50:20 +0000 (+0000) Subject: Implemented method Modified() for SALOMEDS_Study that marks the Study as being modified. X-Git-Tag: Start_MERGE_MULTIPR_EVOLUTION~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5e4b6520ef229065a499a0301993a014ab0bcc24;p=modules%2Fkernel.git Implemented method Modified() for SALOMEDS_Study that marks the Study as being modified. --- diff --git a/idl/SALOMEDS.idl b/idl/SALOMEDS.idl index 73dd4b1e8..541740fd1 100644 --- a/idl/SALOMEDS.idl +++ b/idl/SALOMEDS.idl @@ -309,6 +309,12 @@ during each working session. Returns True if the %study has been modified and not saved. */ boolean IsModified(); + +/*! + Marks the %study as being modified and not saved. +*/ + void Modified(); + /*! Determines the file where the %study has been saved */ diff --git a/src/SALOMEDS/SALOMEDS_Study.cxx b/src/SALOMEDS/SALOMEDS_Study.cxx index 207684032..3dca6b26d 100644 --- a/src/SALOMEDS/SALOMEDS_Study.cxx +++ b/src/SALOMEDS/SALOMEDS_Study.cxx @@ -505,6 +505,16 @@ bool SALOMEDS_Study::IsModified() else isModified = _corba_impl->IsModified(); return isModified; } + +void SALOMEDS_Study::Modified() +{ + if (_isLocal) { + SALOMEDS::Locker lock; + _local_impl->Modify(); + } + else _corba_impl->IsModified(); +} + std::string SALOMEDS_Study::URL() { diff --git a/src/SALOMEDS/SALOMEDS_Study.hxx b/src/SALOMEDS/SALOMEDS_Study.hxx index 8babf0b6e..41e40902a 100644 --- a/src/SALOMEDS/SALOMEDS_Study.hxx +++ b/src/SALOMEDS/SALOMEDS_Study.hxx @@ -75,6 +75,7 @@ public: virtual bool IsSaved(); virtual void IsSaved(bool save); virtual bool IsModified(); + virtual void Modified(); virtual std::string URL(); virtual void URL(const std::string& url); virtual int StudyId(); diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index 1bac30de6..51c1be559 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -522,6 +522,18 @@ CORBA::Boolean SALOMEDS_Study_i::IsModified() return _impl->IsModified(); } +//============================================================================ +/*! Function : Modified + * Purpose : Set a Modified flag of a Study to True + */ +//============================================================================ +void SALOMEDS_Study_i::Modified() +{ + SALOMEDS::Locker lock; + _impl->Modify(); +} + + //============================================================================ /*! Function : URL * Purpose : get URL of the study (persistent reference of the study) diff --git a/src/SALOMEDS/SALOMEDS_Study_i.hxx b/src/SALOMEDS/SALOMEDS_Study_i.hxx index 137eca872..bcbae1dee 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.hxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.hxx @@ -223,6 +223,10 @@ public: */ virtual CORBA::Boolean IsModified(); + //! method to set a Modified flag of a Study to True + virtual void Modified(); + + //! method to get URL of the study (idem GetPersistentReference) /*! \return char* arguments, the study URL diff --git a/src/SALOMEDSClient/SALOMEDSClient_Study.hxx b/src/SALOMEDSClient/SALOMEDSClient_Study.hxx index 136bafd35..33182f673 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_Study.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_Study.hxx @@ -69,6 +69,7 @@ public: virtual bool IsSaved() = 0; virtual void IsSaved(bool save) = 0; virtual bool IsModified() = 0; + virtual void Modified() = 0; virtual std::string URL() = 0; virtual void URL(const std::string& url) = 0; virtual int StudyId() = 0;