]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Checkpoint 0 - OK now time to study management
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 13 Jan 2021 08:53:06 +0000 (09:53 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 13 Jan 2021 08:53:06 +0000 (09:53 +0100)
src/SMESH_SWIG/SMeshHelper.cxx
src/SMESH_SWIG/smeshBuilder.py

index 9ed1d558c59eeb1f84ce36ee26533788252eb95a..06ab867eca57dfc94d2558813ab5721544f69bcf 100644 (file)
@@ -32,22 +32,18 @@ std::string BuildSMESHInstance()
     CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
     PortableServer::POA_var poa = PortableServer::POA::_narrow(obj);
     PortableServer::POAManager_var pman = poa->the_POAManager();
-    CORBA::PolicyList policies;
-    policies.length(0);
-    PortableServer::POA_var poa2 = poa->create_POA("POA2",pman,policies);
-    PortableServer::ObjectId_var conId;
     //
     {
         char *argv[4] = {"Container","FactoryServer","toto",nullptr};
-        Engines_Container_i *cont = new Engines_Container_i(orb,poa2,"FactoryServer",2,argv,false,false);
-        conId = poa2->activate_object(cont);
+        Engines_Container_i *cont = new Engines_Container_i(orb,poa,"FactoryServer",2,argv,false,false);
+        conId = poa->activate_object(cont);
     }
     //
     pman->activate();
     //
-    SMESH_Gen_i *servant = new SMESH_Gen_i(orb,poa2,const_cast<PortableServer::ObjectId*>(&conId.in()),"SMESH_inst_2","SMESH");
+    SMESH_Gen_i *servant = new SMESH_Gen_i(orb,poa,const_cast<PortableServer::ObjectId*>(&conId.in()),"SMESH_inst_2","SMESH");
     PortableServer::ObjectId *zeId = servant->getId();
-    CORBA::Object_var zeRef = poa2->id_to_reference(*zeId);
+    CORBA::Object_var zeRef = poa->id_to_reference(*zeId);
     CORBA::String_var ior = orb->object_to_string(zeRef);
     return std::string(ior.in());
 }
index a87ba0cd7c54e4a7166ac40ec09780714ccd6ac7..045a4612008e6fbb6e68737a5b645776212e7e33 100644 (file)
@@ -361,9 +361,11 @@ class smeshBuilder( SMESH._objref_SMESH_Gen, object ):
     Hex_5Tet, Hex_6Tet, Hex_24Tet, Hex_2Prisms, Hex_4Prisms = 1, 2, 3, 1, 2
 
     def __new__(cls, *args):
+        #import pdb
         global engine
         global smeshInst
         global doLcc
+        #pdb.set_trace()
         #print("==== __new__", engine, smeshInst, doLcc)
 
         if smeshInst is None:
@@ -380,7 +382,7 @@ class smeshBuilder( SMESH._objref_SMESH_Gen, object ):
                     # 1. CORBA resolution of server
                     # 2. the __new__ method is called again
                     #print("==== smeshInst = lcc.FindOrLoadComponent ", engine, smeshInst, doLcc)
-                    #smeshInst = salome.lcc.FindOrLoadComponent( "FactoryServer", "SMESH" )
+                    #salome.lcc.FindOrLoadComponent( "FactoryServer", "SMESH" )
                     import SMeshHelper
                     smesh_ior = SMeshHelper.BuildSMESHInstance()
                     import SMESH