-// Copyright (C) 2011-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2011-2022 CEA/DEN, 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
#include "SALOME_LifeCycleCORBA.hxx"
#include "SALOMEconfig.h"
#include <SMESH_Gen_i.hxx>
-#include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog)
-#include CORBA_CLIENT_HEADER(SMESH_Gen)
#include <cmath>
#include <stdlib.h>
_id = _poa->activate_object(_thisObj);
myHomard = new ::HOMARD_Gen;
- _NS = SINGLETON_<SALOME_NamingService>::Instance();
- ASSERT(SINGLETON_<SALOME_NamingService>::IsAlreadyExisting());
- _NS->init_orb(_orb);
_tag_gene = 0 ;
_tag_boun = 0 ;
homardFather = myBuilder->NewComponent(ComponentDataType());
SALOMEDS::GenericAttribute_var anAttr = myBuilder->FindOrCreateAttribute(homardFather,"AttributeName");
SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
- CORBA::Object_var objVarN = _NS->Resolve("/Kernel/ModulCatalog");
- SALOME_ModuleCatalog::ModuleCatalog_var Catalogue =
- SALOME_ModuleCatalog::ModuleCatalog::_narrow(objVarN);
+ SALOME_ModuleCatalog::ModuleCatalog_var Catalogue = this->getModuleCatalog();
SALOME_ModuleCatalog::Acomponent_var Comp = Catalogue->GetComponent(ComponentDataType());
if (!Comp->_is_nil())
{
// On enregistre le fichier
MESSAGE( "Enregistrement du fichier");
- SALOME_LifeCycleCORBA* myLCC = new SALOME_LifeCycleCORBA(_NS);
- SMESH::SMESH_Gen_var aSmeshEngine = SMESH::SMESH_Gen::_narrow(myLCC->FindOrLoad_Component("FactoryServer","SMESH"));
+ //
+ SMESH::SMESH_Gen_var aSmeshEngine = this->retrieveSMESHInst();
+ //
ASSERT(!CORBA::is_nil(aSmeshEngine));
aSmeshEngine->UpdateStudy();
SMESH::DriverMED_ReadStatus theStatus;