From: Eunki Hong Date: Thu, 9 Mar 2023 17:49:23 +0000 (+0900) Subject: Ensure BaseHandle class move noexcept (adaptor public-api) X-Git-Tag: dali_2.2.18~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F63%2F289563%2F6;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Ensure BaseHandle class move noexcept (adaptor public-api) Change-Id: I673bde85d960d81a03c2b54646c6a6ece3c63945 Signed-off-by: Eunki Hong --- diff --git a/dali/internal/adaptor/tizen-wayland/tizen-wearable/watch-application.cpp b/dali/internal/adaptor/tizen-wayland/tizen-wearable/watch-application.cpp index 89b93f1..9827e37 100644 --- a/dali/internal/adaptor/tizen-wayland/tizen-wearable/watch-application.cpp +++ b/dali/internal/adaptor/tizen-wayland/tizen-wearable/watch-application.cpp @@ -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() { diff --git a/dali/public-api/adaptor-framework/application.cpp b/dali/public-api/adaptor-framework/application.cpp index d484028..8ed1f90 100644 --- a/dali/public-api/adaptor-framework/application.cpp +++ b/dali/public-api/adaptor-framework/application.cpp @@ -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() { diff --git a/dali/public-api/adaptor-framework/application.h b/dali/public-api/adaptor-framework/application.h index 25ce168..1971c4d 100644 --- a/dali/public-api/adaptor-framework/application.h +++ b/dali/public-api/adaptor-framework/application.h @@ -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. diff --git a/dali/public-api/adaptor-framework/encoded-image-buffer.cpp b/dali/public-api/adaptor-framework/encoded-image-buffer.cpp index 17b70b3..713f4c9 100644 --- a/dali/public-api/adaptor-framework/encoded-image-buffer.cpp +++ b/dali/public-api/adaptor-framework/encoded-image-buffer.cpp @@ -16,7 +16,7 @@ */ // CLASS HEADER -#include "encoded-image-buffer.h" +#include // INTERNAL INCLUDES #include @@ -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 { diff --git a/dali/public-api/adaptor-framework/encoded-image-buffer.h b/dali/public-api/adaptor-framework/encoded-image-buffer.h index 4e45adf..71e5c8b 100644 --- a/dali/public-api/adaptor-framework/encoded-image-buffer.h +++ b/dali/public-api/adaptor-framework/encoded-image-buffer.h @@ -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; diff --git a/dali/public-api/adaptor-framework/timer.cpp b/dali/public-api/adaptor-framework/timer.cpp index 785b6f2..ef779f8 100644 --- a/dali/public-api/adaptor-framework/timer.cpp +++ b/dali/public-api/adaptor-framework/timer.cpp @@ -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() { diff --git a/dali/public-api/adaptor-framework/timer.h b/dali/public-api/adaptor-framework/timer.h index 9e29f03..2b1df7f 100644 --- a/dali/public-api/adaptor-framework/timer.h +++ b/dali/public-api/adaptor-framework/timer.h @@ -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. diff --git a/dali/public-api/adaptor-framework/tts-player.cpp b/dali/public-api/adaptor-framework/tts-player.cpp index 699e09d..48ee359 100644 --- a/dali/public-api/adaptor-framework/tts-player.cpp +++ b/dali/public-api/adaptor-framework/tts-player.cpp @@ -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) { diff --git a/dali/public-api/adaptor-framework/tts-player.h b/dali/public-api/adaptor-framework/tts-player.h index d4f4137..deb362f 100644 --- a/dali/public-api/adaptor-framework/tts-player.h +++ b/dali/public-api/adaptor-framework/tts-player.h @@ -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. diff --git a/dali/public-api/adaptor-framework/widget-application.cpp b/dali/public-api/adaptor-framework/widget-application.cpp index d7bc085..b1f1854 100644 --- a/dali/public-api/adaptor-framework/widget-application.cpp +++ b/dali/public-api/adaptor-framework/widget-application.cpp @@ -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) { diff --git a/dali/public-api/adaptor-framework/widget-application.h b/dali/public-api/adaptor-framework/widget-application.h index 8a09973..38ca977 100644 --- a/dali/public-api/adaptor-framework/widget-application.h +++ b/dali/public-api/adaptor-framework/widget-application.h @@ -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 diff --git a/dali/public-api/adaptor-framework/widget.cpp b/dali/public-api/adaptor-framework/widget.cpp index 590c524..40a6988 100644 --- a/dali/public-api/adaptor-framework/widget.cpp +++ b/dali/public-api/adaptor-framework/widget.cpp @@ -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) diff --git a/dali/public-api/adaptor-framework/widget.h b/dali/public-api/adaptor-framework/widget.h index 0201651..336c0d9 100644 --- a/dali/public-api/adaptor-framework/widget.h +++ b/dali/public-api/adaptor-framework/widget.h @@ -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 diff --git a/dali/public-api/adaptor-framework/window.cpp b/dali/public-api/adaptor-framework/window.cpp index cbeddac..ae9192d 100644 --- a/dali/public-api/adaptor-framework/window.cpp +++ b/dali/public-api/adaptor-framework/window.cpp @@ -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) { diff --git a/dali/public-api/adaptor-framework/window.h b/dali/public-api/adaptor-framework/window.h index e432d6f..fc12a6e 100644 --- a/dali/public-api/adaptor-framework/window.h +++ b/dali/public-api/adaptor-framework/window.h @@ -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 diff --git a/dali/public-api/capture/capture.cpp b/dali/public-api/capture/capture.cpp index d8cb4f7..faa5c1e 100644 --- a/dali/public-api/capture/capture.cpp +++ b/dali/public-api/capture/capture.cpp @@ -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) { diff --git a/dali/public-api/capture/capture.h b/dali/public-api/capture/capture.h index 3a96515..3dd9275 100644 --- a/dali/public-api/capture/capture.h +++ b/dali/public-api/capture/capture.h @@ -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. diff --git a/dali/public-api/watch/watch-application.h b/dali/public-api/watch/watch-application.h index d47e854..a8079f3 100644 --- a/dali/public-api/watch/watch-application.h +++ b/dali/public-api/watch/watch-application.h @@ -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