]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
SIP: NCollection_Sequence mapping is updated.
authorrkv <rkv@opencascade.com>
Tue, 14 Jan 2014 09:04:31 +0000 (09:04 +0000)
committerrkv <rkv@opencascade.com>
Tue, 14 Jan 2014 09:04:31 +0000 (09:04 +0000)
CMake/UsePyQt4EXT.cmake
src/HYDROPy/CAS/NCollection_Sequence.sip
src/HYDROPy/HYDROData_Bathymetry.sip
src/HYDROPy/HYDROData_IPolyline.sip
src/HYDROPy/HYDROData_Profile.sip

index 7472ff58fd2c4160dabae924586426e38704f396..63bb86eb567afaf88c6613149204c1a66993d9b5 100644 (file)
@@ -133,8 +133,8 @@ MACRO(PYQT4_WRAP_SIP_EXT outfiles)
     LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100gp_XYZ.cc)
     SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100gp_XYZ.cc)
     
-    LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100gp_XY.cc)
-    SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100gp_XY.cc)
+#    LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100gp_XY.cc)
+#    SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100gp_XY.cc)
     
     LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPygp_XYZ.cc)
     SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPygp_XYZ.cc)
@@ -150,6 +150,16 @@ MACRO(PYQT4_WRAP_SIP_EXT outfiles)
     
     LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyTCollection_AsciiString.cc)
     SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyTCollection_AsciiString.cc)
+
+    LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100HYDROData_BathymetryAltitudePoint.cc)
+    SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100HYDROData_BathymetryAltitudePoint.cc)
+
+    LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100HYDROData_IPolylinePoint.cc)
+    SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100HYDROData_IPolylinePoint.cc)
+
+    LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100HYDROData_ProfileProfilePoint.cc)
+    SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100HYDROData_ProfileProfilePoint.cc)
+
     
 #    LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100HYDROData_IPolylineSectionType.cc)
 #    SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100HYDROData_IPolylineSectionType.cc)
index ed07ef948ec72689a9bded9aaced05552d2fdcba..8c002cd38d0111b0b8c929aa6e6b0ddd76bae503 100644 (file)
@@ -45,7 +45,7 @@ template<TYPE>
         TYPE *t = new TYPE(sipCpp->Value(i));
         PyObject *tobj;
 
-        if ((tobj = sipConvertFromNewType(t, sipType_TYPE, sipTransferObj)) == NULL)
+        if ((tobj = sipConvertFromNewType(t, sipFindType("TYPE"), sipTransferObj)) == NULL)
         {
             Py_DECREF(l);
             delete t;
@@ -71,7 +71,7 @@ template<TYPE>
         for (SIP_SSIZE_T i = 0; i < len; ++i)
         {
             PyObject *itm = PySequence_ITEM(sipPy, i);
-            bool ok = (itm && sipCanConvertToType(itm, sipType_TYPE, SIP_NOT_NONE));
+            bool ok = (itm && sipCanConvertToType(itm, sipFindType("TYPE"), SIP_NOT_NONE));
 
             Py_XDECREF(itm);
 
@@ -89,13 +89,13 @@ template<TYPE>
     {
         PyObject *itm = PySequence_ITEM(sipPy, i);
         int state;
-        TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(itm, sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+        TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(itm, sipFindType("TYPE"), sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
 
         Py_DECREF(itm);
  
         if (*sipIsErr)
         {
-            sipReleaseType(t, sipType_TYPE, state);
+            sipReleaseType(t, sipFindType("TYPE"), state);
 
             delete aSeq;
             return 0;
@@ -103,7 +103,7 @@ template<TYPE>
 
         aSeq->Append(*t);
 
-        sipReleaseType(t, sipType_TYPE, state);
+        sipReleaseType(t, sipFindType("TYPE"), state);
     }
  
     *sipCppPtr = aSeq;
index 349318a679dc1e316f2b02630aed237344d01356..057b276785186b90a14083a6924a02fd1c626c56 100644 (file)
 
 class HYDROData_Bathymetry : HYDROData_IAltitudeObject
 {
-
-  typedef gp_XYZ                       AltitudePoint;
-  typedef NCollection_Sequence<gp_XYZ> AltitudePoints;
-
 %ConvertToSubClassCode
     switch ( sipCpp->GetKind() )
     {
@@ -43,6 +39,10 @@ class HYDROData_Bathymetry : HYDROData_IAltitudeObject
     }
 %End
 
+  typedef gp_XYZ                       AltitudePoint;
+  typedef NCollection_Sequence<HYDROData_Bathymetry::AltitudePoint> AltitudePoints;
+
+
 %TypeHeaderCode
 #include <HYDROData_Bathymetry.h>
 %End
index ca0a630ca4f992213c2867b0fd31fb761c23b5f6..885a97b9cb25bf834e2bef325a3195cb429e67eb 100644 (file)
 
 class HYDROData_IPolyline : HYDROData_Entity /Abstract/
 {
-
-  typedef gp_XY                       Point;
-  typedef NCollection_Sequence<gp_XY> PointsList;
-
 %TypeHeaderCode
 #include <HYDROData_IPolyline.h>
 %End
 
+  typedef gp_XY                       Point;
+  typedef NCollection_Sequence<HYDROData_IPolyline::Point> PointsList;
+
+
 %ConvertToSubClassCode
     switch ( sipCpp->GetKind() )
     {
index 41ec2f786f4bfaf63a1c8fb66e5646dad204482a..ab34b1bc3e5ac0e8fbe628f231650cabd03624ca 100644 (file)
 
 class HYDROData_Profile : public HYDROData_Object
 {
-public:
-
-  typedef gp_XYZ                       ProfilePoint;
-  typedef NCollection_Sequence<gp_XYZ> ProfilePoints;
-
 %TypeHeaderCode
 #include "HYDROData_Profile.h"
 %End
+public:
+
+  typedef gp_XYZ                       ProfilePoint;
+  typedef NCollection_Sequence<HYDROData_Profile::ProfilePoint> ProfilePoints;
 
 public:
   /**
@@ -143,14 +142,14 @@ public:
    * First and last points will be automatically updated.
    * \param thePoints the list with new profile points
    */
-  void SetProfilePoints( const ProfilePoints thePoints );
+  void SetProfilePoints( const HYDROData_Profile::ProfilePoints thePoints );
 
   /**
    * Returns profile points.
    * Empty sequence is returned if first or last point was not set.
    * \return profile points list
    */
-  ProfilePoints GetProfilePoints() const;
+  HYDROData_Profile::ProfilePoints GetProfilePoints() const;
 
 
 public: