Ensure BaseHandle class move noexcept (core public-api)
[platform/core/uifw/dali-core.git] / dali / public-api / events / touch-event.h
index 64ae48f..81e73b1 100644 (file)
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/events/device.h>
+#include <dali/public-api/events/mouse-button.h>
 #include <dali/public-api/events/point-state.h>
-#include <dali/public-api/object/base-handle.h>
 #include <dali/public-api/math/degree.h>
-#include <dali/public-api/events/mouse-button.h>
+#include <dali/public-api/object/base-handle.h>
 
 namespace Dali
 {
-
 namespace Internal DALI_INTERNAL
 {
 class TouchEvent;
@@ -62,7 +61,6 @@ struct Vector2;
 class DALI_CORE_API TouchEvent : public BaseHandle
 {
 public:
-
   // Construction & Destruction
 
   /**
@@ -79,7 +77,15 @@ public:
    * @SINCE_1_9.26
    * @param[in] other The TouchEvent to copy from
    */
-  TouchEvent( const TouchEvent& other );
+  TouchEvent(const TouchEvent& other);
+
+  /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.28
+   * @param[in] other The TouchEvent to move
+   */
+  TouchEvent(TouchEvent&& other) noexcept;
 
   /**
    * @brief Destructor.
@@ -97,7 +103,16 @@ public:
    * @param[in] other The TouchEvent to copy from
    * @return A reference to this
    */
-  TouchEvent& operator=( const TouchEvent& other );
+  TouchEvent& operator=(const TouchEvent& other);
+
+  /**
+   * @brief Move assignment Operator.
+   *
+   * @SINCE_1_9.28
+   * @param[in] other The TouchEvent to move
+   * @return A reference to this
+   */
+  TouchEvent& operator=(TouchEvent&& other) noexcept;
 
   // Getters
 
@@ -128,7 +143,7 @@ public:
    * @return The Device ID of this point
    * @note If point is greater than GetPointCount() then this method will return -1.
    */
-  int32_t GetDeviceId( std::size_t point ) const;
+  int32_t GetDeviceId(std::size_t point) const;
 
   /**
    * @brief Retrieves the State of the point specified.
@@ -139,7 +154,7 @@ public:
    * @note If point is greater than GetPointCount() then this method will return PointState::FINISHED.
    * @see State
    */
-  PointState::Type GetState( std::size_t point ) const;
+  PointState::Type GetState(std::size_t point) const;
 
   /**
    * @brief Retrieves the actor that was underneath the point specified.
@@ -149,7 +164,7 @@ public:
    * @return The actor that was underneath the point specified
    * @note If point is greater than GetPointCount() then this method will return an empty handle.
    */
-  Actor GetHitActor( std::size_t point ) const;
+  Actor GetHitActor(std::size_t point) const;
 
   /**
    * @brief Retrieves the co-ordinates relative to the top-left of the hit-actor at the point specified.
@@ -163,7 +178,7 @@ public:
    * then you should use Actor::ScreenToLocal().
    * @note If point is greater than GetPointCount() then this method will return Vector2::ZERO.
    */
-  const Vector2& GetLocalPosition( std::size_t point ) const;
+  const Vector2& GetLocalPosition(std::size_t point) const;
 
   /**
    * @brief Retrieves the co-ordinates relative to the top-left of the screen of the point specified.
@@ -173,7 +188,7 @@ public:
    * @return The co-ordinates relative to the top-left of the screen of the point specified
    * @note If point is greater than GetPointCount() then this method will return Vector2::ZERO.
    */
-  const Vector2& GetScreenPosition( std::size_t point ) const;
+  const Vector2& GetScreenPosition(std::size_t point) const;
 
   /**
    * @brief Retrieves the radius of the press point.
@@ -185,7 +200,7 @@ public:
    * @return The radius of the press point
    * @note If point is greater than GetPointCount() then this method will return 0.0f.
    */
-  float GetRadius( std::size_t point ) const;
+  float GetRadius(std::size_t point) const;
 
   /**
    * @brief Retrieves BOTH the horizontal and the vertical radii of the press point.
@@ -195,7 +210,7 @@ public:
    * @return The horizontal and vertical radii of the press point
    * @note If point is greater than GetPointCount() then this method will return Vector2::ZERO.
    */
-  const Vector2& GetEllipseRadius( std::size_t point ) const;
+  const Vector2& GetEllipseRadius(std::size_t point) const;
 
   /**
    * @brief Retrieves the touch pressure.
@@ -210,7 +225,7 @@ public:
    * @return The touch pressure
    * @note If point is greater than GetPointCount() then this method will return 1.0f.
    */
-  float GetPressure( std::size_t point ) const;
+  float GetPressure(std::size_t point) const;
 
   /**
    * @brief Retrieves the angle of the press point relative to the Y-Axis.
@@ -220,7 +235,7 @@ public:
    * @return The angle of the press point
    * @note If point is greater than GetPointCount() then this method will return Degree().
    */
-  Degree GetAngle( std::size_t point ) const;
+  Degree GetAngle(std::size_t point) const;
 
   /**
    * @brief Gets the device class type from which the mouse/touch event is originated.
@@ -230,7 +245,7 @@ public:
    * @param[in] point The point required
    * @return The type of the device class
    */
-  Device::Class::Type GetDeviceClass( std::size_t point ) const;
+  Device::Class::Type GetDeviceClass(std::size_t point) const;
 
   /**
    * @brief Gets the subclass type of the device from which the mouse/touch event is originated.
@@ -240,8 +255,7 @@ public:
    * @param[in] point The point required
    * @return The type of the device subclass
    */
-  Device::Subclass::Type GetDeviceSubclass( std::size_t point ) const;
-
+  Device::Subclass::Type GetDeviceSubclass(std::size_t point) const;
 
   /**
    * @brief Gets the value, which indicates a mouse button. (ex: right/left button)
@@ -250,11 +264,9 @@ public:
    * @param[in] point The point required
    * @return The mouse button value
    */
-  MouseButton::Type GetMouseButton( std::size_t point ) const;
-
+  MouseButton::Type GetMouseButton(std::size_t point) const;
 
 public: // Not intended for application developers
-
   /// @cond internal
   /**
    * @brief This constructor is used internally to Create an initialized TouchEvent handle.
@@ -262,7 +274,7 @@ public: // Not intended for application developers
    * @SINCE_1_9.26
    * @param[in] internal A pointer to a newly allocated Dali resource
    */
-  explicit DALI_INTERNAL TouchEvent( Internal::TouchEvent* internal );
+  explicit DALI_INTERNAL TouchEvent(Internal::TouchEvent* internal);
   /// @endcond
 };