#include <qlistbox.h>
#include <qregexp.h>
-#include "SALOMEDS_StudyManager.hxx"
-#include "SALOMEDS_SObject.hxx"
-
#include "SALOME_ListIteratorOfListIO.hxx"
#include "SALOME_ListIO.hxx"
#include "ToolsGUI_CatalogGeneratorDlg.h"
#include "ToolsGUI_RegWidget.h"
+#include <SALOMEDSClient_ClientFactory.hxx>
+
/*!Create new instance of SalomeApp_Application.*/
extern "C" SALOMEAPP_EXPORT SUIT_Application* createApplication()
{
_PTR(SObject) so = stdDS->FindObjectID(it.Value()->getEntry());
if ( so ) {
- SALOMEDS_SObject* aSO = dynamic_cast<SALOMEDS_SObject*>(so.get());
-
- if ( aSO ) {
- canCopy = studyMgr()->CanCopy(so);
- canPaste = studyMgr()->CanPaste(so);
- }
+ canCopy = studyMgr()->CanCopy(so);
+ canPaste = studyMgr()->CanPaste(so);
}
}
}
/*!Create and return SALOMEDS_StudyManager.*/
SALOMEDSClient_StudyManager* SalomeApp_Application::studyMgr()
{
- static SALOMEDSClient_StudyManager* _sm = new SALOMEDS_StudyManager();
- return _sm;
+ static _PTR(StudyManager) _sm;
+ if(!_sm) _sm = ClientFactory::StudyManager();
+ return _sm.get();
}
/*!Create and return SALOME_NamingService.*/
#include "SALOME_Container_i.hxx"
#include "SALOME_ContainerManager.hxx"
-#include "SALOMEDS_StudyManager_i.hxx"
+#include <SALOMEDSClient.hxx>
+#include <SALOMEDSClient_ClientFactory.hxx>
#include "SALOME_ModuleCatalog_impl.hxx"
#include "RegistryService.hxx"
#include "Session_Session_i.hxx"
// counted objects, they will be deleted by the POA when they are no
// longer needed.
- SALOMEDS_StudyManager_i * myStudyManager_i
- = new SALOMEDS_StudyManager_i(_orb,_root_poa);
-
- // Activate the objects. This tells the POA that the objects are
- // ready to accept requests.
-
- PortableServer::ObjectId_var myStudyManager_iid
- = _root_poa->activate_object(myStudyManager_i);
- myStudyManager_i->register_name("/myStudyManager");
+ ClientFactory::createStudyManager(_orb,_root_poa);
}
catch(CORBA::SystemException&)
{