Salome HOME
CCAR: add autodocumentation to swig modules (%feature("autodoc","1"))
authorcaremoli <caremoli>
Fri, 26 Sep 2008 14:49:42 +0000 (14:49 +0000)
committercaremoli <caremoli>
Fri, 26 Sep 2008 14:49:42 +0000 (14:49 +0000)
et remove problems with overloaded methods (typecheck typemap with precedence)

src/Batch_SWIG/libBatch_Swig.i
src/Batch_SWIG/libBatch_Swig_typemap.i
src/Communication_SWIG/libSALOME_Comm.i
src/LifeCycleCORBA_SWIG/libSALOME_LifeCycleCORBA.i
src/NOTIFICATION_SWIG/NOTIFICATION.i

index f5b5e791a0a11e417fdf6cfe945ec8dfab6c6744..255d107dcca597d00e2030c5ea2d42fffe852c5f 100644 (file)
@@ -41,6 +41,9 @@
 /* Le nom du module Python tel qu'il est importe */
 %module libBatch_Swig
 
+/* generate docstrings with types */
+%feature("autodoc", "1");
+
 /* Inclusion des conversions de type */
 %include libBatch_Swig_typemap.i
 
index 06bdfce397181e69ab800a7e870fe20c171b2e7e..9fb772feef5b1b57e2161efe0a87c8da0e8b1d02 100644 (file)
   }
 }
 
+%typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) Batch::Parametre
+{
+  $1 = PyDict_Check($input)? 1 : 0;
+}
 
 # // construction d'un dictionnaire Python a partir d'un objet Parametre C++
 %typemap(out) Batch::Parametre
   }
 }
 
+%typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) Batch::Environnement
+{
+  $1 = PyDict_Check($input)? 1 : 0;
+}
 
 # // construction d'un dictionnaire Python a partir d'un objet Environnement C++
 %typemap(out) Batch::Environnement
index f27bc4f3ca586aa8f7ec125d1ca5a53543350a59..ea53d3017667abd7036971130b65a3bb1c27ab3a 100644 (file)
@@ -19,6 +19,8 @@
 //
 %module libSALOME_Comm
 
+%feature("autodoc", "1");
+
 %{
   #include "ReceiverFactory.hxx"
   #include "MatrixClient.hxx"
index feaca2631c0683ebc91242c1bfbb6983ec10af4b..b6b03ca3827003fd4831602c42c14accb51fc6aa 100644 (file)
@@ -23,6 +23,8 @@
 
 %module libSALOME_LifeCycleCORBA
 
+%feature("autodoc", "1");
+
 %include <std_except.i>
 
 
@@ -116,10 +118,13 @@ struct omniORBpyAPI {
   $result = PyString_FromString($1.c_str());
 }
 
-%typemap(typecheck) const Engines::MachineParameters &,
-                    Engines::MachineParameters const &
+%typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) Engines::MachineParameters const &
+{
+  $1 = PyDict_Check($input)? 1 : 0;
+}
+%typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) const Engines::MachineParameters &
 {
-  $1 = PyDict_Check($input);
+  $1 = PyDict_Check($input)? 1 : 0;
 }
 
 %typemap(typecheck) std::string, 
index ccd684c2f6c7a4a46d35b28440338e1850996fc9..01ad8b667fbb48ba7b16f27aa9511d40243dbbd4 100644 (file)
@@ -27,6 +27,7 @@
 
 %module libNOTIFICATION
 
+%feature("autodoc", "1");
 
 %{
 //#define __declspec(a)