Salome HOME
SIMAN removal agr/siman_removal cbr/crowdin_V7_7_BR V7_7_0a1 V7_7_0b1
authorCédric Aguerre <cedric.aguerre@edf.fr>
Tue, 28 Jul 2015 15:15:29 +0000 (17:15 +0200)
committerCédric Aguerre <cedric.aguerre@edf.fr>
Tue, 28 Jul 2015 16:21:20 +0000 (18:21 +0200)
src/PYHELLO/PYHELLO.py

index 7bfac5498fbcc52864092703c0c957895801e76e..2ae59472bc040967d3179635e98d544c87bcc3cc 100644 (file)
@@ -29,7 +29,6 @@ import PYHELLO_ORB__POA
 import SALOME_ComponentPy
 import SALOME_DriverPy
 import SALOMEDS
-from SALOME_DataContainerPy import *
 
 from PYHELLO_utils import *
 
@@ -43,7 +42,7 @@ class PYHELLO(PYHELLO_ORB__POA.PYHELLO_Gen,
     Engines::EngineComponent CORBA interface - SALOME component) and SALOME_DriverPy_i
     (implementation of SALOMEDS::Driver CORBA interface - SALOME module's engine).
     """
-    def __init__ ( self, orb, poa, contID, containerName, instanceName, 
+    def __init__ ( self, orb, poa, contID, containerName, instanceName,
                    interfaceName ):
         SALOME_ComponentPy.SALOME_ComponentPy_i.__init__(self, orb, poa,
                     contID, containerName, instanceName, interfaceName, 0)
@@ -74,12 +73,11 @@ class PYHELLO(PYHELLO_ORB__POA.PYHELLO_Gen,
         import SALOME
         exData = SALOME.ExceptionStruct( SALOME.BAD_PARAM, "Test exception in raiseAnException()",'',0)
         raise SALOME.SALOME_Exception( exData )
-      
+
     """
     Create object.
     """
     def createObject( self, study, name ):
-        self._createdNew = True # used for getModifiedData method
         builder = study.NewBuilder()
         father  = findOrCreateComponent( study )
         object  = builder.NewObject( father )
@@ -119,40 +117,3 @@ class PYHELLO(PYHELLO_ORB__POA.PYHELLO_Gen,
             abuffer      += [ "  pass" ]
         abuffer += [ "\0" ]
         return ("\n".join( abuffer ), 1)
-
-    """
-    Import file to restore module data
-    """
-    def importData(self, studyId, dataContainer, options):
-      # get study by Id
-      obj = self._naming_service.Resolve("myStudyManager")
-      myStudyManager = obj._narrow(SALOMEDS.StudyManager)
-      study = myStudyManager.GetStudyByID(studyId)
-      # create all objects from the imported stream
-      stream = dataContainer.get()
-      for objname in stream.split("\n"):
-        if len(objname) != 0:
-          self.createObject(study, objname)
-      self._createdNew = False # to store the modification of the study information later
-      return ["objects"] # identifier what is in this file
-
-    def getModifiedData(self, studyId):
-      if self._createdNew:
-        # get study by Id
-        obj = self._naming_service.Resolve("myStudyManager")
-        myStudyManager = obj._narrow(SALOMEDS.StudyManager)
-        study = myStudyManager.GetStudyByID(studyId)
-        # iterate all objects to get their names and store this information in stream
-        stream=""
-        father = study.FindComponent( moduleName() )
-        if father:
-            iter = study.NewChildIterator( father )
-            while iter.More():
-                name = iter.Value().GetName()
-                stream += name + "\n"
-                iter.Next()
-        # store stream to the temporary file to send it in DataContainer
-        dataContainer = SALOME_DataContainerPy_i(stream, "", "objects", False, True)
-        aVar = dataContainer._this()
-        return [aVar]
-      return []