Salome HOME
Preparation of intermediate revision
[modules/geom.git] / src / GEOM_I / GEOM_Gen_i.cc
index 3bc08c7c81e54fd1dbca57fb4bb3bb5e3cb0eb84..184690c13a390d754830a6e4b33f7973fd4b5b51 100644 (file)
@@ -321,6 +321,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
   aNameAttrib->Destroy();
 
   //Set NoteBook variables used in the object creation
+  /*ASL: temporary commented
   TCollection_AsciiString aVars;
   CORBA::String_var aString=aShape->GetParameters();
   SALOMEDS::ListOfListOfStrings_var aSections = theStudy->ParseVariables(aString);
@@ -335,10 +336,12 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
     if(i != n-1)
       aVars += "|";
   }
+
   anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeString");
   SALOMEDS::AttributeString_var aStringAttrib = SALOMEDS::AttributeString::_narrow(anAttr);
   aStringAttrib->SetValue(aVars.ToCString());
   aStringAttrib->Destroy();
+  */
 
   aFather->Destroy();
 
@@ -1587,7 +1590,7 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::AddSubShape (GEOM::GEOM_Object_ptr theMainShap
 void GEOM_Gen_i::RemoveObject(GEOM::GEOM_Object_ptr theObject)
 {
   CORBA::String_var anEntry = theObject->GetEntry();
-  Handle(GEOM_Object) anObject = _impl->GetObject(theObject->GetStudyID(), anEntry);
+  Handle(GEOM_Object) anObject = _impl->GetObject(theObject->GetStudyID(), anEntry, false);
   if (anObject.IsNull()) return;
   _impl->RemoveObject(anObject);
   return;
@@ -1617,6 +1620,15 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::GetIORFromString(const char* stringIOR) {
   return aGeomObject._retn();
 }
 
+//=================================================================================
+// function : FindObjectByInternalEntry()
+// purpose  :
+//=================================================================================
+SALOME::GenericObj_ptr GEOM_Gen_i::FindObjectByInternalEntry( CORBA::Long theStudyID, const char* theEntry )
+{
+  return GetObject( theStudyID, theEntry );
+}
+
 //=================================================================================
 // function : GetObject()
 // purpose  :
@@ -1808,18 +1820,19 @@ char* GEOM_Gen_i::getObjectInfo(CORBA::Long studyId, const char* entry)
 //=====================================================================================
 extern "C"
 {
-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_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);
-   // Don't understand the reason of this register ????
-//   myGEOM_Gen_i->register_name("/myGEOM_Gen"); // NRI : 11/07/2002 : Add for Supervision example
-   return myGEOM_Gen_i->getId();
+    GEOM_Gen_i* myGEOM_Gen_i = new GEOM_Gen_i(orb, poa, contId, instanceName, interfaceName);
+    return myGEOM_Gen_i->getId();
   }
 }