Salome HOME
Drawing of zones in OCC view improved.
[modules/hydro.git] / src / HYDROPy / HYDROData_Object.sip
index 7d63afcfd6f932e8e44aeb3fbac07085f09aaade..852e58f561836ee0594eca019ae1246fd16a7dd1 100644 (file)
 
 typedef int ObjectKind;
 
+const ObjectKind KIND_UNKNOWN;
+const ObjectKind KIND_IMAGE;
+const ObjectKind KIND_POLYLINE;
+const ObjectKind KIND_VISUAL_STATE;
+const ObjectKind KIND_BATHYMETRY;
+
 class HYDROData_Object
 {
 %TypeHeaderCode
@@ -37,6 +43,14 @@ class HYDROData_Object
     // HYDROData_Object sub-classes provide a unique kind ID.
     switch ( sipCpp->GetKind() )
     {
+      case KIND_IMAGE:
+        sipClass = sipClass_HYDROData_Image;
+        break;
+
+      case KIND_POLYLINE:
+        sipClass = sipClass_HYDROData_Polyline;
+        break;
+
       case KIND_BATHYMETRY:
         sipClass = sipClass_HYDROData_Bathymetry;
         break;
@@ -51,28 +65,12 @@ class HYDROData_Object
     }
 %End
 
-public:
-  /**
-   * Visual state data.
-   */
-  struct VisualState
-  {
-    bool Visibility;
-    double Transparency;
-    double ZValue;
-
-    VisualState();
-  };
-  
-  typedef QMap        < int, HYDROData_Object::VisualState > ViewId2VisualStateMap;
-  typedef QMapIterator< int, HYDROData_Object::VisualState > ViewId2VisualStateMapIterator;
-
 public:
 
   /**
    * Returns the kind of this object. Must be redefined in all objects of known type.
    */
-  //virtual const ObjectKind GetKind() const {return KIND_UNKNOWN;}
+  const ObjectKind GetKind() const;
 
   /**
    * Returns the name of this object.
@@ -85,19 +83,10 @@ public:
   void SetName(const QString& theName);
 
   /**
-   * Returns the object visibility state for the view with specified id.
-   * \param theViewId view id
-   * \returns visibility state
+   * Updates object state.
+   * \param theIsForce force reupdating of data object
    */
-  bool IsVisible( const int theViewId ) const;
-
-  /**
-   * Sets the object visibility state for the view with specified id.
-   * \param theViewId view id
-   * \param theVal visibility state
-   */
-  void SetVisible( const int theViewId,
-                   const bool theVal );
+  void Update(const bool theIsForce);
 
   /**
    * Checks is object exists in the data structure.
@@ -126,8 +115,6 @@ public:
 
 protected:
 
-  //friend class HYDROData_Iterator;
-
   /**
    * Creates new object in the internal data structure. Use higher level objects 
    * to create objects with real content.