Salome HOME
0023366: [CEA 1972] Porting Salome to GCC 6
[modules/kernel.git] / src / Container / SALOME_ComponentPy.py
index 66c9de6344fd56018de913aa2d6a98a960c3099f..a9ce718b870a11f2d5f3b6814189089cbd1ba2e1 100755 (executable)
@@ -1,6 +1,6 @@
 #! /usr/bin/env python
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2016  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
@@ -8,7 +8,7 @@
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -54,17 +54,17 @@ _Sleeping = 0
 
 ## define an implementation of the component interface Engines::Component
 #
-#  
+#
 class SALOME_ComponentPy_i (Engines__POA.EngineComponent):
     _orb = None
     _poa = None
     _fieldsDict = []
     _studyId = -1
-    
+
     #-------------------------------------------------------------------------
 
     def __init__ (self, orb, poa, contID, containerName,
-                  instanceName, interfaceName, notif=0):
+                  instanceName, interfaceName, notif=False):
         # Notif for notification services
         # NOT YET IMPLEMENTED
         MESSAGE(  "SALOME_ComponentPy_i::__init__" + " " + str (containerName) + " " + str(instanceName) + " " + str(interfaceName) )
@@ -126,7 +126,7 @@ class SALOME_ComponentPy_i (Engines__POA.EngineComponent):
     def _get_instanceName(self):
         MESSAGE(  "SALOME_ComponentPy_i::_get_instanceName" )
         return self._instanceName
-    
+
     #-------------------------------------------------------------------------
 
     def _get_interfaceName(self):
@@ -137,12 +137,12 @@ class SALOME_ComponentPy_i (Engines__POA.EngineComponent):
 
     def ping(self):
         MESSAGE(  "SALOME_ComponentPy_i::ping() pid " + str(os.getpid()) )
-        
+
     #-------------------------------------------------------------------------
 
     def setProperties(self, dico):
         self._fieldsDict = dico
-    
+
     #-------------------------------------------------------------------------
 
     def getProperties(self):
@@ -155,13 +155,13 @@ class SALOME_ComponentPy_i (Engines__POA.EngineComponent):
         id = self._poa.servant_to_id(self)
         self._poa.deactivate_object(id)
         return
-        
+
     #-------------------------------------------------------------------------
 
     def GetContainerRef(self):
         MESSAGE(  "SALOME_ComponentPy_i::GetContainerRef" )
         return self._contId._narrow(Engines.Container)
-                
+
     #-------------------------------------------------------------------------
 
     def beginService(self , serviceName ):
@@ -180,7 +180,7 @@ class SALOME_ComponentPy_i (Engines__POA.EngineComponent):
           value=any.from_any(e.value)
           if isinstance(value,str):
             os.environ[key]=value
-        
+
 
     #-------------------------------------------------------------------------
 
@@ -201,7 +201,7 @@ class SALOME_ComponentPy_i (Engines__POA.EngineComponent):
         MESSAGE(  "SALOME_ComponentPy_i::Names" + str(GraphName) + str(NodeName) )
         self._graphName = GraphName
         self._nodeName = NodeName
-        
+
     #-------------------------------------------------------------------------
 
     def graphName(self):
@@ -226,8 +226,8 @@ class SALOME_ComponentPy_i (Engines__POA.EngineComponent):
                 #   return 0
                 #else:
                 #   MESSAGE()
-        return 1                 
-    
+        return 1
+
     #-------------------------------------------------------------------------
 
     def Kill_impl(self):
@@ -292,31 +292,33 @@ class SALOME_ComponentPy_i (Engines__POA.EngineComponent):
         return 0
 
     #-------------------------------------------------------------------------
-   
+
     def DumpPython(self, theStudy, isPublished, isMultiFile):
         aBuffer = "\0"
         if isMultiFile :
             aBuffer = "def RebuildData(theStudy): pass\n\0"
         return (aBuffer, 1)
 
-    #-------------------------------------------------------------------------    
+    #-------------------------------------------------------------------------
 
     def getStudyId(self):
         return self._studyId
 
-    #-------------------------------------------------------------------------    
+    #-------------------------------------------------------------------------
 
     def hasObjectInfo(self):
         return 0
 
-    #-------------------------------------------------------------------------    
+    #-------------------------------------------------------------------------
 
     def getObjectInfo(self, studyId, entry):
         return ""
 
-    #-------------------------------------------------------------------------    
+    #-------------------------------------------------------------------------
 
     def getVersion(self):
         return "" # empty string means "unknown" version
 
+    #-------------------------------------------------------------------------
+
     pass # end of SALOME_ComponentPy_i