-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
PortableServer::POA_ptr poa,
PortableServer::ObjectId* contId,
const char* instanceName,
- const char* interfaceName) :
- Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
+ const char* interfaceName,
+ bool withRegistry) :
+ Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, withRegistry)
{
_thisObj = this;
_id = _poa->activate_object(_thisObj);
- name_service = new SALOME_NamingService(_orb);
-
_impl = new ::GEOMImpl_Gen;
//PAL10867: disable signals catching with "noexcepthandler" option
// purpose : destructor
//============================================================================
GEOM_Gen_i::~GEOM_Gen_i() {
- delete name_service;
delete _impl;
- std::map<std::string, GEOM_GenericOperationsCreator*>::const_iterator it;
- for ( it = myOpCreatorMap.begin(); it != myOpCreatorMap.end(); ++it)
+ for (auto it = myOpCreatorMap.cbegin(); it != myOpCreatorMap.cend(); ++it)
delete (*it).second;
}
return aParts._retn();
}
-//============================================================================
-// function : register()
-// purpose : register 'name' in 'name_service'
-//============================================================================
-void GEOM_Gen_i::register_name(char * name)
-{
- GEOM::GEOM_Gen_var g = _this();
- name_service->Register(g, name);
-}
-
-//============================================================================
-// function : getStudyServant()
-// purpose : Get Study
-//============================================================================
-SALOMEDS::Study_var GEOM_Gen_i::getStudyServant()
-{
- static SALOMEDS::Study_var aStudy;
- if(CORBA::is_nil(aStudy)){
- CORBA::Object_ptr anObject = name_service->Resolve("/Study");
- aStudy = SALOMEDS::Study::_narrow(anObject);
- }
- return aStudy;
-}
-
//============================================================================
// function : findOrCreateComponent()
// purpose : Find root study component; create if it does not exist
return operations._retn();
}
+//============================================================================
+// function : GetITestOperations
+// purpose :
+//============================================================================
+GEOM::GEOM_ITestOperations_ptr GEOM_Gen_i::GetITestOperations()
+{
+ Unexpect aCatch(SALOME_SalomeException);
+ MESSAGE( "GEOM_Gen_i::GetITestOperations" );
+
+ GEOM::GEOM_Gen_ptr engine = _this();
+
+ GEOM_ITestOperations_i* aServant =
+ new GEOM_ITestOperations_i(_poa, engine, _impl->GetITestOperations());
+
+ // activate the CORBA servant
+ GEOM::GEOM_ITestOperations_var operations = aServant->_this();
+ return operations._retn();
+}
+
+//============================================================================
+// function : GetICanonicalRecognition
+// purpose :
+//============================================================================
+GEOM::GEOM_ICanonicalRecognition_ptr GEOM_Gen_i::GetICanonicalRecognition()
+{
+ Unexpect aCatch(SALOME_SalomeException);
+ MESSAGE("GEOM_Gen_i::GetICanonicalRecognition");
+
+ GEOM::GEOM_Gen_ptr engine = _this();
+
+ GEOM_ICanonicalRecognition_i* aServant =
+ new GEOM_ICanonicalRecognition_i(_poa, engine, _impl->GetICanonicalRecognition());
+
+ // activate the CORBA servant
+ GEOM::GEOM_ICanonicalRecognition_var operations = aServant->_this();
+ return operations._retn();
+}
+
//============================================================================
// function : GetPluginOperations
// purpose :
includeSubObjects( aSubEntryStr, aSelected, aParents, aChildren, anOthers );
}
}
-//=====================================================================================
-// EXPORTED METHODS
-//=====================================================================================
-extern "C"
-{
- /*
- GEOM_I_EXPORT
- PortableServer::ObjectId* GEOMEngine_factory(CORBA::ORB*, PortableServer::POA*, PortableServer::ObjectId*, const char*, const char*);
- */
-
- GEOM_I_EXPORT
- PortableServer::ObjectId* GEOMEngine_factory(CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- PortableServer::ObjectId* contId,
- const char* instanceName,
- const char* interfaceName)
- {
- GEOM_Gen_i* myGEOM_Gen_i = new GEOM_Gen_i(orb, poa, contId, instanceName, interfaceName);
- return myGEOM_Gen_i->getId();
- }
-}
+