From bcabf07e6da001d3888d261abc2a038fadc7310f Mon Sep 17 00:00:00 2001 From: asl Date: Fri, 20 Nov 2009 08:10:21 +0000 Subject: [PATCH] New method FindObjectByInternalEntry() --- src/GEOM_I/GEOM_Gen_i.cc | 22 +++++++++++++++++----- src/GEOM_I/GEOM_Gen_i.hh | 2 ++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index 58471eebb..184690c13 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -66,11 +66,11 @@ // function : GEOM_Gen_i() // purpose : constructor to be called for servant creation. //============================================================================ -GEOM_Gen_i::GEOM_Gen_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId* contId, - const char* instanceName, - const char* interfaceName) : +GEOM_Gen_i::GEOM_Gen_i(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName) : Engines_Component_i(orb, poa, contId, instanceName, interfaceName) { _thisObj = this; @@ -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(); @@ -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 : diff --git a/src/GEOM_I/GEOM_Gen_i.hh b/src/GEOM_I/GEOM_Gen_i.hh index 4bd530fa1..2bdee062d 100644 --- a/src/GEOM_I/GEOM_Gen_i.hh +++ b/src/GEOM_I/GEOM_Gen_i.hh @@ -248,6 +248,8 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi virtual GEOM::GEOM_Object_ptr GetObject(CORBA::Long theStudyID, const char* theEntry); + virtual SALOME::GenericObj_ptr FindObjectByInternalEntry( CORBA::Long theStudyID, const char* theEntry ); + private: GEOM::ListOfGO* RestoreSubShapesOneLevel (SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_ptr theOldSO, -- 2.39.2