Salome HOME
SIP: HYDROData_AltitudeObject is included.
[modules/hydro.git] / src / HYDROPy / HYDROData_Entity.sip
index 20ab25cbe19efdff4dff711db6001e8d42669fad..c94c694769cfb11dedb99cc9aa2097c1522c5bb8 100644 (file)
@@ -20,7 +20,6 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-
 %ExportedHeaderCode
 #include <HYDROData_Entity.h>
 %End
@@ -31,7 +30,17 @@ const ObjectKind KIND_UNKNOWN;
 const ObjectKind KIND_IMAGE;
 const ObjectKind KIND_POLYLINE;
 const ObjectKind KIND_BATHYMETRY;
+const ObjectKind KIND_ALTITUDE;
 const ObjectKind KIND_IMMERSIBLE_ZONE;
+const ObjectKind KIND_RIVER;
+const ObjectKind KIND_STREAM;
+const ObjectKind KIND_CONFLUENCE;
+const ObjectKind KIND_CHANNEL;
+const ObjectKind KIND_OBSTACLE;
+const ObjectKind KIND_DIGUE;
+const ObjectKind KIND_PROFILE;
+const ObjectKind KIND_PROFILEUZ;
+const ObjectKind KIND_POLYLINEXY;
 const ObjectKind KIND_CALCULATION;
 const ObjectKind KIND_ZONE;
 const ObjectKind KIND_REGION;
@@ -46,34 +55,74 @@ class HYDROData_Entity
     // HYDROData_Entity sub-classes provide a unique kind ID.
     switch ( sipCpp->GetKind() )
     {
+      case KIND_ALTITUDE:
+        sipClass = sipClass_HYDROData_AltitudeObject;
+        break;
+      
       case KIND_IMAGE:
         sipClass = sipClass_HYDROData_Image;
         break;
 
-      case KIND_POLYLINE:
-        sipClass = sipClass_HYDROData_Polyline;
+      case KIND_POLYLINEXY:
+        sipClass = sipClass_HYDROData_PolylineXY;
+        break;
+
+      case KIND_PROFILEUZ:
+        sipClass = sipClass_HYDROData_ProfileUZ;
         break;
 
       case KIND_BATHYMETRY:
         sipClass = sipClass_HYDROData_Bathymetry;
         break;
 
+      case KIND_OBSTACLE_ALTITUDE:
+        sipClass = sipClass_HYDROData_ObstacleAltitude;
+        break;
+
       case KIND_IMMERSIBLE_ZONE:
         sipClass = sipClass_HYDROData_ImmersibleZone;
         break;
         
+      case KIND_DIGUE:
+        sipClass = sipClass_HYDROData_Digue;
+        break;
+
+      case KIND_CHANNEL:
+        sipClass = sipClass_HYDROData_Channel;
+        break;
+      
       case KIND_CALCULATION:
-        sipClass = sipClass_HYDROData_Calculation;
+        sipClass = sipClass_HYDROData_CalculationCase;
+        break;
+
+      case KIND_OBSTACLE:
+        sipClass = sipClass_HYDROData_Obstacle;
+        break;
+
+      case KIND_POLYLINE:
+        sipClass = sipClass_HYDROData_Polyline3D;
+        break;
+
+      case KIND_PROFILE:
+        sipClass = sipClass_HYDROData_Profile;
         break;
 
       case KIND_REGION:
         sipClass = sipClass_HYDROData_Region;
         break;
 
+      case KIND_STREAM:
+        sipClass = sipClass_HYDROData_Stream;
+        break;
+
       case KIND_ZONE:
         sipClass = sipClass_HYDROData_Zone;
         break;
 
+      case KIND_SHAPES_GROUP:
+        sipClass = sipClass_HYDROData_ShapesGroup;
+        break;
+
       case KIND_UNKNOWN:
         sipClass = sipClass_HYDROData_Entity;
         break;
@@ -89,24 +138,48 @@ public:
   /**
    * Returns the kind of this object. Must be redefined in all objects of known type.
    */
-  const ObjectKind GetKind() const;
+  virtual const ObjectKind GetKind() const;
 
   /**
    * Returns the name of this object.
    */
-  QString GetName() const;
+  virtual QString GetName() const;
 
   /**
    * Updates the name of this object.
    */
-  void SetName(const QString& theName);
+  virtual void SetName(const QString& theName);
 
   /**
    * Updates object state.
-   * \param theIsForce force reupdating of data object
    */
-  void Update(const bool theIsForce);
+  virtual void Update();
 
+  /**
+   * Returns data of object wrapped to QVariant.
+   * Base implementation returns null value.
+   */
+  virtual QVariant GetDataVariant();
+
+
+  /**
+   * Sets the "MustBeUpdated" flag: if object is depended on updated features.
+   * \param theFlag is true for objects that must be updated, false for up-to-date
+   */
+  virtual void SetToUpdate( bool theFlag );
+
+  /**
+   * Returns the "MustBeUpdated" flag: is object data must be updated or not
+   * \returns false if object is up to date
+   */
+  virtual bool IsMustBeUpdated() const;
+
+  /**
+   * Returns flag indicating that object is updateble or not.
+   */
+  virtual bool CanBeUpdated() const;
+
+  
   /**
    * Checks is object exists in the data structure.
    * \returns true is object is not exists in the data model
@@ -116,21 +189,47 @@ public:
   /**
    * Removes object from the data structure.
    */
-  void Remove();
+  virtual void Remove();
 
-  /**
-   * Returns unique integer identifier of the object (may be used for ordering of objects)
-   */
-  int ID() const;
 
   /**
    * Copies all properties of this to the destinated object.
    * Objects must be the same type.
    * \param theDestination initialized object (from any document) - target of copying
    */
-  /*
-  void CopyTo( HYDROData_Entity theDestination ) const;
-  */
+  void CopyTo( HYDROData_Entity theDestination ) const [void ( const Handle_HYDROData_Entity& )];
+  %MethodCode
+    Handle(HYDROData_Entity) aCopyTo = createHandle( a0 );
+    if ( !aCopyTo.IsNull() )
+    {
+      Py_BEGIN_ALLOW_THREADS
+      sipSelfWasArg ? sipCpp->HYDROData_Entity::CopyTo( aCopyTo ):
+                      sipCpp->CopyTo( aCopyTo );
+      Py_END_ALLOW_THREADS
+    }
+  %End
+
+  /**
+   * Returns father object. For object created under root document label
+   * this method always return NULL object.
+   */
+  HYDROData_Entity GetFatherObject() const [Handle_HYDROData_Entity ()];
+  %MethodCode
+    Handle(HYDROData_Entity) aFather;
+    
+    Py_BEGIN_ALLOW_THREADS
+    aFather = sipSelfWasArg ? sipCpp->HYDROData_Entity::GetFatherObject() : 
+                              sipCpp->GetFatherObject();
+    Py_END_ALLOW_THREADS
+    
+    sipRes = createPointer( aFather );
+  %End
+
+  /**
+   * Returns the list of all reference objects of this object.
+   * Base implementation always return empty list.
+   */
+  virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
 
 protected: