Ensure BaseHandle class move noexcept (adaptor public-api) 63/289563/6
authorEunki Hong <eunkiki.hong@samsung.com>
Thu, 9 Mar 2023 17:49:23 +0000 (02:49 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Tue, 14 Mar 2023 03:48:47 +0000 (12:48 +0900)
Change-Id: I673bde85d960d81a03c2b54646c6a6ece3c63945
Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
18 files changed:
dali/internal/adaptor/tizen-wayland/tizen-wearable/watch-application.cpp
dali/public-api/adaptor-framework/application.cpp
dali/public-api/adaptor-framework/application.h
dali/public-api/adaptor-framework/encoded-image-buffer.cpp
dali/public-api/adaptor-framework/encoded-image-buffer.h
dali/public-api/adaptor-framework/timer.cpp
dali/public-api/adaptor-framework/timer.h
dali/public-api/adaptor-framework/tts-player.cpp
dali/public-api/adaptor-framework/tts-player.h
dali/public-api/adaptor-framework/widget-application.cpp
dali/public-api/adaptor-framework/widget-application.h
dali/public-api/adaptor-framework/widget.cpp
dali/public-api/adaptor-framework/widget.h
dali/public-api/adaptor-framework/window.cpp
dali/public-api/adaptor-framework/window.h
dali/public-api/capture/capture.cpp
dali/public-api/capture/capture.h
dali/public-api/watch/watch-application.h

index 89b93f1..9827e37 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -55,9 +55,9 @@ WatchApplication::WatchApplication(const WatchApplication& copy) = default;
 
 WatchApplication& WatchApplication::operator=(const WatchApplication& rhs) = default;
 
-WatchApplication::WatchApplication(WatchApplication&& rhs) = default;
+WatchApplication::WatchApplication(WatchApplication&& rhs) noexcept = default;
 
-WatchApplication& WatchApplication::operator=(WatchApplication&& rhs) = default;
+WatchApplication& WatchApplication::operator=(WatchApplication&& rhs) noexcept = default;
 
 WatchApplication::WatchTimeSignal& WatchApplication::TimeTickSignal()
 {
index d484028..8ed1f90 100644 (file)
@@ -135,9 +135,9 @@ Application::Application(const Application& copy) = default;
 
 Application& Application::operator=(const Application& rhs) = default;
 
-Application::Application(Application&& rhs) = default;
+Application::Application(Application&& rhs) noexcept = default;
 
-Application& Application::operator=(Application&& rhs) = default;
+Application& Application::operator=(Application&& rhs) noexcept = default;
 
 void Application::MainLoop()
 {
index 25ce168..1971c4d 100644 (file)
@@ -250,7 +250,7 @@ public:
    * @SINCE_1_9.24
    * @param[in] rhs A reference to the moved handle
    */
-  Application(Application&& rhs);
+  Application(Application&& rhs) noexcept;
 
   /**
    * @brief Move assignment operator.
@@ -259,7 +259,7 @@ public:
    * @param[in] rhs A reference to the moved handle
    * @return A reference to this handle
    */
-  Application& operator=(Application&& rhs);
+  Application& operator=(Application&& rhs) noexcept;
 
   /**
    * @brief Destructor.
index 17b70b3..713f4c9 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 // CLASS HEADER
-#include "encoded-image-buffer.h"
+#include <dali/public-api/adaptor-framework/encoded-image-buffer.h>
 
 // INTERNAL INCLUDES
 #include <dali/internal/imaging/common/encoded-image-buffer-impl.h>
@@ -40,9 +40,9 @@ EncodedImageBuffer::EncodedImageBuffer(const EncodedImageBuffer& handle) = defau
 
 EncodedImageBuffer& EncodedImageBuffer::operator=(const EncodedImageBuffer& handle) = default;
 
-EncodedImageBuffer::EncodedImageBuffer(EncodedImageBuffer&& handle) = default;
+EncodedImageBuffer::EncodedImageBuffer(EncodedImageBuffer&& handle) noexcept = default;
 
-EncodedImageBuffer& EncodedImageBuffer::operator=(EncodedImageBuffer&& handle) = default;
+EncodedImageBuffer& EncodedImageBuffer::operator=(EncodedImageBuffer&& handle) noexcept = default;
 
 const EncodedImageBuffer::RawBufferType& EncodedImageBuffer::GetRawBuffer() const
 {
index 4e45adf..71e5c8b 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_ENCODED_IMAGE_BUFFER_H
 #define DALI_ENCODED_IMAGE_BUFFER_H
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -34,6 +34,7 @@ class EncodedImageBuffer;
 /**
  * @brief EncodedImageBuffer contains the large encoded raw buffer informations.
  *
+ * @SINCE_2_0.34
  * @note Object will copy raw buffer data.
  */
 class DALI_ADAPTOR_API EncodedImageBuffer : public BaseHandle
@@ -45,6 +46,7 @@ public:
   /**
    * @brief Create a new EncodedImageBuffer.
    *
+   * @SINCE_2_0.34
    * @param [in] buffer The encoded raw buffer
    * @return A handle to a new EncodedImageBuffer.
    */
@@ -53,18 +55,23 @@ public:
   /**
    * @brief Create an empty handle.
    *
+   * @SINCE_2_0.34
    * Calling member functions of an empty handle is not allowed.
    */
   EncodedImageBuffer();
 
   /**
    * @brief Destructor.
+   *
+   * This is non-virtual since derived Handle types must not contain data or virtual methods.
+   * @SINCE_2_0.34
    */
   ~EncodedImageBuffer();
 
   /**
    * @brief This copy constructor is required for (smart) pointer semantics.
    *
+   * @SINCE_2_0.34
    * @param [in] handle A reference to the copied handle
    */
   EncodedImageBuffer(const EncodedImageBuffer& handle);
@@ -72,6 +79,7 @@ public:
   /**
    * @brief This assignment operator is required for (smart) pointer semantics.
    *
+   * @SINCE_2_0.34
    * @param [in] handle  A reference to the copied handle
    * @return A reference to this
    */
@@ -80,20 +88,24 @@ public:
   /**
    * @brief This move constructor is required for (smart) pointer semantics.
    *
+   * @SINCE_2_0.34
    * @param [in] handle A reference to the moved handle
    */
-  EncodedImageBuffer(EncodedImageBuffer&& handle);
+  EncodedImageBuffer(EncodedImageBuffer&& handle) noexcept;
 
   /**
    * @brief This move assignment operator is required for (smart) pointer semantics.
    *
+   * @SINCE_2_0.34
    * @param [in] handle  A reference to the moved handle
    * @return A reference to this
    */
-  EncodedImageBuffer& operator=(EncodedImageBuffer&& handle);
+  EncodedImageBuffer& operator=(EncodedImageBuffer&& handle) noexcept;
 
   /**
    * @brief Get raw buffer data
+   *
+   * @SINCE_2_0.34
    * @note this method return const value. Mean, you cannot change raw buffer
    * @return A RawBufferType this buffer have
    */
@@ -102,6 +114,7 @@ public:
   /**
    * @brief Get the hash value of raw buffer
    *
+   * @SINCE_2_1.20
    * @return A hash value of raw buffer.
    */
   const std::size_t GetHash() const;
index 785b6f2..ef779f8 100644 (file)
@@ -38,9 +38,9 @@ Timer::Timer(const Timer& copy) = default;
 
 Timer& Timer::operator=(const Timer& rhs) = default;
 
-Timer::Timer(Timer&& rhs) = default;
+Timer::Timer(Timer&& rhs) noexcept = default;
 
-Timer& Timer::operator=(Timer&& rhs) = default;
+Timer& Timer::operator=(Timer&& rhs) noexcept = default;
 
 Timer::~Timer()
 {
index 9e29f03..2b1df7f 100644 (file)
@@ -101,7 +101,7 @@ public: // API
    * @SINCE_1_9.24
    * @param[in] rhs A reference to the moved handle
    */
-  Timer(Timer&& rhs);
+  Timer(Timer&& rhs) noexcept;
 
   /**
    * @brief Move assignment operator.
@@ -110,7 +110,7 @@ public: // API
    * @param[in] rhs A reference to the moved handle
    * @return A reference to this handle
    */
-  Timer& operator=(Timer&& rhs);
+  Timer& operator=(Timer&& rhs) noexcept;
 
   /**
    * @brief Destructor.
index 699e09d..48ee359 100644 (file)
@@ -48,9 +48,9 @@ TtsPlayer::TtsPlayer(const TtsPlayer& copy) = default;
 
 TtsPlayer& TtsPlayer::operator=(const TtsPlayer& rhs) = default;
 
-TtsPlayer::TtsPlayer(TtsPlayer&& rhs) = default;
+TtsPlayer::TtsPlayer(TtsPlayer&& rhs) noexcept = default;
 
-TtsPlayer& TtsPlayer::operator=(TtsPlayer&& rhs) = default;
+TtsPlayer& TtsPlayer::operator=(TtsPlayer&& rhs) noexcept = default;
 
 void TtsPlayer::Play(const std::string& text)
 {
index d4f4137..deb362f 100644 (file)
@@ -127,7 +127,7 @@ public: // API
    * @SINCE_1_9.24
    * @param[in] rhs A reference to the moved handle
    */
-  TtsPlayer(TtsPlayer&& rhs);
+  TtsPlayer(TtsPlayer&& rhs) noexcept;
 
   /**
    * @brief Move assignment operator.
@@ -136,7 +136,7 @@ public: // API
    * @param[in] rhs A reference to the moved handle
    * @return A reference to this handle
    */
-  TtsPlayer& operator=(TtsPlayer&& rhs);
+  TtsPlayer& operator=(TtsPlayer&& rhs) noexcept;
 
   /**
    * @brief Starts playing the audio data synthesized from the specified text.
index d7bc085..b1f1854 100644 (file)
@@ -48,9 +48,9 @@ WidgetApplication::WidgetApplication(const WidgetApplication& copy) = default;
 
 WidgetApplication& WidgetApplication::operator=(const WidgetApplication& rhs) = default;
 
-WidgetApplication::WidgetApplication(WidgetApplication&& rhs) = default;
+WidgetApplication::WidgetApplication(WidgetApplication&& rhs) noexcept = default;
 
-WidgetApplication& WidgetApplication::operator=(WidgetApplication&& rhs) = default;
+WidgetApplication& WidgetApplication::operator=(WidgetApplication&& rhs) noexcept = default;
 
 void WidgetApplication::RegisterWidgetCreatingFunction(const std::string& widgetName, CreateWidgetFunction createFunction)
 {
index 8a09973..38ca977 100644 (file)
@@ -150,7 +150,7 @@ public:
    * @SINCE_1_9.24
    * @param[in] rhs A reference to the moved handle
    */
-  WidgetApplication(WidgetApplication&& rhs);
+  WidgetApplication(WidgetApplication&& rhs) noexcept;
 
   /**
    * @brief Move assignment operator.
@@ -159,7 +159,7 @@ public:
    * @param[in] rhs A reference to the moved handle
    * @return A reference to this handle
    */
-  WidgetApplication& operator=(WidgetApplication&& rhs);
+  WidgetApplication& operator=(WidgetApplication&& rhs) noexcept;
 
   /**
    * @brief Destructor
index 590c524..40a6988 100644 (file)
@@ -41,9 +41,9 @@ Widget::Widget(const Widget& copy) = default;
 
 Widget& Widget::operator=(const Widget& rhs) = default;
 
-Widget::Widget(Widget&& rhs) = default;
+Widget::Widget(Widget&& rhs) noexcept = default;
 
-Widget& Widget::operator=(Widget&& rhs) = default;
+Widget& Widget::operator=(Widget&& rhs) noexcept = default;
 
 Widget::Widget(Internal::Adaptor::Widget* widget)
 : BaseHandle(widget)
index 0201651..336c0d9 100644 (file)
@@ -95,7 +95,7 @@ public:
    * @SINCE_1_9.24
    * @param[in] rhs A reference to the moved handle
    */
-  Widget(Widget&& rhs);
+  Widget(Widget&& rhs) noexcept;
 
   /**
    * @brief Move assignment operator.
@@ -104,7 +104,7 @@ public:
    * @param[in] rhs A reference to the moved handle
    * @return A reference to this handle
    */
-  Widget& operator=(Widget&& rhs);
+  Widget& operator=(Widget&& rhs) noexcept;
 
   /**
    * @brief Destructor
index cbeddac..ae9192d 100644 (file)
@@ -79,9 +79,9 @@ Window::Window(const Window& copy) = default;
 
 Window& Window::operator=(const Window& rhs) = default;
 
-Window::Window(Window&& rhs) = default;
+Window::Window(Window&& rhs) noexcept = default;
 
-Window& Window::operator=(Window&& rhs) = default;
+Window& Window::operator=(Window&& rhs) noexcept = default;
 
 Window Window::DownCast(BaseHandle handle)
 {
index e432d6f..fc12a6e 100644 (file)
@@ -145,7 +145,7 @@ public:
    * @SINCE_1_9.24
    * @param[in] rhs A reference to the moved handle
    */
-  Window(Window&& rhs);
+  Window(Window&& rhs) noexcept;
 
   /**
    * @brief Move assignment operator.
@@ -154,7 +154,7 @@ public:
    * @param[in] rhs A reference to the moved handle
    * @return A reference to this handle
    */
-  Window& operator=(Window&& rhs);
+  Window& operator=(Window&& rhs) noexcept;
 
   /**
    * @brief Downcast sceneHolder to window
index d8cb4f7..faa5c1e 100644 (file)
@@ -54,9 +54,9 @@ Capture::Capture(const Capture& copy) = default;
 
 Capture& Capture::operator=(const Capture& rhs) = default;
 
-Capture::Capture(Capture&& rhs) = default;
+Capture::Capture(Capture&& rhs)noexcept = default;
 
-Capture& Capture::operator=(Capture&& rhs) = default;
+Capture& Capture::operator=(Capture&& rhs)noexcept = default;
 
 void Capture::Start(Actor source, const Vector2& position, const Vector2& size, const std::string& path, const Vector4& clearColor)
 {
index 3a96515..3dd9275 100644 (file)
@@ -171,7 +171,7 @@ public:
    * @SINCE_1_9.24
    * @param[in] rhs A reference to the moved handle
    */
-  Capture(Capture&& rhs);
+  Capture(Capture&& rhs) noexcept;
 
   /**
    * @brief Move assignment operator.
@@ -180,7 +180,7 @@ public:
    * @param[in] rhs A reference to the moved handle
    * @return A reference to this handle
    */
-  Capture& operator=(Capture&& rhs);
+  Capture& operator=(Capture&& rhs) noexcept;
 
   /**
    * @brief Start capture and save the image as a file.
index d47e854..a8079f3 100644 (file)
@@ -156,7 +156,7 @@ public:
    * @SINCE_1_9.24
    * @param[in] rhs A reference to the moved handle
    */
-  WatchApplication(WatchApplication&& rhs);
+  WatchApplication(WatchApplication&& rhs) noexcept;
 
   /**
    * @brief Move assignment operator.
@@ -165,7 +165,7 @@ public:
    * @param[in] rhs A reference to the moved handle
    * @return A reference to this handle
    */
-  WatchApplication& operator=(WatchApplication&& rhs);
+  WatchApplication& operator=(WatchApplication&& rhs) noexcept;
 
   /**
    * @brief Destructor