END_TEST;
}
+int UtcDaliApplicationMoveConstructor(void)
+{
+ Application application = Application::New();
+ DALI_TEST_CHECK( application );
+ DALI_TEST_EQUALS( 1, application.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+ Application moved = std::move( application );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( !application );
+
+ END_TEST;
+}
+
+int UtcDaliApplicationMoveAssignment(void)
+{
+ Application application = Application::New();
+ DALI_TEST_CHECK( application );
+ DALI_TEST_EQUALS( 1, application.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+ Application moved;
+ moved = std::move( application );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( !application );
+
+ END_TEST;
+}
+
int UtcDaliApplicationMainLoop01N(void)
{
Application application;
END_TEST;
}
+int UtcDaliTimerMoveConstructor(void)
+{
+ AdaptorTestApplication application;
+
+ Timer timer = Timer::New( 40 );
+ DALI_TEST_CHECK( timer );
+ DALI_TEST_EQUALS( 1, timer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( timer.GetInterval() == 40) ;
+
+ Timer moved = std::move( timer );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( moved.GetInterval() == 40 );
+ DALI_TEST_CHECK( !timer );
+
+ END_TEST;
+}
+
+int UtcDaliTimerMoveAssignmentr(void)
+{
+ AdaptorTestApplication application;
+
+ Timer timer = Timer::New( 40 );
+ DALI_TEST_CHECK( timer );
+ DALI_TEST_EQUALS( 1, timer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( timer.GetInterval() == 40) ;
+
+ Timer moved;
+ moved = std::move( timer );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( moved.GetInterval() == 40 );
+ DALI_TEST_CHECK( !timer );
+
+ END_TEST;
+}
+
int UtcDaliTimerIsRunning(void)
{
AdaptorTestApplication application;
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
{
}
-WatchApplication::WatchApplication(const WatchApplication& implementation)
-: Application(implementation)
-{
-}
+WatchApplication::WatchApplication( const WatchApplication& copy ) = default;
-WatchApplication& WatchApplication::operator=(const WatchApplication& application)
-{
- if( *this != application )
- {
- BaseHandle::operator=( application );
- }
- return *this;
-}
+WatchApplication& WatchApplication::operator=( const WatchApplication& rhs ) = default;
+
+WatchApplication::WatchApplication( WatchApplication&& rhs ) = default;
+
+WatchApplication& WatchApplication::operator=( WatchApplication&& rhs ) = default;
WatchApplication::WatchTimeSignal& WatchApplication::TimeTickSignal()
{
{
}
-Application::Application(const Application& application)
-: BaseHandle(application)
-{
-}
+Application::Application( const Application& copy ) = default;
-Application& Application::operator=(const Application& application)
-{
- if( *this != application )
- {
- BaseHandle::operator=( application );
- }
- return *this;
-}
+Application& Application::operator=( const Application& rhs ) = default;
+
+Application::Application( Application&& rhs ) = default;
+
+Application& Application::operator=( Application&& rhs ) = default;
void Application::MainLoop()
{
Application& operator=( const Application& application );
/**
+ * @brief Move constructor.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ */
+ Application( Application&& rhs );
+
+ /**
+ * @brief Move assignment operator.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this handle
+ */
+ Application& operator=( Application&& rhs );
+
+ /**
* @brief Destructor.
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
return Timer(internal.Get());
}
-Timer::Timer( const Timer& timer )
-: BaseHandle(timer)
-{
-}
+Timer::Timer( const Timer& copy ) = default;
-Timer& Timer::operator=( const Timer& timer )
-{
- // check self assignment
- if( *this != timer )
- {
- BaseHandle::operator=(timer);
- }
- return *this;
-}
+Timer& Timer::operator=( const Timer& rhs ) = default;
+
+Timer::Timer( Timer&& rhs ) = default;
+
+Timer& Timer::operator=( Timer&& rhs ) = default;
Timer::~Timer()
{
#define DALI_TIMER_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
Timer& operator=( const Timer& timer );
/**
+ * @brief Move constructor.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ */
+ Timer( Timer&& rhs );
+
+ /**
+ * @brief Move assignment operator.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this handle
+ */
+ Timer& operator=( Timer&& rhs );
+
+ /**
* @brief Destructor.
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
{
}
-TtsPlayer::TtsPlayer(const TtsPlayer& handle)
-: BaseHandle(handle)
-{
-}
+TtsPlayer::TtsPlayer( const TtsPlayer& copy ) = default;
-TtsPlayer& TtsPlayer::operator=(const TtsPlayer& rhs)
-{
- BaseHandle::operator=(rhs);
- return *this;
-}
+TtsPlayer& TtsPlayer::operator=( const TtsPlayer& rhs ) = default;
+
+TtsPlayer::TtsPlayer( TtsPlayer&& rhs ) = default;
+
+TtsPlayer& TtsPlayer::operator=( TtsPlayer&& rhs ) = default;
void TtsPlayer::Play(const std::string& text)
{
#define DALI_TTS_PLAYER_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
TtsPlayer& operator=(const TtsPlayer& rhs);
/**
+ * @brief Move constructor.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ */
+ TtsPlayer( TtsPlayer&& rhs );
+
+ /**
+ * @brief Move assignment operator.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this handle
+ */
+ TtsPlayer& operator=( TtsPlayer&& rhs );
+
+ /**
* @brief Starts playing the audio data synthesized from the specified text.
*
* @SINCE_1_0.0
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
{
}
-WidgetApplication::WidgetApplication(const WidgetApplication& widgetApplication)
-: Application(widgetApplication)
-{
-}
+WidgetApplication::WidgetApplication( const WidgetApplication& copy ) = default;
-WidgetApplication& WidgetApplication::operator=(const WidgetApplication& widgetApplication)
-{
- if( *this != widgetApplication )
- {
- BaseHandle::operator=( widgetApplication );
- }
- return *this;
-}
+WidgetApplication& WidgetApplication::operator=( const WidgetApplication& rhs ) = default;
+
+WidgetApplication::WidgetApplication( WidgetApplication&& rhs ) = default;
+
+WidgetApplication& WidgetApplication::operator=( WidgetApplication&& rhs ) = default;
void WidgetApplication::RegisterWidgetCreatingFunction( const std::string& widgetName, CreateWidgetFunction createFunction )
{
#define DALI_WIDGET_APPLICATION_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
*/
WidgetApplication& operator=( const WidgetApplication& widgetApplication );
+ /**
+ * @brief Move constructor.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ */
+ WidgetApplication( WidgetApplication&& rhs );
+
+ /**
+ * @brief Move assignment operator.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this handle
+ */
+ WidgetApplication& operator=( WidgetApplication&& rhs );
+
/**
* @brief Destructor
* @SINCE_1_3_5
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
{
}
-Widget::Widget(const Widget& widget)
-: BaseHandle(widget)
-{
-}
+Widget::Widget( const Widget& copy ) = default;
-Widget& Widget::operator=(const Widget& widget)
-{
- if( *this != widget )
- {
- BaseHandle::operator=( widget );
- }
- return *this;
-}
+Widget& Widget::operator=( const Widget& rhs ) = default;
+
+Widget::Widget( Widget&& rhs ) = default;
+
+Widget& Widget::operator=( Widget&& rhs ) = default;
Widget::Widget(Internal::Adaptor::Widget* widget)
: BaseHandle(widget)
#define DALI_WIDGET_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
Widget& operator=( const Widget& widget );
/**
+ * @brief Move constructor.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ */
+ Widget( Widget&& rhs );
+
+ /**
+ * @brief Move assignment operator.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this handle
+ */
+ Widget& operator=( Widget&& rhs );
+
+ /**
* @brief Destructor
* @SINCE_1_3_5
*/
{
}
-Window::Window(const Window& handle)
-: BaseHandle(handle)
-{
-}
+Window::Window( const Window& copy ) = default;
-Window& Window::operator=(const Window& rhs)
-{
- BaseHandle::operator=(rhs);
- return *this;
-}
+Window& Window::operator=( const Window& rhs ) = default;
+
+Window::Window( Window&& rhs ) = default;
+
+Window& Window::operator=( Window&& rhs ) = default;
void Window::Add( Dali::Actor actor )
{
Window& operator=(const Window& rhs);
/**
+ * @brief Move constructor.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ */
+ Window( Window&& rhs );
+
+ /**
+ * @brief Move assignment operator.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this handle
+ */
+ Window& operator=( Window&& rhs );
+
+ /**
* @brief Adds a child Actor to the Window.
*
* The child will be referenced.
{
}
-Capture::Capture( const Capture& copy )
-: BaseHandle(copy)
-{
-}
+Capture::Capture( const Capture& copy ) = default;
-Capture& Capture::operator=( const Capture& rhs )
-{
- BaseHandle::operator=( rhs );
- return *this;
-}
+Capture& Capture::operator=( const Capture& rhs ) = default;
+
+Capture::Capture( Capture&& rhs ) = default;
+
+Capture& Capture::operator=( Capture&& rhs ) = default;
void Capture::Start( Actor source, const Vector2& size, const std::string &path, const Vector4& clearColor, const uint32_t quality )
{
Capture& operator=( const Capture& rhs );
/**
+ * @brief Move constructor.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ */
+ Capture( Capture&& rhs );
+
+ /**
+ * @brief Move assignment operator.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this handle
+ */
+ Capture& operator=( Capture&& rhs );
+
+ /**
* @brief Start capture and save the image as a file.
*
* @SINCE_1_9.12
#define DALI_WATCH_APPLICATION_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
WatchApplication& operator=( const WatchApplication& application );
/**
+ * @brief Move constructor.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ */
+ WatchApplication( WatchApplication&& rhs );
+
+ /**
+ * @brief Move assignment operator.
+ *
+ * @SINCE_1_9.24
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this handle
+ */
+ WatchApplication& operator=( WatchApplication&& rhs );
+
+ /**
* @brief Destructor
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.