Salome HOME
The polyline object has deen moved to new realisation.
[modules/hydro.git] / src / HYDROPy / HYDROData_Object.sip
index 3e201871b886da6ffc9a8da04171697aaee7f6ee..6a9e89b45b74d498404ab83d3f16b40cf4b279af 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-
 %ExportedHeaderCode
 #include <HYDROData_Object.h>
 %End
 
-typedef int ObjectKind;
-
-class HYDROData_Object
+class HYDROData_Object : HYDROData_Entity /Abstract/
 {
 %TypeHeaderCode
 #include <HYDROData_Object.h>
 %End
 
 %ConvertToSubClassCode
-    // HYDROData_Object sub-classes provide a unique kind ID.
-    switch ( sipCpp->GetKind() )
+    if ( !Handle(HYDROData_ArtificialObject)::DownCast( sipCpp ).IsNull() )
+      sipClass = sipClass_HYDROData_ArtificialObject;
+    else if ( !Handle(HYDROData_NaturalObject)::DownCast( sipCpp ).IsNull() )
+      sipClass = sipClass_HYDROData_NaturalObject;
+    else
     {
-      case KIND_IMAGE:
-        sipClass = sipClass_HYDROData_Image;
-        break;
-
-      case KIND_POLYLINE:
-        sipClass = sipClass_HYDROData_Polyline;
-        break;
-
-      case KIND_BATHYMETRY:
-        sipClass = sipClass_HYDROData_Bathymetry;
-        break;
-
-      case KIND_UNKNOWN:
-        sipClass = sipClass_HYDROData_Object;
-        break;
-
-      default:
-        // We don't recognise the type.
-        sipClass = NULL;
+      // HYDROData_Object sub-classes provide a unique kind ID.
+      switch ( sipCpp->GetKind() )
+      {
+        case KIND_UNKNOWN:
+          sipClass = sipClass_HYDROData_Object;
+          break;
+
+        default:
+          // We don't recognise the type.
+          sipClass = NULL;
+      }
     }
 %End
 
 public:
 
-  /**
-   * Returns the kind of this object. Must be redefined in all objects of known type.
-   */
-  const ObjectKind GetKind() const;
-
-  /**
-   * Returns the name of this object.
-   */
-  QString GetName() const;
-
-  /**
-   * Updates the name of this object.
-   */
-  void SetName(const QString& theName);
-
-  /**
-   * Updates object state.
-   */
-  void Update();
-
-  /**
-   * Checks is object exists in the data structure.
-   * \returns true is object is not exists in the data model
-   */
-  bool IsRemoved() const;
-
-  /**
-   * Removes object from the data structure.
-   */
-  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_Object theDestination ) const;
-  */
 
 protected: