Salome HOME
0021196: [CEA 456] Integration and merge modification for debian packages
[modules/kernel.git] / src / Communication_SWIG / libSALOME_Comm.i
index 7fce88a2193c110d32f09e18d131f3f6ab45c434..6c2547d069df2b7e42b640fa124ae1eb97932560 100644 (file)
@@ -1,30 +1,32 @@
-// Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-// 
-// 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.
-// 
-// This library is distributed in the hope that it will be useful 
-// but WITHOUT ANY WARRANTY; without even the implied warranty of 
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-// Lesser General Public License for more details.
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-// You should have received a copy of the GNU Lesser General Public  
-// License along with this library; if not, write to the Free Software 
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-// See http://www.salome-platform.org/
+//  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.
 //
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
 %module libSALOME_Comm
 
+%feature("autodoc", "1");
+
 %{
   #include "ReceiverFactory.hxx"
   #include "MatrixClient.hxx"
-  #undef SEEK_SET
-  #undef SEEK_CUR
-  #undef SEEK_END
   #include "SALOME_Comm_i.hxx"
   #include "SALOMEMultiComm.hxx"
   #include "SenderFactory.hxx"
@@ -43,7 +45,7 @@
 
   // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
 
-  PyObject* iorSupport = PyObject_CallMethod(orb, "object_to_string", "O", $input);
+  PyObject* iorSupport = PyObject_CallMethod(orb, (char*)"object_to_string", (char*)"O", $input);
  
   if (iorSupport == Py_None)
     return NULL;
@@ -52,7 +54,7 @@
   // Ask omniORB to convert IOR string to SALOME::SenderDouble_ptr
 
   int argc = 0;
-  char *xargv = "";
+  char *xargv = (char*)"";
   char **argv = &xargv;
   CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
   CORBA::Object_var O =  ORB->string_to_object(s);
@@ -73,7 +75,7 @@
 
   // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
 
-  PyObject* iorSupport = PyObject_CallMethod(orb, "object_to_string", "O", $input);
+  PyObject* iorSupport = PyObject_CallMethod(orb, (char*)"object_to_string", (char*)"O", $input);
  
   if (iorSupport == Py_None)
     return NULL;
@@ -82,7 +84,7 @@
   // Ask omniORB to convert IOR string to SALOME::SenderInt_ptr
 
   int argc = 0;
-  char *xargv = "";
+  char *xargv = (char*)"";
   char **argv = &xargv;
   CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
   CORBA::Object_var O =  ORB->string_to_object(s);
    PyObject* orb = PyDict_GetItemString(pdict, "o");
    // Get the orb Corba C++
    int argc = 0;
-   char *xargv = "";
+   char *xargv = (char*)"";
    char **argv = &xargv;
    CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
    std::string s =  ORB->object_to_string($1);
    PyObject * tmp = PyString_FromString(s.c_str());
-   $result = PyObject_CallMethod(orb, "string_to_object", "O", tmp);
+   $result = PyObject_CallMethod(orb, (char*)"string_to_object", (char*)"O", tmp);
 }
 
 %typemap(python,out) SALOME::SenderInt_ptr
    PyObject* orb = PyDict_GetItemString(pdict, "o");
    // Get the orb Corba C++
    int argc = 0;
-   char *xargv = "";
+   char *xargv = (char*)"";
    char **argv = &xargv;
    CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
    std::string s =  ORB->object_to_string($1);
    PyObject * tmp = PyString_FromString(s.c_str());
-   $result = PyObject_CallMethod(orb, "string_to_object", "O", tmp);
+   $result = PyObject_CallMethod(orb, (char*)"string_to_object", (char*)"O", tmp);
 }
 
 PyObject * getValueForSenderDouble(SALOME::SenderDouble_ptr senderDouble);
@@ -140,7 +142,7 @@ PyObject * getValueForSenderDouble(SALOME::SenderDouble_ptr senderDouble)
             int err = PyList_SetItem(py_list, i, Py_BuildValue("d", (double) ret[i]));
             if(err)
               {
-                char * message = "Error in SUPPORT::getTypes";
+                const char * message = "Error in SUPPORT::getTypes";
                 PyErr_SetString(PyExc_RuntimeError, message);
                 return NULL;
               }
@@ -167,7 +169,7 @@ PyObject * getValueForSenderInt(SALOME::SenderInt_ptr senderInt)
             int err = PyList_SetItem(py_list, i, Py_BuildValue("i", (int) ret[i]));
             if(err)
               {
-                char * message = "Error in SUPPORT::getTypes";
+                const char * message = "Error in SUPPORT::getTypes";
                 PyErr_SetString(PyExc_RuntimeError, message);
                 return NULL;
               }
@@ -195,7 +197,7 @@ PyObject * getValueForMatrix(SALOME::Matrix_ptr matrix)
            int err = PyList_SetItem(tmpRow, j, Py_BuildValue("d", (double) ret[i*column+j]));
             if(err)
               {
-                char * message = "PyList_SetItem matrix sent may be invalid";
+                const char * message = "PyList_SetItem matrix sent may be invalid";
                 PyErr_SetString(PyExc_RuntimeError, message);
                 return NULL;
               }