/*
- * 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.
END_TEST;
}
+int UtcDaliAsyncImageLoaderMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ AsyncImageLoader loader = AsyncImageLoader::New( );
+ DALI_TEST_CHECK( loader );
+ DALI_TEST_EQUALS( 1, loader.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+ AsyncImageLoader moved = std::move( loader );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( !loader );
+
+ END_TEST;
+}
+
int UtcDaliAsyncImageLoaderAssignmentOperator(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliAsyncImageLoaderMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ AsyncImageLoader loader = AsyncImageLoader::New( );
+ DALI_TEST_CHECK( loader );
+ DALI_TEST_EQUALS( 1, loader.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+ AsyncImageLoader moved;
+ moved = std::move( loader );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( !loader );
+
+ END_TEST;
+}
+
int UtcDaliAsyncImageLoaderDownCastP(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliButtonMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ Button button = PushButton::New();
+ DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+ button.SetProperty( Button::Property::TOGGLABLE, true );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+
+ Button moved = std::move( button );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+ DALI_TEST_CHECK( !button );
+
+ END_TEST;
+}
+
int UtcDaliButtonAssignmentOperatorP(void)
{
TestApplication application;
END_TEST;
}
+int UtcDaliButtonMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ Button button = PushButton::New();
+ DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+ button.SetProperty( Button::Property::TOGGLABLE, true );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+
+ Button moved;
+ moved = std::move( button );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+ DALI_TEST_CHECK( !button );
+
+ END_TEST;
+}
+
int UtcDaliButtonDownCastP(void)
{
TestApplication application;
END_TEST;
}
+int UtcDaliCheckBoxButtonMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ CheckBoxButton button = CheckBoxButton::New();
+ DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+ button.SetProperty( Button::Property::TOGGLABLE, false );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+
+ CheckBoxButton moved = std::move( button );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+ DALI_TEST_CHECK( !button );
+
+ END_TEST;
+}
+
int UtcDaliCheckBoxButtonAssignmentOperatorP(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliCheckBoxButtonMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ CheckBoxButton button = CheckBoxButton::New();
+ DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+ button.SetProperty( Button::Property::TOGGLABLE, false );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+
+ CheckBoxButton moved;
+ moved = std::move( button );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+ DALI_TEST_CHECK( !button );
+
+ END_TEST;
+}
+
int UtcDaliCheckBoxButtonNewP(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliControlMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ Control control = Control::New();
+ DALI_TEST_EQUALS( 1, control.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ control.SetProperty( Actor::Property::SENSITIVE, false );
+ DALI_TEST_CHECK( false == control.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+ Control moved = std::move( control );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+ DALI_TEST_CHECK( !control );
+
+ END_TEST;
+}
+
+int UtcDaliControlMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ Control control = Control::New();
+ DALI_TEST_EQUALS( 1, control.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ control.SetProperty( Actor::Property::SENSITIVE, false );
+ DALI_TEST_CHECK( false == control.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+ Control moved;
+ moved = std::move( control );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+ DALI_TEST_CHECK( !control );
+
+ END_TEST;
+}
+
int UtcDaliControlDownCast(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliFlexContainerMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ FlexContainer flexContainer = FlexContainer::New();
+ DALI_TEST_EQUALS( 1, flexContainer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ flexContainer.SetProperty( FlexContainer::Property::FLEX_DIRECTION, FlexContainer::ROW_REVERSE );
+ DALI_TEST_CHECK( flexContainer.GetProperty<int>( FlexContainer::Property::FLEX_DIRECTION ) == FlexContainer::ROW_REVERSE );
+
+ FlexContainer moved = std::move( flexContainer );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( moved.GetProperty<int>( FlexContainer::Property::FLEX_DIRECTION ) == FlexContainer::ROW_REVERSE );
+ DALI_TEST_CHECK( !flexContainer );
+
+ END_TEST;
+}
+
int UtcDaliToolkitFlexContainerAssignmentOperatorP(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliFlexContainerMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ FlexContainer flexContainer = FlexContainer::New();
+ DALI_TEST_EQUALS( 1, flexContainer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ flexContainer.SetProperty( FlexContainer::Property::FLEX_DIRECTION, FlexContainer::ROW_REVERSE );
+ DALI_TEST_CHECK( flexContainer.GetProperty<int>( FlexContainer::Property::FLEX_DIRECTION ) == FlexContainer::ROW_REVERSE );
+
+ FlexContainer moved;
+ moved = std::move( flexContainer );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( moved.GetProperty<int>( FlexContainer::Property::FLEX_DIRECTION ) == FlexContainer::ROW_REVERSE );
+ DALI_TEST_CHECK( !flexContainer );
+
+ END_TEST;
+}
+
// Positive test case for a method
int UtcDaliToolkitFlexContainerGetPropertyP(void)
{
END_TEST;
}
+int UtcDaliImageViewMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ ImageView imageView = ImageView::New();
+ DALI_TEST_EQUALS( 1, imageView.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ imageView.SetProperty( Actor::Property::SENSITIVE, false );
+ DALI_TEST_CHECK( false == imageView.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+ ImageView moved = std::move( imageView );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+ DALI_TEST_CHECK( !imageView );
+
+ END_TEST;
+}
+
int UtcDaliImageViewAssignmentOperatorP(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliImageViewMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ ImageView imageView = ImageView::New();
+ DALI_TEST_EQUALS( 1, imageView.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ imageView.SetProperty( Actor::Property::SENSITIVE, false );
+ DALI_TEST_CHECK( false == imageView.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+ ImageView moved;
+ moved = std::move( imageView );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+ DALI_TEST_CHECK( !imageView );
+
+ END_TEST;
+}
+
int UtcDaliImageViewDownCastP(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliItemViewCopyConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ TestItemFactory factory;
+ ItemView itemView = ItemView::New( factory );
+ DALI_TEST_CHECK( itemView );
+
+ ItemView copy( itemView );
+ DALI_TEST_CHECK( copy );
+
+ END_TEST;
+}
+
+int UtcDaliItemViewCopyAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ TestItemFactory factory;
+ ItemView itemView = ItemView::New( factory );
+ DALI_TEST_CHECK( itemView );
+
+ ItemView copy;
+ copy = itemView;
+ DALI_TEST_CHECK( copy );
+ DALI_TEST_EQUALS( itemView, copy, TEST_LOCATION );
+
+ END_TEST;
+}
+
+int UtcDaliItemViewMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ TestItemFactory factory;
+ ItemView itemView = ItemView::New( factory );
+ DALI_TEST_EQUALS( 1, itemView.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ itemView.SetProperty( Actor::Property::SENSITIVE, false );
+ DALI_TEST_CHECK( false == itemView.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+ ItemView moved = std::move( itemView );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+ DALI_TEST_CHECK( !itemView );
+
+ END_TEST;
+}
+
+int UtcDaliItemViewMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ TestItemFactory factory;
+ ItemView itemView = ItemView::New( factory );
+ DALI_TEST_EQUALS( 1, itemView.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ itemView.SetProperty( Actor::Property::SENSITIVE, false );
+ DALI_TEST_CHECK( false == itemView.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+ ItemView moved;
+ moved = std::move( itemView );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+ DALI_TEST_CHECK( !itemView );
+
+ END_TEST;
+}
+
int UtcDaliItemViewDownCast(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliModelMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ Model3dView view = Toolkit::Model3dView::New();
+ DALI_TEST_EQUALS( 1, view.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ view.SetProperty( Actor::Property::SENSITIVE, false );
+ DALI_TEST_CHECK( false == view.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+ Model3dView moved = std::move( view );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+ DALI_TEST_CHECK( !view );
+
+ END_TEST;
+}
+
+int UtcDaliModelMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ Model3dView view = Toolkit::Model3dView::New();
+ DALI_TEST_EQUALS( 1, view.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ view.SetProperty( Actor::Property::SENSITIVE, false );
+ DALI_TEST_CHECK( false == view.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+ Model3dView moved;
+ moved = std::move( view );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+ DALI_TEST_CHECK( !view );
+
+ END_TEST;
+}
+
int UtcDaliModelTypeRegistry(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliProgressBarCopyConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ ProgressBar progressBar = ProgressBar::New();
+ DALI_TEST_CHECK( progressBar );
+
+ ProgressBar copy( progressBar );
+ DALI_TEST_CHECK( copy );
+
+ END_TEST;
+}
+
+int UtcDaliProgressBarCopyAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ ProgressBar progressBar = ProgressBar::New();
+ DALI_TEST_CHECK( progressBar );
+
+ ProgressBar copy;
+ copy = progressBar;
+ DALI_TEST_CHECK( copy );
+ DALI_TEST_EQUALS( progressBar, copy, TEST_LOCATION );
+
+ END_TEST;
+}
+
+int UtcDaliProgressBarMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ ProgressBar progressBar = ProgressBar::New();
+ DALI_TEST_EQUALS( 1, progressBar.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ progressBar.SetProperty( Actor::Property::SENSITIVE, false );
+ DALI_TEST_CHECK( false == progressBar.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+ ProgressBar moved = std::move( progressBar );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+ DALI_TEST_CHECK( !progressBar );
+
+ END_TEST;
+}
+
+int UtcDaliProgressBarMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ ProgressBar progressBar = ProgressBar::New();
+ DALI_TEST_EQUALS( 1, progressBar.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ progressBar.SetProperty( Actor::Property::SENSITIVE, false );
+ DALI_TEST_CHECK( false == progressBar.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+ ProgressBar moved;
+ moved = std::move( progressBar );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+ DALI_TEST_CHECK( !progressBar );
+
+ END_TEST;
+}
+
int UtcDaliProgressBarDownCast(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliPushButtonMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ PushButton button = PushButton::New();
+ DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+ button.SetProperty( Button::Property::TOGGLABLE, true );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+
+ PushButton moved = std::move( button );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+ DALI_TEST_CHECK( !button );
+
+ END_TEST;
+}
+
int UtcDaliPushButtonAssignmentOperatorP(void)
{
TestApplication application;
END_TEST;
}
+int UtcDaliPushButtonMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ PushButton button = PushButton::New();
+ DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+ button.SetProperty( Button::Property::TOGGLABLE, true );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+
+ PushButton moved;
+ moved = std::move( button );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+ DALI_TEST_CHECK( !button );
+
+ END_TEST;
+}
+
int UtcDaliPushButtonNewP(void)
{
TestApplication application;
END_TEST;
}
+int UtcDaliRadioButtonMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ RadioButton button = RadioButton::New();
+ DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+ button.SetProperty( Button::Property::TOGGLABLE, false );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+
+ RadioButton moved = std::move( button );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+ DALI_TEST_CHECK( !button );
+
+ END_TEST;
+}
+
int UtcDaliRadioButtonAssignmentOperatorP(void)
{
TestApplication application;
END_TEST;
}
+int UtcDaliRadioButtonMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ RadioButton button = RadioButton::New();
+ DALI_TEST_EQUALS( 1, button.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), true , TEST_LOCATION );
+ button.SetProperty( Button::Property::TOGGLABLE, false );
+ DALI_TEST_EQUALS( button.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+
+ RadioButton moved;
+ moved = std::move( button );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( moved.GetProperty<bool>( Button::Property::TOGGLABLE ), false , TEST_LOCATION );
+ DALI_TEST_CHECK( !button );
+
+ END_TEST;
+}
+
int UtcDaliRadioButtonNewP(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliScrollViewMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ ScrollView scrollView = ScrollView::New();
+ DALI_TEST_EQUALS( 1, scrollView.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ scrollView.SetProperty( ScrollView::Property::SCROLL_POSITION, Vector2(10.0f, 10.0f) );
+ DALI_TEST_EQUALS( scrollView.GetProperty<Vector2>( ScrollView::Property::SCROLL_POSITION ), Vector2(10.0f, 10.0f), TEST_LOCATION );
+
+ ScrollView moved = std::move( scrollView );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( moved.GetProperty<Vector2>( ScrollView::Property::SCROLL_POSITION ), Vector2(10.0f, 10.0f), TEST_LOCATION );
+ DALI_TEST_CHECK( !scrollView );
+
+ END_TEST;
+}
+
int UtcDaliToolkitScrollViewAssignmentOperatorP(void)
{
ToolkitTestApplication application;
ScrollView scrollView = ScrollView::New();
scrollView.SetProperty( ScrollView::Property::SCROLL_POSITION, Vector2(10.0f, 10.0f) );
- ScrollView copy = scrollView;
+ ScrollView copy;
+ copy = scrollView;
DALI_TEST_CHECK( copy );
DALI_TEST_CHECK( copy.GetProperty<Vector2>( ScrollView::Property::SCROLL_POSITION ) == scrollView.GetProperty<Vector2>( ScrollView::Property::SCROLL_POSITION ) );
END_TEST;
}
+int UtcDaliScrollViewMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ ScrollView scrollView = ScrollView::New();
+ DALI_TEST_EQUALS( 1, scrollView.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ scrollView.SetProperty( ScrollView::Property::SCROLL_POSITION, Vector2(10.0f, 10.0f) );
+ DALI_TEST_EQUALS( scrollView.GetProperty<Vector2>( ScrollView::Property::SCROLL_POSITION ), Vector2(10.0f, 10.0f), TEST_LOCATION );
+
+ ScrollView moved;
+ moved = std::move( scrollView );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( moved.GetProperty<Vector2>( ScrollView::Property::SCROLL_POSITION ), Vector2(10.0f, 10.0f), TEST_LOCATION );
+ DALI_TEST_CHECK( !scrollView );
+
+ END_TEST;
+}
+
int UtcDaliScrollViewDestructorP(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliSliderCopyConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ Slider slider = Slider::New();
+ DALI_TEST_CHECK( slider );
+
+ Slider copy( slider );
+ DALI_TEST_CHECK( copy );
+
+ END_TEST;
+}
+
+int UtcDaliSliderCopyAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ Slider slider = Slider::New();
+ DALI_TEST_CHECK( slider );
+
+ Slider copy;
+ copy = slider;
+ DALI_TEST_CHECK( copy );
+ DALI_TEST_EQUALS( slider, copy, TEST_LOCATION );
+
+ END_TEST;
+}
+
+int UtcDaliSliderMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ Slider slider = Slider::New();
+ DALI_TEST_EQUALS( 1, slider.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ slider.SetProperty( Actor::Property::SENSITIVE, false );
+ DALI_TEST_CHECK( false == slider.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+ Slider moved = std::move( slider );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+ DALI_TEST_CHECK( !slider );
+
+ END_TEST;
+}
+
+int UtcDaliSliderMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ Slider slider = Slider::New();
+ DALI_TEST_EQUALS( 1, slider.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ slider.SetProperty( Actor::Property::SENSITIVE, false );
+ DALI_TEST_CHECK( false == slider.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+
+ Slider moved;
+ moved = std::move( slider );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( false == moved.GetProperty< bool >( Actor::Property::SENSITIVE ) );
+ DALI_TEST_CHECK( !slider );
+
+ END_TEST;
+}
+
int UtcDaliSliderDestructor(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliTextEditorMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ TextEditor textEditor = TextEditor::New();
+ textEditor.SetProperty( TextEditor::Property::TEXT, "Test" );
+ DALI_TEST_CHECK( textEditor.GetProperty<std::string>( TextEditor::Property::TEXT ) == "Test" );
+
+ TextEditor moved = std::move( textEditor );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( moved.GetProperty<std::string>( TextEditor::Property::TEXT ) == "Test" );
+ DALI_TEST_CHECK( !textEditor );
+
+ END_TEST;
+}
+
int UtcDaliToolkitTextEditorAssignmentOperatorP(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliTextEditorMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ TextEditor textEditor = TextEditor::New();
+ textEditor.SetProperty( TextEditor::Property::TEXT, "Test" );
+ DALI_TEST_CHECK( textEditor.GetProperty<std::string>( TextEditor::Property::TEXT ) == "Test" );
+
+ TextEditor moved;
+ moved = std::move( textEditor );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( moved.GetProperty<std::string>( TextEditor::Property::TEXT ) == "Test" );
+ DALI_TEST_CHECK( !textEditor );
+
+ END_TEST;
+}
+
int UtcDaliTextEditorNewP(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliTextFieldMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ TextField textField = TextField::New();
+ textField.SetProperty( TextEditor::Property::TEXT, "Test" );
+ DALI_TEST_CHECK( textField.GetProperty<std::string>( TextField::Property::TEXT ) == "Test" );
+
+ TextField moved = std::move( textField );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( moved.GetProperty<std::string>( TextField::Property::TEXT ) == "Test" );
+ DALI_TEST_CHECK( !textField );
+
+ END_TEST;
+}
+
int UtcDaliToolkitTextFieldAssignmentOperatorP(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliTextFieldMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ TextField textField = TextField::New();
+ textField.SetProperty( TextEditor::Property::TEXT, "Test" );
+ DALI_TEST_CHECK( textField.GetProperty<std::string>( TextField::Property::TEXT ) == "Test" );
+
+ TextField moved;
+ moved = std::move( textField );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( moved.GetProperty<std::string>( TextField::Property::TEXT ) == "Test" );
+ DALI_TEST_CHECK( !textField );
+
+ END_TEST;
+}
+
int UtcDaliTextFieldNewP(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliTextLabelMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ TextLabel textLabel = TextLabel::New();
+ textLabel.SetProperty( TextLabel::Property::TEXT, "Test" );
+ DALI_TEST_CHECK( textLabel.GetProperty<std::string>( TextLabel::Property::TEXT ) == "Test" );
+
+ TextLabel moved = std::move( textLabel );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( moved.GetProperty<std::string>( TextLabel::Property::TEXT ) == "Test" );
+ DALI_TEST_CHECK( !textLabel );
+
+ END_TEST;
+}
+
int UtcDaliToolkitTextLabelAssignmentOperatorP(void)
{
ToolkitTestApplication application;
END_TEST;
}
+int UtcDaliTextLabelMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ TextLabel textLabel = TextLabel::New();
+ textLabel.SetProperty( TextLabel::Property::TEXT, "Test" );
+ DALI_TEST_CHECK( textLabel.GetProperty<std::string>( TextLabel::Property::TEXT ) == "Test" );
+
+ TextLabel moved;
+ moved = std::move( textLabel );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( moved.GetProperty<std::string>( TextLabel::Property::TEXT ) == "Test" );
+ DALI_TEST_CHECK( !textLabel );
+
+ END_TEST;
+}
+
// Positive test case for a method
int UtcDaliToolkitTextLabelGetPropertyP(void)
{
DALI_TEST_EQUALS( indexArray.GetElementAt(0).Get<int>(), 10, TEST_LOCATION );
END_TEST;
-}
\ No newline at end of file
+}
END_TEST;
}
+int UtcDaliVideoViewMoveConstructor(void)
+{
+ ToolkitTestApplication application;
+
+ VideoView view = Toolkit::VideoView::New();
+ DALI_TEST_EQUALS( 1, view.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ view.SetProperty( VideoView::Property::LOOPING, true );
+ DALI_TEST_CHECK( view.GetProperty<bool>( VideoView::Property::LOOPING ) );
+
+ VideoView moved = std::move( view );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( moved.GetProperty<bool>( VideoView::Property::LOOPING ) );
+ DALI_TEST_CHECK( !view );
+
+ END_TEST;
+}
+
+int UtcDaliVideoViewMoveAssignment(void)
+{
+ ToolkitTestApplication application;
+
+ VideoView view = Toolkit::VideoView::New();
+ DALI_TEST_EQUALS( 1, view.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ view.SetProperty( VideoView::Property::LOOPING, true );
+ DALI_TEST_CHECK( view.GetProperty<bool>( VideoView::Property::LOOPING ) );
+
+ VideoView moved;
+ moved = std::move( view );
+ DALI_TEST_CHECK( moved );
+ DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( moved.GetProperty<bool>( VideoView::Property::LOOPING ) );
+ DALI_TEST_CHECK( !view );
+
+ END_TEST;
+}
+
int UtcDaliVideoViewTypeRegistry(void)
{
ToolkitTestApplication application;
Button::Button()
{}
-Button::Button( const Button& button )
-: Control( button )
-{
-}
+Button::Button( const Button& button ) = default;
-Button& Button::operator=( const Button& button )
-{
- if( &button != this )
- {
- Control::operator=( button );
- }
- return *this;
-}
+Button::Button( Button&& rhs ) = default;
+
+Button& Button::operator=( const Button& button ) = default;
+
+Button& Button::operator=( Button&& rhs ) = default;
Button::~Button()
{
#define DALI_TOOLKIT_BUTTON_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.
Button( const Button& button );
/**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ Button( Button&& rhs );
+
+ /**
* @brief Assignment operator.
* @SINCE_1_0.0
* @param[in] button Handle to an object
Button& operator=( const Button& button );
/**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ Button& operator=( Button&& rhs );
+
+ /**
* @brief Downcasts a handle to Button handle.
*
* If handle points to a Button, the downcast produces valid handle.
/*
- * Copyright (c) 2015 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.
{
}
-CheckBoxButton::CheckBoxButton( const CheckBoxButton& checkBox )
-: Button( checkBox )
-{
-}
+CheckBoxButton::CheckBoxButton( const CheckBoxButton& checkBox ) = default;
-CheckBoxButton& CheckBoxButton::operator=( const CheckBoxButton& checkBox )
-{
- if( &checkBox != this )
- {
- Button::operator=( checkBox );
- }
- return *this;
-}
+CheckBoxButton::CheckBoxButton( CheckBoxButton&& rhs ) = default;
+
+CheckBoxButton& CheckBoxButton::operator=( const CheckBoxButton& checkBox ) = default;
+
+CheckBoxButton& CheckBoxButton::operator=( CheckBoxButton&& rhs ) = default;
CheckBoxButton::~CheckBoxButton()
{
#define DALI_TOOLKIT_CHECK_BOX_BUTTON_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.
CheckBoxButton( const CheckBoxButton& checkBox );
/**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ CheckBoxButton( CheckBoxButton&& rhs );
+
+ /**
* @brief Assignment operator.
* @SINCE_1_0.0
* @param[in] checkBox Handle to an object
CheckBoxButton& operator=( const CheckBoxButton& checkBox );
/**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ CheckBoxButton& operator=( CheckBoxButton&& rhs );
+
+ /**
* @brief Destructor.
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
{
}
-PushButton::PushButton( const PushButton& pushButton )
-: Button( pushButton )
-{
-}
+PushButton::PushButton( const PushButton& pushButton ) = default;
-PushButton& PushButton::operator=( const PushButton& pushButton )
-{
- if( &pushButton != this )
- {
- Button::operator=( pushButton );
- }
- return *this;
-}
+PushButton::PushButton( PushButton&& rhs ) = default;
+
+PushButton& PushButton::operator=( const PushButton& pushButton ) = default;
+
+PushButton& PushButton::operator=( PushButton&& rhs ) = default;
PushButton::PushButton( Dali::Internal::CustomActor* internal )
: Button( internal )
PushButton( const PushButton& pushButton );
/**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ PushButton( PushButton&& rhs );
+
+ /**
* @brief Assignment operator.
* @SINCE_1_0.0
* @param[in] pushButton Handle to an object
PushButton& operator=( const PushButton& pushButton );
/**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ PushButton& operator=( PushButton&& rhs );
+
+ /**
* @brief Destructor.
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
/*
- * 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.
{
}
-RadioButton::RadioButton( const RadioButton& radioButton )
- : Button( radioButton )
-{
-}
+RadioButton::RadioButton( const RadioButton& radioButton ) = default;
-RadioButton& RadioButton::operator=( const RadioButton& radioButton )
-{
- if( &radioButton != this )
- {
- Button::operator=( radioButton );
- }
- return *this;
-}
+RadioButton::RadioButton( RadioButton&& rhs ) = default;
+
+RadioButton& RadioButton::operator=( const RadioButton& radioButton ) = default;
+
+RadioButton& RadioButton::operator=( RadioButton&& rhs ) = default;
RadioButton::RadioButton( Dali::Internal::CustomActor* internal )
: Button( internal )
#define DALI_TOOLKIT_RADIO_BUTTON_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2029 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.
RadioButton( const RadioButton& radioButton );
/**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ RadioButton( RadioButton&& rhs );
+
+ /**
* @brief Assignment operator.
* @SINCE_1_0.0
* @param[in] radioButton Handle to an object
RadioButton& operator=( const RadioButton& radioButton );
/**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ RadioButton& operator=( RadioButton&& rhs );
+
+ /**
* @brief Destructor.
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
/*
- * 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.
{
}
-Control::Control( const Control& uiControl )
-: CustomActor( uiControl )
-{
-}
+Control::Control( const Control& uiControl ) = default;
+
+Control::Control( Control&& rhs ) = default;
Control::~Control()
{
}
-Control& Control::operator=( const Control& handle )
-{
- if( &handle != this )
- {
- CustomActor::operator=( handle );
- }
- return *this;
-}
+Control& Control::operator=( const Control& handle ) = default;
+
+Control& Control::operator=( Control&& rhs ) = default;
Control Control::DownCast( BaseHandle handle )
{
Control(const Control& uiControl);
/**
+ * @brief Move constructor.
+ *
+ * @SINCE_1_9.23
+ * @param[in] rhs Handle to move
+ */
+ Control( Control&& rhs );
+
+ /**
* @brief Dali::Control is intended as a base class.
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
public: // operators
/**
- * @brief Assignment operator.
+ * @brief Copy assignment operator.
*
* Changes this handle to point to another real object.
* @SINCE_1_0.0
*/
Control& operator=( const Control& handle );
+ /**
+ * @brief Move assignment operator.
+ *
+ * @SINCE_1_9.23
+ * @param[in] rhs Object to assign this to
+ * @return Reference to this
+ */
+ Control& operator=( Control&& rhs );
+
public:
/**
{
}
-FlexContainer::FlexContainer( const FlexContainer& handle )
-: Control( handle )
-{
-}
+FlexContainer::FlexContainer( const FlexContainer& handle ) = default;
-FlexContainer& FlexContainer::operator=( const FlexContainer& handle )
-{
- if( &handle != this )
- {
- Control::operator=( handle );
- }
- return *this;
-}
+FlexContainer::FlexContainer( FlexContainer&& rhs ) = default;
+
+FlexContainer& FlexContainer::operator=( const FlexContainer& handle ) = default;
+
+FlexContainer& FlexContainer::operator=( FlexContainer&& rhs ) = default;
FlexContainer::~FlexContainer()
{
#define DALI_TOOLKIT_FLEX_CONTAINER_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.
FlexContainer( const FlexContainer& handle );
/**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ FlexContainer( FlexContainer&& rhs );
+
+ /**
* @brief Assignment operator. Changes this handle to point to another real object.
* @SINCE_1_1.35
* @param[in] handle Handle to an object
FlexContainer& operator=( const FlexContainer& handle );
/**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ FlexContainer& operator=( FlexContainer&& rhs );
+
+ /**
* @brief Destructor.
*
* @details This is non-virtual since derived Handle types must not contain data or virtual methods.
{
}
-ImageView::ImageView( const ImageView& imageView )
-: Control( imageView )
-{
-}
+ImageView::ImageView( const ImageView& imageView ) = default;
-ImageView& ImageView::operator=( const ImageView& imageView )
-{
- if( &imageView != this )
- {
- Control::operator=( imageView );
- }
- return *this;
-}
+ImageView::ImageView( ImageView&& rhs ) = default;
+
+ImageView& ImageView::operator=( const ImageView& imageView ) = default;
+
+ImageView& ImageView::operator=( ImageView&& rhs ) = default;
ImageView::~ImageView()
{
ImageView( const ImageView& imageView );
/**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ ImageView( ImageView&& rhs );
+
+ /**
* @brief Assignment operator.
*
* @SINCE_1_0.0
ImageView& operator=( const ImageView& imageView );
/**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ ImageView& operator=( ImageView&& rhs );
+
+ /**
* @brief Downcasts a handle to ImageView handle.
*
* If handle points to a ImageView, the downcast produces valid handle.
/*
- * Copyright (c) 2015 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.
Model3dView::Model3dView()
{}
-Model3dView::Model3dView( const Model3dView& model3dView )
-: Control( model3dView )
-{
-}
+Model3dView::Model3dView( const Model3dView& model3dView ) = default;
-Model3dView& Model3dView::operator=( const Model3dView& model3dView )
-{
- if( &model3dView != this )
- {
- Control::operator=( model3dView );
- }
- return *this;
-}
+Model3dView::Model3dView( Model3dView&& rhs ) = default;
+
+Model3dView& Model3dView::operator=( const Model3dView& model3dView ) = default;
+
+Model3dView& Model3dView::operator=( Model3dView&& rhs ) = default;
Model3dView::~Model3dView()
{
#define DALI_TOOLKIT_MODEL3D_VIEW_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.
Model3dView( const Model3dView& model3dView );
/**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ Model3dView( Model3dView&& rhs );
+
+ /**
* @brief Assignment operator.
* @SINCE_1_1.4
* @param[in] model3dView Handle to an object
Model3dView& operator=( const Model3dView& model3dView );
/**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ Model3dView& operator=( Model3dView&& rhs );
+
+ /**
* @brief Downcasts an Object handle to Model3dView.
*
* If handle points to a Model3dView, the downcast produces valid handle.
/*
- * 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.
{
}
-ProgressBar::ProgressBar( const ProgressBar& handle )
-: Control( handle )
-{
-}
+ProgressBar::ProgressBar( const ProgressBar& handle ) = default;
-ProgressBar& ProgressBar::operator=( const ProgressBar& handle )
-{
- if( &handle != this )
- {
- Control::operator=( handle );
- }
- return *this;
-}
+ProgressBar::ProgressBar( ProgressBar&& rhs ) = default;
+
+ProgressBar& ProgressBar::operator=( const ProgressBar& handle ) = default;
+
+ProgressBar& ProgressBar::operator=( ProgressBar&& rhs ) = default;
ProgressBar::ProgressBar(Internal::ProgressBar& implementation)
: Control(implementation)
#define DALI_TOOLKIT_PROGRESS_BAR_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.
ProgressBar( const ProgressBar& handle );
/**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ ProgressBar( ProgressBar&& rhs );
+
+ /**
* @brief Assignment operator.
*
* Changes this handle to point to another real object.
ProgressBar& operator=( const ProgressBar& handle );
/**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ ProgressBar& operator=( ProgressBar&& rhs );
+
+ /**
* @brief Destructor.
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
/*
- * Copyright (c) 2015 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.
VerifyCustomActorPointer<Internal::ItemView>(internal);
}
-ItemView::ItemView( const ItemView& itemView )
-: Scrollable(itemView)
-{
-}
+ItemView::ItemView( const ItemView& itemView ) = default;
-ItemView& ItemView::operator=( const ItemView& itemView )
-{
- if( &itemView != this )
- {
- Control::operator=( itemView );
- }
- return *this;
-}
+ItemView::ItemView( ItemView&& rhs ) = default;
+
+ItemView& ItemView::operator=( const ItemView& itemView ) = default;
+
+ItemView& ItemView::operator=( ItemView&& rhs ) = default;
ItemView ItemView::New(ItemFactory& factory)
{
#define DALI_TOOLKIT_ITEM_VIEW_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.
ItemView( const ItemView& itemView );
/**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ ItemView( ItemView&& rhs );
+
+ /**
* @brief Assignment operator.
* @SINCE_1_0.0
* @param[in] itemView Handle to an object
ItemView& operator=( const ItemView& itemView );
/**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ ItemView& operator=( ItemView&& rhs );
+
+ /**
* @brief Destructor.
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
/*
- * Copyright (c) 2015 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.
VerifyCustomActorPointer<Internal::ScrollView>(internal);
}
-ScrollView::ScrollView( const ScrollView& handle )
-: Scrollable( handle )
-{
-}
+ScrollView::ScrollView( const ScrollView& handle ) = default;
-ScrollView& ScrollView::operator=( const ScrollView& handle )
-{
- if( &handle != this )
- {
- Control::operator=( handle );
- }
- return *this;
-}
+ScrollView::ScrollView( ScrollView&& rhs ) = default;
+
+ScrollView& ScrollView::operator=( const ScrollView& handle ) = default;
+
+ScrollView& ScrollView::operator=( ScrollView&& rhs ) = default;
ScrollView ScrollView::New()
{
#define DALI_TOOLKIT_SCROLL_VIEW_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.
ScrollView( const ScrollView& handle );
/**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ ScrollView( ScrollView&& rhs );
+
+ /**
* @brief Assignment operator.
*
* Changes this handle to point to another real object.
ScrollView& operator=( const ScrollView& handle );
/**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ ScrollView& operator=( ScrollView&& rhs );
+
+ /**
* @brief Destructor.
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
/*
- * Copyright (c) 2015 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.
VerifyCustomActorPointer<Internal::Scrollable>(internal);
}
-Scrollable::Scrollable( const Scrollable& handle )
-: Control( handle )
-{
-}
+Scrollable::Scrollable( const Scrollable& handle ) = default;
-Scrollable& Scrollable::operator=( const Scrollable& handle )
-{
- if( &handle != this )
- {
- Control::operator=( handle );
- }
- return *this;
-}
+Scrollable::Scrollable( Scrollable&& rhs ) = default;
+
+Scrollable& Scrollable::operator=( const Scrollable& handle ) = default;
+
+Scrollable& Scrollable::operator=( Scrollable&& rhs ) = default;
Scrollable::~Scrollable()
{
#define DALI_TOOLKIT_SCROLLABLE_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.
Scrollable( const Scrollable& handle );
/**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ Scrollable( Scrollable&& rhs );
+
+ /**
* @brief Assignment operator.
*
* Changes this handle to point to another real object.
Scrollable& operator=( const Scrollable& handle );
/**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ Scrollable& operator=( Scrollable&& rhs );
+
+ /**
* @brief Destructor.
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
/*
- * 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.
{
}
-Slider::Slider( const Slider& handle )
-: Control( handle )
-{
-}
+Slider::Slider( const Slider& handle ) = default;
-Slider& Slider::operator=( const Slider& handle )
-{
- if( &handle != this )
- {
- Control::operator=( handle );
- }
- return *this;
-}
+Slider::Slider( Slider&& rhs ) = default;
+
+Slider& Slider::operator=( const Slider& handle ) = default;
+
+Slider& Slider::operator=( Slider&& rhs ) = default;
Slider::Slider(Internal::Slider& implementation)
: Control(implementation)
#define DALI_TOOLKIT_SLIDER_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.
Slider( const Slider& handle );
/**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ Slider( Slider&& rhs );
+
+ /**
* @brief Assignment operator.
*
* Changes this handle to point to another real object.
Slider& operator=( const Slider& handle );
/**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ Slider& operator=( Slider&& rhs );
+
+ /**
* @brief Destructor.
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
/*
- * 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.
{
}
-TextEditor::TextEditor( const TextEditor& handle )
-: Control( handle )
-{
-}
+TextEditor::TextEditor( const TextEditor& handle ) = default;
-TextEditor& TextEditor::operator=( const TextEditor& handle )
-{
- if( &handle != this )
- {
- Control::operator=( handle );
- }
- return *this;
-}
+TextEditor::TextEditor( TextEditor&& rhs ) = default;
+
+TextEditor& TextEditor::operator=( const TextEditor& handle ) = default;
+
+TextEditor& TextEditor::operator=( TextEditor&& rhs ) = default;
TextEditor::~TextEditor()
{
TextEditor( const TextEditor &handle );
/**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ TextEditor( TextEditor&& rhs );
+
+ /**
* @brief Assignment operator.
*
* @SINCE_1_1.37
* @param[in] handle The handle to copy from
* @return A reference to this
*/
- TextEditor&
- operator=( const TextEditor &handle );
+ TextEditor& operator=( const TextEditor &handle );
+
+ /**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ TextEditor& operator=( TextEditor&& rhs );
/**
* @brief Destructor.
/*
- * 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.
{
}
-TextField::TextField( const TextField& handle )
-: Control( handle )
-{
-}
+TextField::TextField( const TextField& handle ) = default;
-TextField& TextField::operator=( const TextField& handle )
-{
- if( &handle != this )
- {
- Control::operator=( handle );
- }
- return *this;
-}
+TextField::TextField( TextField&& rhs ) = default;
+
+TextField& TextField::operator=( const TextField& handle ) = default;
+
+TextField& TextField::operator=( TextField&& rhs ) = default;
TextField::~TextField()
{
TextField( const TextField& handle );
/**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ TextField( TextField&& rhs );
+
+ /**
* @brief Assignment operator.
*
* @SINCE_1_0.0
TextField& operator=( const TextField& handle );
/**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ TextField& operator=( TextField&& rhs );
+
+ /**
* @brief Destructor.
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
/*
- * Copyright (c) 2015 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.
{
}
-TextLabel::TextLabel( const TextLabel& handle )
-: Control( handle )
-{
-}
+TextLabel::TextLabel( const TextLabel& handle ) = default;
-TextLabel& TextLabel::operator=( const TextLabel& handle )
-{
- if( &handle != this )
- {
- Control::operator=( handle );
- }
- return *this;
-}
+TextLabel::TextLabel( TextLabel&& rhs ) = default;
+
+TextLabel& TextLabel::operator=( const TextLabel& handle ) = default;
+
+TextLabel& TextLabel::operator=( TextLabel&& rhs ) = default;
TextLabel::~TextLabel()
{
TextLabel( const TextLabel& handle );
/**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ TextLabel( TextLabel&& rhs );
+
+ /**
* @brief Assignment operator.
*
* @SINCE_1_0.0
TextLabel& operator=( const TextLabel& handle );
/**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ TextLabel& operator=( TextLabel&& rhs );
+
+ /**
* @brief Destructor.
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
/*
- * 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.
{
}
-VideoView::VideoView( const VideoView& videoView )
-: Control( videoView )
-{
-}
+VideoView::VideoView( const VideoView& videoView ) = default;
-VideoView& VideoView::operator=( const VideoView& videoView )
-{
- if( &videoView != this )
- {
- Control::operator=( videoView );
- }
+VideoView::VideoView( VideoView&& rhs ) = default;
- return *this;
-}
+VideoView& VideoView::operator=( const VideoView& videoView ) = default;
+
+VideoView& VideoView::operator=( VideoView&& rhs ) = default;
VideoView::~VideoView()
{
#define DALI_TOOLKIT_VIDEO_VIEW_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.
VideoView( const VideoView& videoView );
/**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ VideoView( VideoView&& rhs );
+
+ /**
* @brief Assignment operator.
*
* @SINCE_1_1.38
VideoView& operator=( const VideoView& videoView );
/**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ VideoView& operator=( VideoView&& rhs );
+
+ /**
* @brief Downcasts a handle to VideoView handle.
*
* If handle points to a VideoView, the downcast produces valid handle.
/*
- * 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.
{
}
-AsyncImageLoader::AsyncImageLoader( const AsyncImageLoader& handle )
-: BaseHandle( handle )
-{
-}
+AsyncImageLoader::AsyncImageLoader( const AsyncImageLoader& handle ) = default;
-AsyncImageLoader& AsyncImageLoader::operator=( const AsyncImageLoader& handle )
-{
- BaseHandle::operator=( handle );
- return *this;
-}
+AsyncImageLoader::AsyncImageLoader( AsyncImageLoader&& rhs ) = default;
+
+AsyncImageLoader& AsyncImageLoader::operator=( const AsyncImageLoader& handle ) = default;
+
+AsyncImageLoader& AsyncImageLoader::operator=( AsyncImageLoader&& rhs ) = default;
AsyncImageLoader AsyncImageLoader::DownCast( BaseHandle handle )
{
#define DALI_TOOLKIT_ASYNC_IMAGE_LOADER_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.
AsyncImageLoader( const AsyncImageLoader& handle );
/**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ AsyncImageLoader( AsyncImageLoader&& rhs );
+
+ /**
* @brief This assignment operator is required for (smart) pointer semantics.
* @SINCE_1_2_14
*
AsyncImageLoader& operator=( const AsyncImageLoader& handle );
/**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ AsyncImageLoader& operator=( AsyncImageLoader&& rhs );
+
+ /**
* @brief Creates a new loader to load the image asynchronously in a worker thread.
* @SINCE_1_2_14
*