Salome HOME
SIP: HYDROData_Digue is included.
[modules/hydro.git] / src / HYDROPy / HYDROData_Image.sip
index f1e7cff982c558d22356b165ef5c3c429f9aeeea..33eceb9cdcc05829c0b6ce85455d30d65262a9b8 100644 (file)
 #include <HYDROData_Image.h>
 %End
 
-class HYDROData_Image : HYDROData_Object
+class HYDROData_Image : HYDROData_Entity
 {
 
 %ConvertToSubClassCode
-    if ( !Handle(HYDROData_Image)::DownCast( sipCpp ).IsNull() )
-      sipClass = sipClass_HYDROData_Image;
-    else
-      sipClass = NULL;
+    switch ( sipCpp->GetKind() )
+    {
+      case KIND_IMAGE:
+        sipClass = sipClass_HYDROData_Image;
+        break;
+
+      default:
+        // We don't recognise the type.
+        sipClass = NULL;
+    }
 %End
 
 %TypeHeaderCode
 #include <HYDROData_Image.h>
 %End
 
-public:
-
-  const ObjectKind           GetKind() const;
-
 public:      
 
   /**
@@ -61,162 +63,6 @@ public:
    */
   QImage                     Image();
 
-  /**
-   * Stores the image transformation
-   * \param theTrsf new transformation
-   */
-  void                       SetTrsf( const QTransform& theTrsf );
-
-  /**
-   * Returns the kept transformation, or "identity" if not yet stored
-   */
-  QTransform                 Trsf();
-
-  /**
-   * Stores the image transformation points (3 input + 3 output)
-   * \param thePointAIn input point A
-   * \param thePointBIn input point B
-   * \param thePointCIn input point C
-   * \param thePointAOut output point A
-   * \param thePointBOut output point B
-   * \param thePointCOut output point C
-   */
-  void                       SetTrsfPoints( const QPoint&  thePointAIn,
-                                            const QPoint&  thePointBIn,
-                                            const QPoint&  thePointCIn,
-                                            const QPointF& thePointAOut,
-                                            const QPointF& thePointBOut,
-                                            const QPointF& thePointCOut );
-
-  /**
-   * Returns the image transformation points (3 input + 3 output)
-   * \param thePointAIn input point A
-   * \param thePointBIn input point B
-   * \param thePointCIn input point C
-   * \param thePointAOut output point A
-   * \param thePointBOut output point B
-   * \param thePointCOut output point C
-   */
-  void                       TrsfPoints( QPoint&  thePointAIn,
-                                         QPoint&  thePointBIn,
-                                         QPoint&  thePointCIn,
-                                         QPointF& thePointAOut,
-                                         QPointF& thePointBOut,
-                                         QPointF& thePointCOut );
-
-  /**
-   * Appends reference to other image.
-   * \param theReferenced the image referenced by this
-   */
-  void AppendReference( HYDROData_Image theReferenced ) [void (Handle_HYDROData_Image)];
-  %MethodCode
-
-    Handle(HYDROData_Image) anImage = 
-      Handle(HYDROData_Image)::DownCast( createHandle( a0 ) );
-    if ( !anImage.IsNull() )
-    {
-      Py_BEGIN_ALLOW_THREADS
-      sipSelfWasArg ? sipCpp->HYDROData_Image::AppendReference( anImage ) : 
-                      sipCpp->AppendReference( anImage );
-      Py_END_ALLOW_THREADS
-    }
-
-  %End
-
-  /**
-   * Returns the number of referenced images
-   * \return zero if there is no references
-   */
-  int                        NbReferences();
-
-  /**
-   * Returns reference by index.
-   * \param theIndex number of reference [0; NbReference)
-   * \returns the referenced image, or Null if index is invalid
-   */
-  HYDROData_Image Reference( const int theIndex ) const [Handle_HYDROData_Image (const int)];
-  %MethodCode
-
-    Handle(HYDROData_Image) anImage;
-    
-    Py_BEGIN_ALLOW_THREADS
-    sipSelfWasArg ? sipCpp->HYDROData_Image::Reference( a0 ) : 
-                    sipCpp->Reference( a0 );
-    Py_END_ALLOW_THREADS
-    
-    sipRes = dynamic_cast<HYDROData_Image*>( createPointer( anImage ) );
-  
-  %End
-
-  /**
-   * Updates reference by index. If index is one-bigger than \a NbReferences, 
-   * this method appends it to the end (NbReferences is incremented).
-   * \param theIndex number of reference [0; NbReference]
-   * \param theReferenced the image referenced by this
-   */
-  void ChangeReference( const int theIndex, HYDROData_Image theReferenced ) [void (const int, Handle_HYDROData_Image)];
-  %MethodCode
-
-    Handle(HYDROData_Image) anImage = 
-      Handle(HYDROData_Image)::DownCast( createHandle( a1 ) );
-    if ( !anImage.IsNull() )
-    {
-      Py_BEGIN_ALLOW_THREADS
-      sipSelfWasArg ? sipCpp->HYDROData_Image::ChangeReference( a0, anImage ) : 
-                      sipCpp->ChangeReference( a0, anImage );
-      Py_END_ALLOW_THREADS
-    }
-  
-  %End
-
-  /**
-   * Removes reference by index
-   * \param theIndex number of reference [0; NbReference)
-   */
-  void                       RemoveReference( const int theIndex );
-
-  /**
-   * Removes all references.
-   */
-  void                       ClearReferences();
-
-  /**
-   * Stores the operator name
-   * \param theOpName name of the operator that must be executed for image update
-   */
-  void                       SetOperatorName( const QString theOpName );
-
-  /**
-   * Returns the operator name
-   * \returns the name of the operator that must be executed for image update
-   */
-  QString                    OperatorName();
-
-  /**
-   * Stores the operator arguments
-   * \param theArgs array that stores the operator arguments, needed for execution
-   */
-  void                       SetArgs( const QByteArray& theArgs );
-
-  /**
-   * Returns the operator arguments
-   * \returns array that stores the operator arguments, needed for execution
-   */
-  QByteArray                 Args();
-  
-  /**
-   * Sets the "MustBeUpdated" flag: if image is depended on updated features.
-   * \param theFlag is true for images that must be updated, false for up-to-date
-   */
-  void                       MustBeUpdated( bool theFlag );
-
-  /**
-   * Returns the "MustBeUpdated" flag: is image must be recomputed or not
-   * \returns false if image is up to date
-   */
-  bool                       MustBeUpdated();
-
-
 protected:
 
   /**