X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2Fpadder%2Fmeshjob%2Fimpl%2FSPADDERPluginTester_i.cxx;h=b793632126cd31965030b75a8f1d0ab8e2315a31;hp=467e69d63740e943fa86ac789bb1a6eae7b7360a;hb=0fc0831670e27a5611b941c52dc152fd63964515;hpb=b0a908c0d20341651771d0249fb10882f54b2aad diff --git a/src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.cxx b/src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.cxx index 467e69d63..b79363212 100644 --- a/src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.cxx +++ b/src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2014 EDF R&D +// Copyright (C) 2011-2020 EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -100,7 +100,7 @@ bool SPADDERPluginTester_i::testkernel() beginService("SPADDERPluginTester_i::testplugin"); Engines::SalomeLauncher_ptr salomeLauncher = KERNEL::getSalomeLauncher(); - salomeLauncher = NULL; + if ( salomeLauncher ) salomeLauncher = NULL; endService("SPADDERPluginTester_i::testplugin"); return true; @@ -118,16 +118,15 @@ bool SPADDERPluginTester_i::testkernel() * This test checks the constructor of the basic classes of the SMESH * plugin for PADDER. */ -bool SPADDERPluginTester_i::testsmesh(CORBA::Long studyId) +bool SPADDERPluginTester_i::testsmesh() { beginService("SPADDERPluginTester_i::testsmesh"); // Resolve the SMESH engine and the SALOME study // _WARN_ The SMESH engine should have been loaded first SMESH_Gen_i* smeshGen_i = SMESH_Gen_i::GetSMESHGen(); - CORBA::Object_var anObject = smeshGen_i->GetNS()->Resolve("/myStudyManager"); - SALOMEDS::StudyManager_var aStudyMgr = SALOMEDS::StudyManager::_narrow(anObject); - SALOMEDS::Study_var myStudy = aStudyMgr->GetStudyByID(studyId); + CORBA::Object_var anObject = smeshGen_i->GetNS()->Resolve("/Study"); + SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(anObject); // // _MEM_ CAUTION: SMESH_Gen define a data structure for local usage @@ -146,11 +145,12 @@ bool SPADDERPluginTester_i::testsmesh(CORBA::Long studyId) // extern "C" { - PortableServer::ObjectId * SPADDERPluginTesterEngine_factory( CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName) + SPADDERPLUGINTESTERENGINE_EXPORT PortableServer::ObjectId * + SPADDERPluginTesterEngine_factory( CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName) { MESSAGE("PortableServer::ObjectId * SPADDERPluginTesterEngine_factory()"); SPADDERPluginTester_i * myEngine = new SPADDERPluginTester_i(orb, poa, contId, instanceName, interfaceName);