From 370b8bdee0dc41da43708adfaf2a7ffdd4681cf0 Mon Sep 17 00:00:00 2001 From: srn Date: Thu, 24 Mar 2005 05:46:44 +0000 Subject: [PATCH] Removed unnecessary methods for Callback --- idl/SALOMEDS.idl | 36 ---------------------- src/SALOMEDS/SALOMEDS_Callback_i.hxx | 38 ------------------------ src/SALOMEDS/SALOMEDS_SObject_i.hxx | 1 + src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx | 24 --------------- src/SALOMEDS/SALOMEDS_StudyBuilder_i.hxx | 3 -- src/SALOMEDS/SALOMEDS_Study_i.hxx | 1 - 6 files changed, 1 insertion(+), 102 deletions(-) delete mode 100644 src/SALOMEDS/SALOMEDS_Callback_i.hxx diff --git a/idl/SALOMEDS.idl b/idl/SALOMEDS.idl index db7074134..23c0dc57b 100644 --- a/idl/SALOMEDS.idl +++ b/idl/SALOMEDS.idl @@ -98,7 +98,6 @@ during each working session. interface AttributeStudyProperties; interface UseCaseIterator; interface UseCaseBuilder; - interface Callback; /*! List of attributes of %SObjects */ @@ -608,22 +607,6 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin */ boolean GetAvailableRedos(); -/*! - This method is called when adding an object into study. - It sets the callback for addition of the given %SObject. - \param theCallback New assigned callback. - \return The previous callback. -*/ - Callback SetOnAddSObject(in Callback theCallback); -/*! - This method is called when adding an object into study. - It sets the callback for removal of the given %SObject. - - \return The previous callback. - \param theCallback New assigned callback. -*/ - Callback SetOnRemoveSObject(in Callback theCallback); - /*! Puts name attribute with the given string value to the given %SObject @@ -1107,25 +1090,6 @@ Activates the %UseCaseIterator. UseCaseIterator GetUseCaseIterator(in SObject theObject); }; //========================================================================== - //========================================================================== -/*! \brief The callback interface - - The %StudyBuilder can be created with the method NewBuilder. While invocation of this method a new object of the class Callback is created - and this object is assigned to the newly created Builder as callback which should be called when adding and removing of the ojects. -*/ - interface Callback - { -/*! - Invokes the corresponding method Append of the %UseCaseBuilder. -*/ - void OnAddSObject(in SObject theObject); -/*! - Invokes the corresponding method Remove of the %UseCaseBuilder. -*/ - void OnRemoveSObject(in SObject theObject); - }; - - //========================================================================== /*! \brief %Driver interface This class represents a common tool for all components integrated into SALOME application, that allows them to communicate with the study. It contains a set of methods which diff --git a/src/SALOMEDS/SALOMEDS_Callback_i.hxx b/src/SALOMEDS/SALOMEDS_Callback_i.hxx deleted file mode 100644 index c1b79f9e7..000000000 --- a/src/SALOMEDS/SALOMEDS_Callback_i.hxx +++ /dev/null @@ -1,38 +0,0 @@ -// File : SALOMEDS_Callback_i.hxx -// Author : Sergey RUIN -// Module : SALOME - -//SRN: !!!!!!!!!!!!!!! DEPRICATED CLASS, DON'T USE IT, TO BE REMOVED - -#ifndef __SALOMEDS_CALLBACK_I_H__ -#define __SALOMEDS_CALLBACK_I_H__ - -// IDL headers -#include -#include CORBA_SERVER_HEADER(SALOMEDS) - -class SALOMEDS_Callback_i: public POA_SALOMEDS::Callback, - public PortableServer::RefCountServantBase { - -private: - CORBA::ORB_var _orb; - SALOMEDS::UseCaseBuilder_var _builder; - -public: - - SALOMEDS_Callback_i(SALOMEDS::UseCaseBuilder_ptr builder, CORBA::ORB_ptr orb) { - _orb = CORBA::ORB::_duplicate(orb); - _builder = SALOMEDS::UseCaseBuilder::_duplicate(builder); - } - - virtual void OnAddSObject(SALOMEDS::SObject_ptr theObject) { - if(!_builder->_is_nil() && !theObject->_is_nil()) _builder->Append(theObject); - } - - virtual void OnRemoveSObject(SALOMEDS::SObject_ptr theObject) { - if(!_builder->_is_nil() && !theObject->_is_nil()) _builder->Remove(theObject); - } - -}; - -#endif diff --git a/src/SALOMEDS/SALOMEDS_SObject_i.hxx b/src/SALOMEDS/SALOMEDS_SObject_i.hxx index e42eaa98b..a5573d924 100644 --- a/src/SALOMEDS/SALOMEDS_SObject_i.hxx +++ b/src/SALOMEDS/SALOMEDS_SObject_i.hxx @@ -50,4 +50,5 @@ public: virtual CORBA::Short Tag(); virtual CORBA::Short Depth(); }; + #endif diff --git a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx index 49e000af5..5c2c74274 100644 --- a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx @@ -476,30 +476,6 @@ void SALOMEDS_StudyBuilder_i::UndoLimit(CORBA::Long n) _impl->UndoLimit(n); } -//============================================================================ -/*! Function : SetOnAddSObject - * Purpose : - */ -//============================================================================ -SALOMEDS::Callback_ptr SALOMEDS_StudyBuilder_i::SetOnAddSObject(SALOMEDS::Callback_ptr) -{ - SALOMEDS::Locker lock; - MESSAGE("Not implemented on the CORBA level !!!"); - return SALOMEDS::Callback::_nil(); -} - -//============================================================================ -/*! Function : SetOnNewSObject - * Purpose : - */ -//============================================================================ -SALOMEDS::Callback_ptr SALOMEDS_StudyBuilder_i::SetOnRemoveSObject(SALOMEDS::Callback_ptr) -{ - SALOMEDS::Locker lock; - MESSAGE("Not implemented on the CORBA level !!!"); - return SALOMEDS::Callback::_nil(); -} - //============================================================================ /*! Function : CheckLocked * Purpose : diff --git a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.hxx b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.hxx index ecd6876ba..07c887e8f 100644 --- a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.hxx +++ b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.hxx @@ -108,9 +108,6 @@ public: void CheckLocked() throw (SALOMEDS::StudyBuilder::LockProtection); - virtual SALOMEDS::Callback_ptr SetOnAddSObject(SALOMEDS::Callback_ptr theCallback); - virtual SALOMEDS::Callback_ptr SetOnRemoveSObject(SALOMEDS::Callback_ptr theCallback); - virtual void SetName(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection); virtual void SetComment(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection); virtual void SetIOR(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection); diff --git a/src/SALOMEDS/SALOMEDS_Study_i.hxx b/src/SALOMEDS/SALOMEDS_Study_i.hxx index 6c6ed6208..e8f4518f2 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.hxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.hxx @@ -20,7 +20,6 @@ #include "SALOMEDS_StudyBuilder_i.hxx" #include "SALOMEDS_SObject_i.hxx" #include "SALOMEDS_UseCaseBuilder_i.hxx" -#include "SALOMEDS_Callback_i.hxx" #include "SALOMEDSImpl_Study.hxx" #include "SALOMEDSImpl_AttributeIOR.hxx" -- 2.39.2