Add move semantics to commonly used classes in dali-core 79/239279/2
authorRichard Huang <r.huang@samsung.com>
Thu, 23 Jul 2020 08:46:20 +0000 (09:46 +0100)
committerRichard Huang <r.huang@samsung.com>
Thu, 23 Jul 2020 10:38:11 +0000 (11:38 +0100)
Change-Id: I8f3fc7ea426cc8e431b3675bd90360e5ef2e27c8

79 files changed:
automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.h
automated-tests/src/dali/utc-Dali-Actor.cpp
automated-tests/src/dali/utc-Dali-Animation.cpp
automated-tests/src/dali/utc-Dali-BaseHandle.cpp
automated-tests/src/dali/utc-Dali-Constrainer.cpp
automated-tests/src/dali/utc-Dali-Constraint.cpp
automated-tests/src/dali/utc-Dali-CustomActor.cpp
automated-tests/src/dali/utc-Dali-FrameBuffer.cpp
automated-tests/src/dali/utc-Dali-Geometry.cpp
automated-tests/src/dali/utc-Dali-Handle.cpp
automated-tests/src/dali/utc-Dali-Layer.cpp
automated-tests/src/dali/utc-Dali-ObjectRegistry.cpp
automated-tests/src/dali/utc-Dali-Path.cpp
automated-tests/src/dali/utc-Dali-PixelData.cpp
automated-tests/src/dali/utc-Dali-PropertyBuffer.cpp
automated-tests/src/dali/utc-Dali-PropertyNotification.cpp
automated-tests/src/dali/utc-Dali-RenderTask.cpp
automated-tests/src/dali/utc-Dali-RenderTaskList.cpp
automated-tests/src/dali/utc-Dali-Renderer.cpp
automated-tests/src/dali/utc-Dali-Sampler.cpp
automated-tests/src/dali/utc-Dali-Shader.cpp
automated-tests/src/dali/utc-Dali-Texture.cpp
automated-tests/src/dali/utc-Dali-TextureSet.cpp
automated-tests/src/dali/utc-Dali-TypeRegistry.cpp
automated-tests/src/dali/utc-Dali-WeakHandle.cpp
dali/public-api/actors/actor.cpp
dali/public-api/actors/actor.h
dali/public-api/actors/custom-actor.cpp
dali/public-api/actors/custom-actor.h
dali/public-api/actors/layer.cpp
dali/public-api/actors/layer.h
dali/public-api/animation/animation.cpp
dali/public-api/animation/animation.h
dali/public-api/animation/constraint.cpp
dali/public-api/animation/constraint.h
dali/public-api/animation/key-frames.cpp
dali/public-api/animation/key-frames.h
dali/public-api/animation/linear-constrainer.cpp
dali/public-api/animation/linear-constrainer.h
dali/public-api/animation/path.cpp
dali/public-api/animation/path.h
dali/public-api/images/pixel-data.cpp
dali/public-api/images/pixel-data.h
dali/public-api/object/base-handle.cpp
dali/public-api/object/base-handle.h
dali/public-api/object/handle.cpp
dali/public-api/object/handle.h
dali/public-api/object/object-registry.cpp
dali/public-api/object/object-registry.h
dali/public-api/object/property-conditions.cpp
dali/public-api/object/property-conditions.h
dali/public-api/object/property-notification.cpp
dali/public-api/object/property-notification.h
dali/public-api/object/type-info.cpp
dali/public-api/object/type-info.h
dali/public-api/object/type-registry.cpp
dali/public-api/object/type-registry.h
dali/public-api/object/weak-handle.cpp
dali/public-api/object/weak-handle.h
dali/public-api/render-tasks/render-task-list.cpp
dali/public-api/render-tasks/render-task-list.h
dali/public-api/render-tasks/render-task.cpp
dali/public-api/render-tasks/render-task.h
dali/public-api/rendering/frame-buffer.cpp
dali/public-api/rendering/frame-buffer.h
dali/public-api/rendering/geometry.cpp
dali/public-api/rendering/geometry.h
dali/public-api/rendering/property-buffer.cpp
dali/public-api/rendering/property-buffer.h
dali/public-api/rendering/renderer.cpp
dali/public-api/rendering/renderer.h
dali/public-api/rendering/sampler.cpp
dali/public-api/rendering/sampler.h
dali/public-api/rendering/shader.cpp
dali/public-api/rendering/shader.h
dali/public-api/rendering/texture-set.cpp
dali/public-api/rendering/texture-set.h
dali/public-api/rendering/texture.cpp
dali/public-api/rendering/texture.h

index 8a94e49..ee2397e 100644 (file)
@@ -1,6 +1,23 @@
 #ifndef TEST_CUSTOM_ACTOR_H
 #define TEST_CUSTOM_ACTOR_H
 
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
 #include <dali/public-api/dali-core.h>
 #include <dali/devel-api/object/property-helper-devel.h>
 #include <dali/integration-api/scene.h>
@@ -52,6 +69,9 @@ public:
   virtual ~TestCustomActor();
   Impl::TestCustomActor& GetImpl();
 
+  TestCustomActor( TestCustomActor&& rhs ) = default;
+  TestCustomActor& operator=( TestCustomActor&& rhs ) = default;
+
   std::vector< std::string >& GetMethodsCalled();
   void ResetCallStack();
   void SetDaliProperty(std::string s);
index 676eba1..d08f8f7 100644 (file)
@@ -323,6 +323,41 @@ int UtcDaliActorDownCastN(void)
   END_TEST;
 }
 
+int UtcDaliActorMoveConstructor(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+  DALI_TEST_CHECK( actor );
+
+  int id = actor.GetProperty< int >( Actor::Property::ID );
+
+  Actor moved = std::move( actor);
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( id, moved.GetProperty< int >( Actor::Property::ID ), TEST_LOCATION );
+  DALI_TEST_CHECK( !actor );
+
+  END_TEST;
+}
+
+int UtcDaliActorMoveAssignment(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+  DALI_TEST_CHECK( actor );
+
+  int id = actor.GetProperty< int >( Actor::Property::ID );
+
+  Actor moved;
+  moved = std::move( actor);
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( id, moved.GetProperty< int >( Actor::Property::ID ), TEST_LOCATION );
+  DALI_TEST_CHECK( !actor );
+
+  END_TEST;
+}
+
 //& purpose: Testing Dali::Actor::GetName()
 int UtcDaliActorGetName(void)
 {
index 2f9a3ae..659b83f 100644 (file)
@@ -235,6 +235,82 @@ int UtcDaliAnimationAssignmentOperatorP(void)
   END_TEST;
 }
 
+int UtcDaliAnimationMoveConstructor(void)
+{
+  TestApplication application;
+
+  //Animation
+
+  Animation animation = Animation::New( 1.0f );
+  DALI_TEST_CHECK( animation );
+  DALI_TEST_EQUALS( 1, animation.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 1.0f, animation.GetDuration(), 0.001f, TEST_LOCATION );
+
+  Animation movedAnimation = std::move( animation );
+  DALI_TEST_CHECK( movedAnimation );
+  DALI_TEST_EQUALS( 1, movedAnimation.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 1.0f, movedAnimation.GetDuration(), 0.001f, TEST_LOCATION );
+  DALI_TEST_CHECK( !animation );
+
+  // KeyFrames
+
+  KeyFrames keyframes = KeyFrames::New();
+  DALI_TEST_CHECK( keyframes );
+  DALI_TEST_EQUALS( 1, keyframes.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( Property::Type::NONE, keyframes.GetType(), TEST_LOCATION );
+
+  keyframes.Add( 0.0f, Vector3( 0.0f, 0.0f, 0.0f ) );
+  keyframes.Add( 1.0f, Vector3( 100.0f, 100.0f, 100.0f ) );
+  DALI_TEST_EQUALS( Property::Type::VECTOR3, keyframes.GetType(), TEST_LOCATION );
+
+  KeyFrames movedKeyFrames = std::move( keyframes );
+  DALI_TEST_CHECK( movedKeyFrames );
+  DALI_TEST_EQUALS( 1, movedKeyFrames.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( Property::Type::VECTOR3, movedKeyFrames.GetType(), TEST_LOCATION );
+  DALI_TEST_CHECK( !keyframes );
+
+  END_TEST;
+}
+
+int UtcDaliAnimationMoveAssignment(void)
+{
+  TestApplication application;
+
+  // Animation
+
+  Animation animation = Animation::New( 1.0f );
+  DALI_TEST_CHECK( animation );
+  DALI_TEST_EQUALS( 1, animation.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 1.0f, animation.GetDuration(), 0.001f, TEST_LOCATION );
+
+  Animation move;
+  move = std::move( animation );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 1.0f, move.GetDuration(), 0.001f, TEST_LOCATION );
+  DALI_TEST_CHECK( !animation );
+
+  // KeyFrames
+
+  KeyFrames keyframes = KeyFrames::New();
+  DALI_TEST_CHECK( keyframes );
+  DALI_TEST_EQUALS( 1, keyframes.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( Property::Type::NONE, keyframes.GetType(), TEST_LOCATION );
+
+  keyframes.Add( 0.0f, Vector3( 0.0f, 0.0f, 0.0f ) );
+  keyframes.Add( 1.0f, Vector3( 100.0f, 100.0f, 100.0f ) );
+  DALI_TEST_EQUALS( Property::Type::VECTOR3, keyframes.GetType(), TEST_LOCATION );
+
+  KeyFrames movedKeyFrames;
+  movedKeyFrames = std::move( keyframes );
+  DALI_TEST_CHECK( movedKeyFrames );
+  DALI_TEST_EQUALS( 1, movedKeyFrames.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( Property::Type::VECTOR3, movedKeyFrames.GetType(), TEST_LOCATION );
+  DALI_TEST_CHECK( !keyframes );
+
+  END_TEST;
+}
+
 int UtcDaliAnimationSetDurationP(void)
 {
   TestApplication application;
index a60fcb1..f147800 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 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.
@@ -184,6 +184,53 @@ int UtcDaliBaseHandleAssignmentOperator(void)
   END_TEST;
 }
 
+int UtcDaliBaseHandleMoveConstructor(void)
+{
+  TestApplication application;
+
+  // Initialize an object, ref count == 1
+  BaseHandle object = Actor::New();
+
+  DALI_TEST_EQUALS( 1, object.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  // Move the object, ref count == 1
+  BaseHandle move = std::move( object );
+  DALI_TEST_CHECK( move );
+
+  // Check that object is moved (not copied, so ref count keeps the same)
+  if ( move )
+  {
+    DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  }
+  DALI_TEST_CHECK( !object );
+
+  END_TEST;
+}
+
+int UtcDaliBaseHandleMoveAssignment(void)
+{
+  TestApplication application;
+
+  // Initialize an object, ref count == 1
+  BaseHandle object = Actor::New();
+
+  DALI_TEST_EQUALS( 1, object.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  // Move the object, ref count == 1
+  BaseHandle move;
+  move = std::move( object );
+  DALI_TEST_CHECK( move );
+
+  // Check that object is moved (not copied, so ref count keeps the same)
+  if ( move )
+  {
+    DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  }
+  DALI_TEST_CHECK( !object );
+
+  END_TEST;
+}
+
 int UtcDaliBaseHandleGetBaseObject(void)
 {
   TestApplication application;
index b413783..1e96dc3 100644 (file)
@@ -72,6 +72,25 @@ static void SetupLinearConstrainerUniformProgress( Dali::LinearConstrainer& line
   linearConstrainer.SetProperty( Dali::LinearConstrainer::Property::VALUE, points );
 }
 
+static void VerifyLinearConstrainerUniformProgress( Dali::LinearConstrainer& linearConstrainer )
+{
+  Dali::Property::Array points;
+  points.Resize(3);
+  points[0] = 0.0f;
+  points[1] = 1.0f;
+  points[2] = 0.0f;
+
+  Property::Value value = linearConstrainer.GetProperty( Dali::LinearConstrainer::Property::VALUE );
+  Property::Array* array = value.GetArray();
+  DALI_TEST_CHECK( array );
+
+  const unsigned int noOfPoints = points.Size();
+  for( unsigned int i = 0; i < noOfPoints; ++i )
+  {
+    DALI_TEST_EQUALS( ( *array )[i].Get< float >(), points[i].Get< float >(), TEST_LOCATION );
+  }
+}
+
 static void SetupLinearConstrainerNonUniformProgress( Dali::LinearConstrainer& linearConstrainer)
 {
   Dali::Property::Array points;
@@ -424,6 +443,47 @@ int UtcLinearConstrainerCopyConstructor(void)
   END_TEST;
 }
 
+int UtcLinearConstrainerMoveConstructor(void)
+{
+  TestApplication application;
+
+  Dali::LinearConstrainer linearConstrainer = Dali::LinearConstrainer::New();
+  DALI_TEST_CHECK( linearConstrainer );
+  DALI_TEST_EQUALS( 1, linearConstrainer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  SetupLinearConstrainerUniformProgress( linearConstrainer );
+  VerifyLinearConstrainerUniformProgress( linearConstrainer );
+
+  Dali::LinearConstrainer moved = std::move( linearConstrainer );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  VerifyLinearConstrainerUniformProgress( moved );
+  DALI_TEST_CHECK( !linearConstrainer );
+
+  END_TEST;
+}
+
+int UtcLinearConstrainerMoveAssignment(void)
+{
+  TestApplication application;
+
+  Dali::LinearConstrainer linearConstrainer = Dali::LinearConstrainer::New();
+  DALI_TEST_CHECK( linearConstrainer );
+  DALI_TEST_EQUALS( 1, linearConstrainer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  SetupLinearConstrainerUniformProgress( linearConstrainer );
+  VerifyLinearConstrainerUniformProgress( linearConstrainer );
+
+  Dali::LinearConstrainer moved;
+  moved = std::move( linearConstrainer );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  VerifyLinearConstrainerUniformProgress( moved );
+  DALI_TEST_CHECK( !linearConstrainer );
+
+  END_TEST;
+}
+
 int UtcLinearConstrainerApply(void)
 {
   TestApplication application;
index 0bf072e..86b3f15 100644 (file)
@@ -528,6 +528,53 @@ int UtcDaliConstraintCopyAndAssignment(void)
 }
 ///////////////////////////////////////////////////////////////////////////////
 
+int UtcDaliConstraintMoveConstructor(void)
+{
+  // Ensure copy constructor & assignment operators work
+
+  TestApplication application;
+
+  Actor actor = Actor::New();
+  application.GetScene().Add( actor );
+
+  Constraint constraint = Constraint::New< Vector3 >( actor, Actor::Property::POSITION, &BasicFunction< Vector3 > );
+  DALI_TEST_CHECK( constraint );
+  DALI_TEST_EQUALS( 1, constraint.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( constraint.GetTargetObject() == actor );
+
+  Constraint moved = std::move( constraint );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( moved.GetTargetObject() == actor );
+  DALI_TEST_CHECK( !constraint );
+
+  END_TEST;
+}
+
+int UtcDaliConstraintMoveAssignment(void)
+{
+  // Ensure copy constructor & assignment operators work
+
+  TestApplication application;
+
+  Actor actor = Actor::New();
+  application.GetScene().Add( actor );
+
+  Constraint constraint = Constraint::New< Vector3 >( actor, Actor::Property::POSITION, &BasicFunction< Vector3 > );
+  DALI_TEST_CHECK( constraint );
+  DALI_TEST_EQUALS( 1, constraint.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( constraint.GetTargetObject() == actor );
+
+  Constraint moved;
+  moved = std::move( constraint );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( moved.GetTargetObject() == actor );
+  DALI_TEST_CHECK( !constraint );
+
+  END_TEST;
+}
+
 ///////////////////////////////////////////////////////////////////////////////
 // Constraint::DownCast
 ///////////////////////////////////////////////////////////////////////////////
index 8a0ec2c..4bcfd3a 100644 (file)
@@ -113,6 +113,45 @@ int UtcDaliCustomActorDownCastNegative(void)
   END_TEST;
 }
 
+int UtcDaliCustomActorMoveConstructor(void)
+{
+  TestApplication application;
+
+  Test::TestCustomActor custom = Test::TestCustomActor::New();
+  DALI_TEST_CHECK( custom );
+  DALI_TEST_EQUALS( 1, custom.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  int id = custom.GetProperty< int >( Actor::Property::ID );
+
+  Test::TestCustomActor moved = std::move( custom );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( id, moved.GetProperty< int >( Actor::Property::ID ), TEST_LOCATION );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( !custom );
+
+  END_TEST;
+}
+
+int UtcDaliCustomActorMoveAssignment(void)
+{
+  TestApplication application;
+
+  Test::TestCustomActor custom = Test::TestCustomActor::New();
+  DALI_TEST_CHECK( custom );
+  DALI_TEST_EQUALS( 1, custom.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  int id = custom.GetProperty< int >( Actor::Property::ID );
+
+  Test::TestCustomActor moved;
+  moved = std::move( custom );
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( id, moved.GetProperty< int >( Actor::Property::ID ), TEST_LOCATION );
+  DALI_TEST_EQUALS( 1, moved.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( !custom );
+
+  END_TEST;
+}
+
 int UtcDaliCustomActorOnStageConnectionDisconnection(void)
 {
   TestApplication application;
index 8ae9f0a..69d703b 100644 (file)
@@ -253,6 +253,53 @@ int UtcDaliFrameBufferAssignmentOperator(void)
   END_TEST;
 }
 
+int UtcDaliFrameBufferMoveConstructor(void)
+{
+  TestApplication application;
+
+  uint32_t width = 64;
+  uint32_t height = 64;
+  FrameBuffer frameBuffer = FrameBuffer::New( width, height, FrameBuffer::Attachment::DEPTH_STENCIL );
+  DALI_TEST_CHECK( frameBuffer );
+  DALI_TEST_EQUALS( 1, frameBuffer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, width, height );
+  frameBuffer.AttachColorTexture( texture );
+  DALI_TEST_EQUALS( frameBuffer.GetColorTexture(), texture, TEST_LOCATION );
+
+  FrameBuffer move = std::move( frameBuffer );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetColorTexture(), texture, TEST_LOCATION );
+  DALI_TEST_CHECK( !frameBuffer );
+
+  END_TEST;
+}
+
+int UtcDaliFrameBufferMoveAssignment(void)
+{
+  TestApplication application;
+
+  uint32_t width = 64;
+  uint32_t height = 64;
+  FrameBuffer frameBuffer = FrameBuffer::New( width, height, FrameBuffer::Attachment::DEPTH_STENCIL );
+  DALI_TEST_CHECK( frameBuffer );
+  DALI_TEST_EQUALS( 1, frameBuffer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, width, height );
+  frameBuffer.AttachColorTexture( texture );
+  DALI_TEST_EQUALS( frameBuffer.GetColorTexture(), texture, TEST_LOCATION );
+
+  FrameBuffer move;
+  move = std::move( frameBuffer );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetColorTexture(), texture, TEST_LOCATION );
+  DALI_TEST_CHECK( !frameBuffer );
+
+  END_TEST;
+}
+
 int UtcDaliFrameBufferDownCast01(void)
 {
   TestApplication application;
index dfd1f39..2b7b381 100644 (file)
@@ -105,6 +105,51 @@ int UtcDaliGeometryAssignmentOperator(void)
   END_TEST;
 }
 
+int UtcDaliGeometryMoveConstructor(void)
+{
+  TestApplication application;
+
+  Geometry geometry = Geometry::New();
+  DALI_TEST_CHECK( geometry );
+  DALI_TEST_EQUALS( 1, geometry.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 0u, geometry.GetNumberOfVertexBuffers(), TEST_LOCATION );
+
+  PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
+  geometry.AddVertexBuffer( vertexBuffer );
+  DALI_TEST_EQUALS( 1u, geometry.GetNumberOfVertexBuffers(), TEST_LOCATION );
+
+  Geometry move = std::move( geometry );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 1u, move.GetNumberOfVertexBuffers(), TEST_LOCATION );
+  DALI_TEST_CHECK( !geometry );
+
+  END_TEST;
+}
+
+int UtcDaliGeometryMoveAssignment(void)
+{
+  TestApplication application;
+
+  Geometry geometry = Geometry::New();
+  DALI_TEST_CHECK( geometry );
+  DALI_TEST_EQUALS( 1, geometry.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 0u, geometry.GetNumberOfVertexBuffers(), TEST_LOCATION );
+
+  PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
+  geometry.AddVertexBuffer( vertexBuffer );
+  DALI_TEST_EQUALS( 1u, geometry.GetNumberOfVertexBuffers(), TEST_LOCATION );
+
+  Geometry move;
+  move = std::move( geometry );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 1u, move.GetNumberOfVertexBuffers(), TEST_LOCATION );
+  DALI_TEST_CHECK( !geometry );
+
+  END_TEST;
+}
+
 int UtcDaliGeometryDownCast01(void)
 {
   TestApplication application;
index d6a6e49..7a21a9e 100644 (file)
@@ -135,6 +135,57 @@ int UtcDaliHandleAssignmentOperator(void)
   END_TEST;
 }
 
+int UtcDaliHandleMoveConstructor(void)
+{
+  TestApplication application;
+
+  // Initialize a handle, ref count == 1
+  Handle handle = Actor::New();
+
+  DALI_TEST_EQUALS( 1, handle.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  int value( 20 );
+  Property::Index index = handle.RegisterProperty( "customProperty",  value );
+  DALI_TEST_CHECK( handle.GetProperty<int>( index ) == value );
+
+  // Move the object, ref count == 1
+  Handle move = std::move( handle );
+  DALI_TEST_CHECK( move );
+
+  // Check that object is moved (not copied, so ref count keeps the same)
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( move.GetProperty<int>( index ) == value );
+  DALI_TEST_CHECK( !handle );
+
+  END_TEST;
+}
+
+int UtcDaliHandleMoveAssignment(void)
+{
+  TestApplication application;
+
+  // Initialize a handle, ref count == 1
+  Handle handle = Actor::New();
+
+  DALI_TEST_EQUALS( 1, handle.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  int value( 20 );
+  Property::Index index = handle.RegisterProperty( "customProperty",  value );
+  DALI_TEST_CHECK( handle.GetProperty<int>( index ) == value );
+
+  // Move the object, ref count == 1
+  Handle move;
+  move = std::move( handle );
+  DALI_TEST_CHECK( move );
+
+  // Check that object is moved (not copied, so ref count keeps the same)
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( move.GetProperty<int>( index ) == value );
+  DALI_TEST_CHECK( !handle );
+
+  END_TEST;
+}
+
 int UtcDaliHandleSupports(void)
 {
   tet_infoline("Positive Test Dali::Handle::Supports()");
index 6ab1dc1..35637cf 100644 (file)
@@ -80,6 +80,48 @@ int UtcDaliLayerDownCast2(void)
   END_TEST;
 }
 
+int UtcDaliLayerMoveConstructor(void)
+{
+  TestApplication application;
+  Layer layer = Layer::New();
+  DALI_TEST_CHECK( layer );
+  DALI_TEST_EQUALS( 1, layer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 0, layer.GetProperty< int >( Layer::Property::DEPTH ), TEST_LOCATION );
+
+  application.GetScene().Add( layer );
+  DALI_TEST_EQUALS( 2, layer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 1, layer.GetProperty< int >( Layer::Property::DEPTH ), TEST_LOCATION );
+
+  Layer move = std::move( layer );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 2, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 1, move.GetProperty< int >( Layer::Property::DEPTH ), TEST_LOCATION );
+  DALI_TEST_CHECK( !layer );
+
+  END_TEST;
+}
+
+int UtcDaliLayerMoveAssignment(void)
+{
+  TestApplication application;
+  Layer layer = Layer::New();
+  DALI_TEST_CHECK( layer );
+  DALI_TEST_EQUALS( 1, layer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 0, layer.GetProperty< int >( Layer::Property::DEPTH ), TEST_LOCATION );
+
+  application.GetScene().Add( layer );
+  DALI_TEST_EQUALS( 2, layer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 1, layer.GetProperty< int >( Layer::Property::DEPTH ), TEST_LOCATION );
+
+  Layer move;
+  move = std::move( layer );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 2, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 1, move.GetProperty< int >( Layer::Property::DEPTH ), TEST_LOCATION );
+  DALI_TEST_CHECK( !layer );
+
+  END_TEST;
+}
 
 int UtcDaliLayerGetDepth(void)
 {
index b65703d..fd18ba3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 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.
@@ -148,6 +148,43 @@ int UtcDaliObjectRegistryCopyConstructor(void)
   END_TEST;
 }
 
+int UtcDaliObjectRegistryMoveConstructor(void)
+{
+  TestApplication application;
+
+  ObjectRegistry registry = application.GetCore().GetObjectRegistry();
+  DALI_TEST_CHECK( registry );
+  DALI_TEST_EQUALS( 2, registry.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  ObjectRegistry move = std::move( registry );
+  DALI_TEST_CHECK( move );
+
+  // Check that object is moved (not copied, so ref count keeps the same)
+  DALI_TEST_EQUALS( 2, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( !registry );
+
+  END_TEST;
+}
+
+int UtcDaliObjectRegistryMoveAssignment(void)
+{
+  TestApplication application;
+
+  ObjectRegistry registry = application.GetCore().GetObjectRegistry();
+  DALI_TEST_CHECK( registry );
+  DALI_TEST_EQUALS( 2, registry.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  ObjectRegistry move;
+  move = std::move( registry );
+  DALI_TEST_CHECK( move );
+
+  // Check that object is moved (not copied, so ref count keeps the same)
+  DALI_TEST_EQUALS( 2, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( !registry );
+
+  END_TEST;
+}
+
 int UtcDaliObjectRegistrySignalActorCreated(void)
 {
   tet_infoline("Testing GetObjectRegistry()");
index be13ee8..c87a35c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -501,3 +501,43 @@ int UtcDaliPathRegisterProperty(void)
   END_TEST;
 }
 
+int UtcDaliPathMoveConstrcutor(void)
+{
+  TestApplication application;
+
+  Dali::Path path = Dali::Path::New();
+  DALI_TEST_CHECK( path );
+  DALI_TEST_EQUALS( 1, path.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  path.AddPoint(Vector3( 50.0,  50.0, 0.0));
+  DALI_TEST_EQUALS( path.GetPoint(0), Vector3( 50.0,  50.0, 0.0), TEST_LOCATION );
+
+  Dali::Path move = std::move( path );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetPoint(0), Vector3( 50.0,  50.0, 0.0), TEST_LOCATION );
+  DALI_TEST_CHECK( !path );
+
+  END_TEST;
+}
+
+int UtcDaliPathMoveAssignment(void)
+{
+  TestApplication application;
+
+  Dali::Path path = Dali::Path::New();
+  DALI_TEST_CHECK( path );
+  DALI_TEST_EQUALS( 1, path.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  path.AddPoint(Vector3( 50.0,  50.0, 0.0));
+  DALI_TEST_EQUALS( path.GetPoint(0), Vector3( 50.0,  50.0, 0.0), TEST_LOCATION );
+
+  Dali::Path move;
+  move = std::move( path );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetPoint(0), Vector3( 50.0,  50.0, 0.0), TEST_LOCATION );
+  DALI_TEST_CHECK( !path );
+
+  END_TEST;
+}
index 6151545..2a50a5c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -98,3 +98,49 @@ int UtcDaliPixelDataAssignmentOperator(void)
   END_TEST;
 }
 
+int UtcDaliPixelDataMoveConstructor(void)
+{
+  TestApplication application;
+
+  unsigned int width = 10u;
+  unsigned int height = 10u;
+  unsigned int bufferSize = width*height*Pixel::GetBytesPerPixel( Pixel::L8 );
+  unsigned char* buffer = new unsigned char [ bufferSize ];
+
+  PixelData pixelData = PixelData::New( buffer, bufferSize, width, height, Pixel::L8, PixelData::DELETE_ARRAY );
+  DALI_TEST_CHECK( pixelData );
+  DALI_TEST_EQUALS( width, pixelData.GetWidth(), TEST_LOCATION );
+  DALI_TEST_EQUALS( height, pixelData.GetHeight(), TEST_LOCATION );
+
+  PixelData moved = std::move( pixelData);
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( width, moved.GetWidth(), TEST_LOCATION );
+  DALI_TEST_EQUALS( height, moved.GetHeight(), TEST_LOCATION );
+  DALI_TEST_CHECK( !pixelData );
+
+  END_TEST;
+}
+
+int UtcDaliPixelDataMoveAssignment(void)
+{
+  TestApplication application;
+
+  unsigned int width = 10u;
+  unsigned int height = 10u;
+  unsigned int bufferSize = width*height*Pixel::GetBytesPerPixel( Pixel::L8 );
+  unsigned char* buffer = new unsigned char [ bufferSize ];
+
+  PixelData pixelData = PixelData::New( buffer, bufferSize, width, height, Pixel::L8, PixelData::DELETE_ARRAY );
+  DALI_TEST_CHECK( pixelData );
+  DALI_TEST_EQUALS( width, pixelData.GetWidth(), TEST_LOCATION );
+  DALI_TEST_EQUALS( height, pixelData.GetHeight(), TEST_LOCATION );
+
+  PixelData moved;
+  moved = std::move( pixelData);
+  DALI_TEST_CHECK( moved );
+  DALI_TEST_EQUALS( width, moved.GetWidth(), TEST_LOCATION );
+  DALI_TEST_EQUALS( height, moved.GetHeight(), TEST_LOCATION );
+  DALI_TEST_CHECK( !pixelData );
+
+  END_TEST;
+}
index e2b2689..599d73a 100644 (file)
@@ -110,6 +110,43 @@ int UtcDaliPropertyBufferAssignmentOperator(void)
   END_TEST;
 }
 
+int UtcDaliPropertyBufferMoveConstructor(void)
+{
+  TestApplication application;
+
+  PropertyBuffer propertyBuffer = CreatePropertyBuffer();
+  DALI_TEST_CHECK( propertyBuffer );
+  DALI_TEST_EQUALS( 1, propertyBuffer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 0u, propertyBuffer.GetSize(), TEST_LOCATION );
+
+  PropertyBuffer move = std::move( propertyBuffer );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 0u, move.GetSize(), TEST_LOCATION );
+  DALI_TEST_CHECK( !propertyBuffer );
+
+  END_TEST;
+}
+
+int UtcDaliPropertyBufferMoveAssignment(void)
+{
+  TestApplication application;
+
+  PropertyBuffer propertyBuffer = CreatePropertyBuffer();
+  DALI_TEST_CHECK( propertyBuffer );
+  DALI_TEST_EQUALS( 1, propertyBuffer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 0u, propertyBuffer.GetSize(), TEST_LOCATION );
+
+  PropertyBuffer move;
+  move = std::move( propertyBuffer );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 0u, move.GetSize(), TEST_LOCATION );
+  DALI_TEST_CHECK( !propertyBuffer );
+
+  END_TEST;
+}
+
 int UtcDaliPropertyBufferSetData01(void)
 {
   TestApplication application;
index 2bd3c58..67d2e4e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 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.
@@ -162,6 +162,74 @@ int UtcDaliPropertyNotificationDownCastNegative(void)
   END_TEST;
 }
 
+int UtcDaliPropertyNotificationMoveConstructor(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+
+  PropertyNotification notification = actor.AddPropertyNotification(Actor::Property::POSITION_X, GreaterThanCondition(100.0f));
+  DALI_TEST_CHECK( notification );
+  DALI_TEST_EQUALS( 2, notification.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  PropertyNotification movedNotification = std::move( notification );
+  DALI_TEST_CHECK( movedNotification );
+
+  // Check that object is moved (not copied, so ref count keeps the same)
+  DALI_TEST_EQUALS( 2, movedNotification.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( !notification );
+
+  PropertyCondition condition = movedNotification.GetCondition();
+  DALI_TEST_CHECK( condition );
+  DALI_TEST_EQUALS( 2, condition.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 1, condition.GetArgumentCount(), TEST_LOCATION );
+
+  PropertyCondition movedCondition = std::move( condition );
+  DALI_TEST_CHECK( movedCondition );
+
+  // Check that object is moved (not copied, so ref count keeps the same)
+  DALI_TEST_EQUALS( 2, movedCondition.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 1, movedCondition.GetArgumentCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( !condition );
+
+  END_TEST;
+}
+
+int UtcDaliPropertyNotificationMoveAssignment(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+
+  PropertyNotification notification = actor.AddPropertyNotification(Actor::Property::POSITION_X, GreaterThanCondition(100.0f));
+  DALI_TEST_CHECK( notification );
+  DALI_TEST_EQUALS( 2, notification.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  PropertyNotification movedNotification;
+  movedNotification = std::move( notification );
+  DALI_TEST_CHECK( movedNotification );
+
+  // Check that object is moved (not copied, so ref count keeps the same)
+  DALI_TEST_EQUALS( 2, movedNotification.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( !notification );
+
+  PropertyCondition condition = movedNotification.GetCondition();
+  DALI_TEST_CHECK( condition );
+  DALI_TEST_EQUALS( 2, condition.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 1, condition.GetArgumentCount(), TEST_LOCATION );
+
+  PropertyCondition movedCondition;
+  movedCondition = std::move( condition );
+  DALI_TEST_CHECK( movedCondition );
+
+  // Check that object is moved (not copied, so ref count keeps the same)
+  DALI_TEST_EQUALS( 2, movedCondition.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 1, movedCondition.GetArgumentCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( !condition );
+
+  END_TEST;
+}
+
 int UtcDaliAddPropertyNotification(void)
 {
   TestApplication application; // Reset all test adapter return codes
index c0b7219..17e96d1 100644 (file)
@@ -2795,3 +2795,60 @@ int UtcDaliRenderTaskSetClearEnabled(void)
 
   END_TEST;
 }
+
+int UtcDaliRenderTaskMoveConstrctor(void)
+{
+  TestApplication application;
+
+  Vector4 testColor( 1.0f, 2.0f, 3.0f, 4.0f );
+
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
+  RenderTask task = taskList.GetTask( 0u );
+  DALI_TEST_CHECK( task );
+  DALI_TEST_EQUALS( 2, task.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( task.GetClearColor() != testColor );
+
+  task.SetClearColor( testColor );
+
+  // Wait a frame.
+  Wait(application);
+
+  DALI_TEST_EQUALS( task.GetClearColor(), testColor, TEST_LOCATION );
+
+  RenderTask move = std::move( task );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 2, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetClearColor(), testColor, TEST_LOCATION );
+  DALI_TEST_CHECK( !task );
+
+  END_TEST;
+}
+
+int UtcDaliRenderTaskMoveAssignment(void)
+{
+  TestApplication application;
+
+  Vector4 testColor( 1.0f, 2.0f, 3.0f, 4.0f );
+
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
+  RenderTask task = taskList.GetTask( 0u );
+  DALI_TEST_CHECK( task );
+  DALI_TEST_EQUALS( 2, task.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( task.GetClearColor() != testColor );
+
+  task.SetClearColor( testColor );
+
+  // Wait a frame.
+  Wait(application);
+
+  DALI_TEST_EQUALS( task.GetClearColor(), testColor, TEST_LOCATION );
+
+  RenderTask move;
+  move = std::move( task );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 2, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetClearColor(), testColor, TEST_LOCATION );
+  DALI_TEST_CHECK( !task );
+
+  END_TEST;
+}
index 28dd0d6..e19b508 100644 (file)
@@ -75,6 +75,42 @@ int UtcDaliRenderTaskListAssignment(void)
   END_TEST;
 }
 
+int UtcDaliRenderTaskListMoveConstructor(void)
+{
+  TestApplication application;
+
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
+  DALI_TEST_CHECK( taskList );
+  DALI_TEST_EQUALS( 2, taskList.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
+
+  RenderTaskList move = std::move( taskList );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 2, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( 1u == move.GetTaskCount() );
+  DALI_TEST_CHECK( !taskList );
+
+  END_TEST;
+}
+
+int UtcDaliRenderTaskListMoveAssignment(void)
+{
+  TestApplication application;
+
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
+  DALI_TEST_CHECK( taskList );
+  DALI_TEST_EQUALS( 2, taskList.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
+
+  RenderTaskList move;
+  move = std::move( taskList );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 2, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( 1u == move.GetTaskCount() );
+  DALI_TEST_CHECK( !taskList );
+
+  END_TEST;
+}
 
 int UtcDaliRenderTaskListDownCast(void)
 {
index 5dadf7b..77b86a7 100644 (file)
@@ -140,6 +140,57 @@ int UtcDaliRendererAssignmentOperator(void)
   END_TEST;
 }
 
+int UtcDaliRendererMoveConstructor(void)
+{
+  TestApplication application;
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader shader = Shader::New( "vertexSrc", "fragmentSrc" );
+  Renderer renderer = Renderer::New( geometry, shader );
+  DALI_TEST_CHECK( renderer );
+  DALI_TEST_EQUALS( 1, renderer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetProperty<Vector4>( Renderer::Property::BLEND_COLOR ), Color::TRANSPARENT, TEST_LOCATION );
+
+  renderer.SetProperty( Renderer::Property::BLEND_COLOR, Color::MAGENTA );
+  application.SendNotification();
+  application.Render();
+  DALI_TEST_EQUALS( renderer.GetProperty<Vector4>( Renderer::Property::BLEND_COLOR ), Color::MAGENTA, TEST_LOCATION );
+
+  Renderer move = std::move( renderer );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetProperty<Vector4>( Renderer::Property::BLEND_COLOR ), Color::MAGENTA, TEST_LOCATION );
+  DALI_TEST_CHECK( !renderer );
+
+  END_TEST;
+}
+
+int UtcDaliRendererMoveAssignment(void)
+{
+  TestApplication application;
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader shader = Shader::New( "vertexSrc", "fragmentSrc" );
+  Renderer renderer = Renderer::New( geometry, shader );
+  DALI_TEST_CHECK( renderer );
+  DALI_TEST_EQUALS( 1, renderer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetProperty<Vector4>( Renderer::Property::BLEND_COLOR ), Color::TRANSPARENT, TEST_LOCATION );
+
+  renderer.SetProperty( Renderer::Property::BLEND_COLOR, Color::MAGENTA );
+  application.SendNotification();
+  application.Render();
+  DALI_TEST_EQUALS( renderer.GetProperty<Vector4>( Renderer::Property::BLEND_COLOR ), Color::MAGENTA, TEST_LOCATION );
+
+  Renderer move;
+  move = std::move( renderer );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetProperty<Vector4>( Renderer::Property::BLEND_COLOR ), Color::MAGENTA, TEST_LOCATION );
+  DALI_TEST_CHECK( !renderer );
+
+  END_TEST;
+}
+
 int UtcDaliRendererDownCast01(void)
 {
   TestApplication application;
index 6f7ca28..c3806f4 100644 (file)
@@ -74,6 +74,39 @@ int UtcDaliSamplerCopyConstructor(void)
   END_TEST;
 }
 
+int UtcDaliSamplerMoveConstructor(void)
+{
+  TestApplication application;
+
+  Sampler sampler = Sampler::New();
+  DALI_TEST_CHECK( sampler );
+  DALI_TEST_EQUALS( 1, sampler.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  Sampler move = std::move( sampler );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( !sampler );
+
+  END_TEST;
+}
+
+int UtcDaliSamplerMoveAssignment(void)
+{
+  TestApplication application;
+
+  Sampler sampler = Sampler::New();
+  DALI_TEST_CHECK( sampler );
+  DALI_TEST_EQUALS( 1, sampler.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  Sampler move;
+  move = std::move( sampler );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( !sampler );
+
+  END_TEST;
+}
+
 int UtcDaliSamplerDownCast01(void)
 {
   TestApplication application;
index 6a06fa3..278af12 100644 (file)
@@ -94,6 +94,51 @@ int UtcDaliShaderAssignmentOperator(void)
   END_TEST;
 }
 
+int UtcDaliShaderMoveConstructor(void)
+{
+  TestApplication application;
+
+  Shader shader = Shader::New(VertexSource, FragmentSource);
+  DALI_TEST_CHECK( shader );
+  DALI_TEST_EQUALS( 1, shader.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  // Register a custom property
+  Vector2 vec( 1.0f, 2.0f );
+  Property::Index customIndex = shader.RegisterProperty( "custom", vec );
+  DALI_TEST_EQUALS( shader.GetProperty<Vector2>( customIndex ), vec, TEST_LOCATION );
+
+  Shader move = std::move( shader );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetProperty<Vector2>( customIndex ), vec, TEST_LOCATION );
+  DALI_TEST_CHECK( !shader );
+
+  END_TEST;
+}
+
+int UtcDaliShaderMoveAssignment(void)
+{
+  TestApplication application;
+
+  Shader shader = Shader::New(VertexSource, FragmentSource);
+  DALI_TEST_CHECK( shader );
+  DALI_TEST_EQUALS( 1, shader.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  // Register a custom property
+  Vector2 vec( 1.0f, 2.0f );
+  Property::Index customIndex = shader.RegisterProperty( "custom", vec );
+  DALI_TEST_EQUALS( shader.GetProperty<Vector2>( customIndex ), vec, TEST_LOCATION );
+
+  Shader move;
+  move = std::move( shader );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetProperty<Vector2>( customIndex ), vec, TEST_LOCATION );
+  DALI_TEST_CHECK( !shader );
+
+  END_TEST;
+}
+
 int UtcDaliShaderDownCast01(void)
 {
   TestApplication application;
index 0222064..d2d84d9 100644 (file)
@@ -101,6 +101,51 @@ int UtcDaliTextureAssignmentOperator(void)
   END_TEST;
 }
 
+int UtcDaliTextureMoveConstructor(void)
+{
+  TestApplication application;
+
+  uint32_t width = 64;
+  uint32_t height = 64;
+  Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, width, height );
+  DALI_TEST_CHECK( texture );
+  DALI_TEST_EQUALS( 1, texture.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( texture.GetWidth(), width, TEST_LOCATION );
+  DALI_TEST_EQUALS( texture.GetHeight(), height, TEST_LOCATION );
+
+  Texture move = std::move( texture );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetWidth(), width, TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetHeight(), height, TEST_LOCATION );
+  DALI_TEST_CHECK( !texture );
+
+  END_TEST;
+}
+
+int UtcDaliTextureMoveAssignment(void)
+{
+  TestApplication application;
+
+  uint32_t width = 64;
+  uint32_t height = 64;
+  Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, width, height );
+  DALI_TEST_CHECK( texture );
+  DALI_TEST_EQUALS( 1, texture.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( texture.GetWidth(), width, TEST_LOCATION );
+  DALI_TEST_EQUALS( texture.GetHeight(), height, TEST_LOCATION );
+
+  Texture move;
+  move = std::move( texture );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetWidth(), width, TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetHeight(), height, TEST_LOCATION );
+  DALI_TEST_CHECK( !texture );
+
+  END_TEST;
+}
+
 int UtcDaliTextureDownCast01(void)
 {
   TestApplication application;
index 73a3b26..6b190ec 100644 (file)
@@ -120,6 +120,49 @@ int UtcDaliTextureSetAssignmentOperator(void)
   END_TEST;
 }
 
+int UtcDaliTextureSetMoveConstructor(void)
+{
+  TestApplication application;
+
+  TextureSet textureSet = TextureSet::New();
+  DALI_TEST_CHECK( textureSet );
+  DALI_TEST_EQUALS( 1, textureSet.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 32, 32 );
+  textureSet.SetTexture( 0u, texture );
+  DALI_TEST_EQUALS( textureSet.GetTexture( 0u ), texture, TEST_LOCATION );
+
+  TextureSet move = std::move( textureSet );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetTexture( 0u ), texture, TEST_LOCATION );
+  DALI_TEST_CHECK( !textureSet );
+
+  END_TEST;
+}
+
+int UtcDaliTextureSetMoveAssignment(void)
+{
+  TestApplication application;
+
+  TextureSet textureSet = TextureSet::New();
+  DALI_TEST_CHECK( textureSet );
+  DALI_TEST_EQUALS( 1, textureSet.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+
+  Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 32, 32 );
+  textureSet.SetTexture( 0u, texture );
+  DALI_TEST_EQUALS( textureSet.GetTexture( 0u ), texture, TEST_LOCATION );
+
+  TextureSet move;
+  move = std::move( textureSet );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetTexture( 0u ), texture, TEST_LOCATION );
+  DALI_TEST_CHECK( !textureSet );
+
+  END_TEST;
+}
+
 int UtcDaliTextureSetDownCast01(void)
 {
   TestApplication application;
index 51a2e57..bfcf5cf 100644 (file)
@@ -573,6 +573,66 @@ int UtcDaliTypeRegistryAssignmentOperatorP(void)
   END_TEST;
 }
 
+int UtcDaliTypeRegistryMoveConstructor(void)
+{
+  TestApplication application;
+
+  TypeRegistry registry = TypeRegistry::Get();
+  DALI_TEST_CHECK( registry );
+  DALI_TEST_EQUALS( 16, registry.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( registry.GetTypeInfo( "Actor" ).GetName() == "Actor" );
+
+  TypeRegistry movedRegistry = std::move( registry );
+  DALI_TEST_CHECK( movedRegistry );
+  DALI_TEST_EQUALS( 16, movedRegistry.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( movedRegistry.GetTypeInfo( "Actor" ).GetName() == "Actor" );
+  DALI_TEST_CHECK( !registry );
+
+  Dali::TypeInfo info = movedRegistry.GetTypeInfo( "Actor" );
+  DALI_TEST_CHECK( info );
+  DALI_TEST_EQUALS( 2, info.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( info.GetName() == "Actor" );
+
+  Dali::TypeInfo movedInfo = std::move( info );
+  DALI_TEST_CHECK( movedInfo );
+  DALI_TEST_EQUALS( 2, movedInfo.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( movedInfo.GetName() == "Actor" );
+  DALI_TEST_CHECK( !info );
+
+  END_TEST;
+}
+
+int UtcDaliTypeRegistryMoveAssignment(void)
+{
+  TestApplication application;
+
+  TypeRegistry registry = TypeRegistry::Get();
+  DALI_TEST_CHECK( registry );
+  DALI_TEST_EQUALS( 16, registry.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( registry.GetTypeInfo( "Actor" ).GetName() == "Actor" );
+
+  TypeRegistry movedRegistry;
+  movedRegistry = std::move( registry );
+  DALI_TEST_CHECK( movedRegistry );
+  DALI_TEST_EQUALS( 16, movedRegistry.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( movedRegistry.GetTypeInfo( "Actor" ).GetName() == "Actor" );
+  DALI_TEST_CHECK( !registry );
+
+  Dali::TypeInfo info = movedRegistry.GetTypeInfo( "Actor" );
+  DALI_TEST_CHECK( info );
+  DALI_TEST_EQUALS( 2, info.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( info.GetName() == "Actor" );
+
+  Dali::TypeInfo movedInfo;
+  movedInfo = std::move( info );
+  DALI_TEST_CHECK( movedInfo );
+  DALI_TEST_EQUALS( 2, movedInfo.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_CHECK( movedInfo.GetName() == "Actor" );
+  DALI_TEST_CHECK( !info );
+
+  END_TEST;
+}
+
 int UtcDaliTypeRegistryAssignP(void)
 {
   TestApplication application;
index 6848f1f..0e81340 100644 (file)
@@ -264,6 +264,45 @@ int UtcDaliWeakHandleBaseAssignmentOperator(void)
   END_TEST;
 }
 
+int UtcDaliWeakHandleBaseMoveConstructor(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+  DALI_TEST_EQUALS( 1, actor.GetBaseObject().ReferenceCount(), TEST_LOCATION ); // reference count of the actor is not increased
+
+  WeakHandleBase object( actor );
+  DALI_TEST_CHECK( object.GetBaseHandle() == actor);
+  DALI_TEST_EQUALS( 1, actor.GetBaseObject().ReferenceCount(), TEST_LOCATION ); // reference count of the actor is not increased
+
+  WeakHandleBase move = std::move( object );
+  DALI_TEST_CHECK(move.GetBaseHandle() == actor );
+  DALI_TEST_EQUALS( 1, actor.GetBaseObject().ReferenceCount(), TEST_LOCATION ); // reference count of the actor is not increased
+  DALI_TEST_CHECK( !object.GetBaseHandle() ); // object moved
+
+  END_TEST;
+}
+
+int UtcDaliWeakHandleBaseMoveAssignment(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+  DALI_TEST_EQUALS( 1, actor.GetBaseObject().ReferenceCount(), TEST_LOCATION ); // reference count of the actor is not increased
+
+  WeakHandleBase object( actor );
+  DALI_TEST_CHECK( object.GetBaseHandle() == actor);
+  DALI_TEST_EQUALS( 1, actor.GetBaseObject().ReferenceCount(), TEST_LOCATION ); // reference count of the actor is not increased
+
+  WeakHandleBase move;
+  move = std::move( object );
+  DALI_TEST_CHECK(move.GetBaseHandle() == actor );
+  DALI_TEST_EQUALS( 1, actor.GetBaseObject().ReferenceCount(), TEST_LOCATION ); // reference count of the actor is not increased
+  DALI_TEST_CHECK( !object.GetBaseHandle() ); // object moved
+
+  END_TEST;
+}
+
 int UtcDaliWeakHandleBaseEqualityOperatorP(void)
 {
   TestApplication application;
@@ -412,4 +451,42 @@ int UtcDaliWeakHandleGetHandle(void)
   END_TEST;
 }
 
+int UtcDaliWeakHandleMoveConstructor(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+  DALI_TEST_EQUALS( 1, actor.GetBaseObject().ReferenceCount(), TEST_LOCATION ); // reference count of the actor is not increased
+
+  WeakHandle<Actor> object( actor );
+  DALI_TEST_CHECK( object.GetHandle() == actor );
+  DALI_TEST_EQUALS( 1, actor.GetBaseObject().ReferenceCount(), TEST_LOCATION ); // reference count of the actor is not increased
+
+  WeakHandle<Actor> move = std::move( object );
+  DALI_TEST_CHECK( move.GetHandle() == actor );
+  DALI_TEST_EQUALS( 1, actor.GetBaseObject().ReferenceCount(), TEST_LOCATION ); // reference count of the actor is not increased
+  DALI_TEST_CHECK( !object.GetHandle() ); // object moved
+
+  END_TEST;
+}
+
+int UtcDaliWeakHandleMoveAssignment(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+  DALI_TEST_EQUALS( 1, actor.GetBaseObject().ReferenceCount(), TEST_LOCATION ); // reference count of the actor is not increased
+
+  WeakHandle<Actor> object( actor );
+  DALI_TEST_CHECK( object.GetHandle() == actor );
+  DALI_TEST_EQUALS( 1, actor.GetBaseObject().ReferenceCount(), TEST_LOCATION ); // reference count of the actor is not increased
+
+  WeakHandle<Actor> move;
+  move = std::move( object );
+  DALI_TEST_CHECK( move.GetHandle() == actor );
+  DALI_TEST_EQUALS( 1, actor.GetBaseObject().ReferenceCount(), TEST_LOCATION ); // reference count of the actor is not increased
+  DALI_TEST_CHECK( !object.GetHandle() ); // object moved
+
+  END_TEST;
+}
 
index cf897e9..6df6576 100644 (file)
@@ -65,6 +65,10 @@ Actor& Actor::operator=(const Actor& rhs)
   return *this;
 }
 
+Actor::Actor( Actor&& rhs ) = default;
+
+Actor& Actor::operator=( Actor&& rhs ) = default;
+
 Layer Actor::GetLayer()
 {
   return GetImplementation(*this).GetLayer();
index af2801c..fdc9e9a 100644 (file)
@@ -800,6 +800,23 @@ public:
    */
   Actor& operator=(const Actor& rhs);
 
+  /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the actor to move
+   */
+  Actor( Actor&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the actor to move
+   * @return A reference to this
+   */
+  Actor& operator=( Actor&& rhs );
+
   // Containment
 
   /**
index 816db29..3d26536 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -64,6 +64,10 @@ CustomActor& CustomActor::operator=(const CustomActor& rhs)
   return *this;
 }
 
+CustomActor::CustomActor( CustomActor&& rhs ) = default;
+
+CustomActor& CustomActor::operator=( CustomActor&& rhs ) = default;
+
 CustomActorImpl& CustomActor::GetImplementation()
 {
   Internal::CustomActor& internal = GetImpl(*this);
index 5f31322..8ab1a3a 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_CUSTOM_ACTOR_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.
@@ -115,6 +115,23 @@ public:
    */
   CustomActor& operator=(const CustomActor& rhs);
 
+  /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs The actor to move
+   */
+  CustomActor( CustomActor&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs The actor to move
+   * @return A reference to this
+   */
+  CustomActor& operator=( CustomActor&& rhs );
+
 public: // Not intended for application developers
 
   /**
index 7565b94..38e965d 100644 (file)
@@ -57,6 +57,10 @@ Layer& Layer::operator=(const Layer& rhs)
   return *this;
 }
 
+Layer::Layer( Layer&& rhs ) = default;
+
+Layer& Layer::operator=( Layer&& rhs ) = default;
+
 void Layer::Raise()
 {
   GetImplementation(*this).Raise();
index 3794634..84399f3 100644 (file)
@@ -273,6 +273,23 @@ public:
   Layer& operator=(const Layer& rhs);
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs The layer to move
+   */
+  Layer( Layer&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs The layer to move
+   * @return A reference to this
+   */
+  Layer& operator=( Layer&& rhs );
+
+  /**
    * @brief Increments the depth of the layer.
    *
    * @SINCE_1_0.0
index bd3ce98..ee344e7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -64,6 +64,10 @@ Animation& Animation::operator=(const Animation& rhs)
   return *this;
 }
 
+Animation::Animation( Animation&& rhs ) = default;
+
+Animation& Animation::operator=( Animation&& rhs ) = default;
+
 void Animation::SetDuration(float durationSeconds)
 {
   GetImplementation(*this).SetDuration(durationSeconds);
index 2fb2606..2fa2db1 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_ANIMATION_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.
@@ -233,6 +233,23 @@ public:
   Animation& operator=(const Animation& rhs);
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  Animation( Animation&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  Animation& operator=( Animation&& rhs );
+
+  /**
    * @brief Sets the duration of an animation.
    *
    * @SINCE_1_0.0
index 6ef76f7..fb5ebaa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -64,6 +64,10 @@ Constraint& Constraint::operator=( const Constraint& rhs )
   return *this;
 }
 
+Constraint::Constraint( Constraint&& rhs ) = default;
+
+Constraint& Constraint::operator=( Constraint&& rhs ) = default;
+
 Constraint Constraint::DownCast( BaseHandle baseHandle )
 {
   return Constraint( dynamic_cast< Dali::Internal::ConstraintBase* >( baseHandle.GetObjectPtr() ) );
index b847a98..170ba8e 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_CONSTRAINT_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.
@@ -428,6 +428,23 @@ public:
   Constraint& operator=( const Constraint& rhs );
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  Constraint( Constraint&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  Constraint& operator=( Constraint&& rhs );
+
+  /**
    * @brief Downcasts a handle to Constraint handle.
    *
    * If handle points to a Constraint object, the downcast produces valid handle.
index 34148e9..27d1ee0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -57,6 +57,10 @@ KeyFrames& KeyFrames::operator=(const KeyFrames& rhs)
   return *this;
 }
 
+KeyFrames::KeyFrames( KeyFrames&& rhs ) = default;
+
+KeyFrames& KeyFrames::operator=( KeyFrames&& rhs ) = default;
+
 Property::Type KeyFrames::GetType() const
 {
   return GetImplementation(*this).GetType();
index c38778a..d033dd8 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_KEY_FRAMES_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.
@@ -102,6 +102,23 @@ public:
   KeyFrames& operator=(const KeyFrames& rhs);
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  KeyFrames( KeyFrames&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  KeyFrames& operator=( KeyFrames&& rhs );
+
+  /**
    * @brief Gets the type of the key frame.
    *
    * If no key frames have been added, this returns Property::NONE.
index 8d81f9e..c62a442 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -60,6 +60,10 @@ LinearConstrainer& LinearConstrainer::operator=(const LinearConstrainer& rhs)
   return *this;
 }
 
+LinearConstrainer::LinearConstrainer( LinearConstrainer&& rhs ) = default;
+
+LinearConstrainer& LinearConstrainer::operator=( LinearConstrainer&& rhs ) = default;
+
 void LinearConstrainer::Apply( Dali::Property target, Dali::Property source, const Vector2& range, const Vector2& wrap )
 {
   GetImplementation(*this).Apply( target, source, range, wrap );
index e236837..e5b1834 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_LINEAR_CONSTRAINER_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.
@@ -129,6 +129,23 @@ public:
   LinearConstrainer& operator=(const LinearConstrainer& rhs);
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  LinearConstrainer( LinearConstrainer&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  LinearConstrainer& operator=( LinearConstrainer&& rhs );
+
+  /**
    * @brief Applies the linear constraint to the target property.
    *
    * @SINCE_1_0.0
index 3dda29c..83159f5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -59,6 +59,10 @@ Path& Path::operator=(const Path& rhs)
   return *this;
 }
 
+Path::Path( Path&& rhs ) = default;
+
+Path& Path::operator=( Path&& rhs ) = default;
+
 void Path::AddPoint(const Vector3& point )
 {
   GetImplementation(*this).AddPoint( point );
index e3e28be..b60254a 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_PATH_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.
@@ -116,6 +116,23 @@ public:
   Path& operator=(const Path& rhs);
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  Path( Path&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  Path& operator=( Path&& rhs );
+
+  /**
    * @brief Adds an interpolation point.
    *
    * @SINCE_1_0.0
index b4e7cb3..998dfb4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -59,6 +59,10 @@ PixelData& PixelData::operator=(const PixelData& rhs)
   return *this;
 }
 
+PixelData::PixelData( PixelData&& rhs ) = default;
+
+PixelData& PixelData::operator=( PixelData&& rhs ) = default;
+
 uint32_t PixelData::GetWidth() const
 {
   return GetImplementation(*this).GetWidth();
index 13481b4..82401e8 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_PIXEL_DATA_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.
@@ -110,6 +110,23 @@ public:
   PixelData& operator=(const PixelData& rhs);
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  PixelData( PixelData&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  PixelData& operator=( PixelData&& rhs );
+
+  /**
    * @brief Gets the width of the buffer in pixels.
    *
    * @SINCE_1_1.43
index 24085ea..8539fa3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -57,6 +57,23 @@ BaseHandle& BaseHandle::operator=(const BaseHandle& rhs)
   return *this;
 }
 
+BaseHandle::BaseHandle( BaseHandle&& rhs )
+: mObjectHandle( rhs.mObjectHandle )
+{
+  rhs.mObjectHandle = nullptr;
+}
+
+BaseHandle& BaseHandle::operator=( BaseHandle&& rhs )
+{
+  if (this != &rhs)
+  {
+    mObjectHandle = rhs.mObjectHandle;
+    rhs.mObjectHandle = nullptr;
+  }
+
+  return *this;
+}
+
 bool BaseHandle::DoAction(const std::string& command, const Property::Map& attributes)
 {
   return GetImplementation(*this).DoAction( command, attributes );
index cca565a..a689502 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_BASE_HANDLE_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.
@@ -111,6 +111,23 @@ public:
   BaseHandle& operator=(const BaseHandle& rhs);
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  BaseHandle( BaseHandle&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  BaseHandle& operator=( BaseHandle&& rhs );
+
+  /**
    * @brief Connects a void() functor to a specified signal.
    *
    * @SINCE_1_0.0
index 1b48d5c..0844835 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -63,12 +63,15 @@ Handle& Handle::operator=( const Handle& rhs )
   return *this;
 }
 
+Handle::Handle( Handle&& rhs ) = default;
+
+Handle& Handle::operator=( Handle&& rhs ) = default;
+
 Handle Handle::DownCast( BaseHandle handle )
 {
   return Handle( dynamic_cast<Dali::Internal::Object*>(handle.GetObjectPtr()) );
 }
 
-
 bool Handle::Supports( Capability capability ) const
 {
   return GetImplementation(*this).Supports( capability );
index 1e61d6c..02ffd8d 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_HANDLE_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.
@@ -129,6 +129,23 @@ public:
   Handle& operator=( const Handle& rhs );
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  Handle( Handle&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  Handle& operator=( Handle&& rhs );
+
+  /**
    * @brief Downcasts to a handle.
    *
    * If not, the returned handle is left uninitialized.
index aea7a2a..9c5af86 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -43,6 +43,10 @@ ObjectRegistry& ObjectRegistry::operator=(const ObjectRegistry& rhs)
   return *this;
 }
 
+ObjectRegistry::ObjectRegistry( ObjectRegistry&& rhs ) = default;
+
+ObjectRegistry& ObjectRegistry::operator=( ObjectRegistry&& rhs ) = default;
+
 ObjectRegistry::ObjectCreatedSignalType& ObjectRegistry::ObjectCreatedSignal()
 {
   return GetImplementation(*this).ObjectCreatedSignal();
index 4724b77..29f626d 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_OBJECT_REGISTRY_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.
@@ -108,6 +108,23 @@ public:
    */
   ObjectRegistry& operator=(const ObjectRegistry& rhs);
 
+  /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  ObjectRegistry( ObjectRegistry&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  ObjectRegistry& operator=( ObjectRegistry&& rhs );
+
 public: // Signals
 
   /**
index a538a12..7637a6c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -47,6 +47,10 @@ PropertyCondition& PropertyCondition::operator=( const PropertyCondition& rhs )
   return *this;
 }
 
+PropertyCondition::PropertyCondition( PropertyCondition&& rhs ) = default;
+
+PropertyCondition& PropertyCondition::operator=( PropertyCondition&& rhs ) = default;
+
 std::size_t PropertyCondition::GetArgumentCount() const
 {
   return GetImplementation(*this).arguments.Count();
index a5ab046..9199370 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_PROPERTY_CONDITIONS_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.
@@ -72,6 +72,23 @@ public:
    */
   PropertyCondition& operator=( const PropertyCondition& rhs );
 
+  /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  PropertyCondition( PropertyCondition&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  PropertyCondition& operator=( PropertyCondition&& rhs );
+
 public:
 
   /**
index 81e0538..ff5f275 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -59,6 +59,10 @@ PropertyNotification& PropertyNotification::operator=(const PropertyNotification
   return *this;
 }
 
+PropertyNotification::PropertyNotification( PropertyNotification&& rhs ) = default;
+
+PropertyNotification& PropertyNotification::operator=( PropertyNotification&& rhs ) = default;
+
 PropertyCondition PropertyNotification::GetCondition()
 {
   return GetImplementation(*this).GetCondition();
index a340049..c0e01c5 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_PROPERTY_NOTIFICATION_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.
@@ -107,6 +107,23 @@ public:
   PropertyNotification& operator=(const PropertyNotification& rhs);
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  PropertyNotification( PropertyNotification&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  PropertyNotification& operator=( PropertyNotification&& rhs );
+
+  /**
    * @brief Gets the condition of this notification.
    *
    * @SINCE_1_0.0
index 0578e19..8eceb10 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -45,6 +45,10 @@ TypeInfo& TypeInfo::operator=(const TypeInfo& rhs)
   return *this;
 }
 
+TypeInfo::TypeInfo( TypeInfo&& rhs ) = default;
+
+TypeInfo& TypeInfo::operator=( TypeInfo&& rhs ) = default;
+
 const std::string& TypeInfo::GetName() const
 {
   return GetImplementation(*this).GetName();
index f2dc401..cbc9aa1 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TYPE_INFO_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.
@@ -122,6 +122,23 @@ public:
   TypeInfo& operator=(const TypeInfo& rhs);
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  TypeInfo( TypeInfo&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  TypeInfo& operator=( TypeInfo&& rhs );
+
+  /**
    * @brief Retrieves the type name for this type.
    *
    * @SINCE_1_0.0
index dbe1910..d72c680 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -47,6 +47,10 @@ TypeRegistry& TypeRegistry::operator=(const TypeRegistry& rhs)
   return *this;
 }
 
+TypeRegistry::TypeRegistry( TypeRegistry&& rhs ) = default;
+
+TypeRegistry& TypeRegistry::operator=( TypeRegistry&& rhs ) = default;
+
 TypeRegistry TypeRegistry::Get()
 {
   return TypeRegistry(Internal::TypeRegistry::Get());
index 4964048..082943c 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TYPE_REGISTRY_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.
@@ -135,6 +135,23 @@ public:
   TypeRegistry& operator=(const TypeRegistry& rhs);
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  TypeRegistry( TypeRegistry&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  TypeRegistry& operator=( TypeRegistry&& rhs );
+
+  /**
    * @brief Gets TypeInfo for a registered type.
    *
    * @SINCE_1_0.0
index cd5fcab..6ae60b1 100644 (file)
@@ -109,6 +109,23 @@ WeakHandleBase& WeakHandleBase::operator=( const WeakHandleBase& rhs )
   return *this;
 }
 
+WeakHandleBase::WeakHandleBase( WeakHandleBase&& rhs )
+: mImpl( rhs.mImpl )
+{
+  rhs.mImpl = nullptr;
+}
+
+WeakHandleBase& WeakHandleBase::operator=( WeakHandleBase&& rhs )
+{
+  if (this != &rhs)
+  {
+    mImpl = rhs.mImpl;
+    rhs.mImpl = nullptr;
+  }
+
+  return *this;
+}
+
 bool WeakHandleBase::operator==( const WeakHandleBase& rhs ) const
 {
   return this->mImpl->mObject == rhs.mImpl->mObject;
@@ -121,7 +138,7 @@ bool WeakHandleBase::operator!=( const WeakHandleBase& rhs ) const
 
 BaseHandle WeakHandleBase::GetBaseHandle() const
 {
-  return BaseHandle( mImpl->mObject );
+  return mImpl ? BaseHandle( mImpl->mObject ) : BaseHandle();
 }
 
 void WeakHandleBase::Reset()
index cb054bc..d7fb0d0 100644 (file)
@@ -81,6 +81,23 @@ public:
   WeakHandleBase& operator=( const WeakHandleBase& rhs );
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  WeakHandleBase( WeakHandleBase&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  WeakHandleBase& operator=( WeakHandleBase&& rhs );
+
+  /**
    * @brief Equality operator overload.
    *
    * @SINCE_1_2.60
@@ -162,7 +179,7 @@ public:
   }
 
   /**
-   * @copydoc Dali::WeakHandleBase::operator=()
+   * @copydoc Dali::WeakHandleBase::operator=(const WeakHandleBase& rhs)
    */
   WeakHandle& operator=( const WeakHandle& rhs )
   {
@@ -171,6 +188,16 @@ public:
   }
 
   /**
+   * @copydoc Dali::WeakHandleBase::WeakHandleBase(WeakHandleBase&& rhs)
+   */
+  WeakHandle( WeakHandle&& rhs ) = default;
+
+  /**
+   * @copydoc Dali::WeakHandleBase::operator=(WeakHandleBase&& rhs)
+   */
+  WeakHandle& operator=( WeakHandle&& rhs ) = default;
+
+  /**
    * @copydoc Dali::WeakHandleBase::operator==()
    */
   bool operator==(const WeakHandle& rhs) const
index 555acca..e52e2f4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -48,6 +48,10 @@ RenderTaskList& RenderTaskList::operator=(const RenderTaskList& rhs)
   return *this;
 }
 
+RenderTaskList::RenderTaskList( RenderTaskList&& rhs ) =  default;
+
+RenderTaskList& RenderTaskList::operator=( RenderTaskList&& rhs ) =  default;
+
 RenderTask RenderTaskList::CreateTask()
 {
   return RenderTask( GetImplementation(*this).CreateTask().Get() );
index c27d13c..b4a5d04 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_RENDER_TASK_LIST_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.
@@ -94,6 +94,23 @@ public:
   RenderTaskList& operator=(const RenderTaskList& rhs);
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  RenderTaskList( RenderTaskList&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  RenderTaskList& operator=( RenderTaskList&& rhs );
+
+  /**
    * @brief Creates a new RenderTask.
    *
    * This will be appended to the list of render-tasks.
index 83d7717..520738f 100644 (file)
@@ -73,6 +73,10 @@ RenderTask& RenderTask::operator=(const RenderTask& rhs)
   return *this;
 }
 
+RenderTask::RenderTask( RenderTask&& rhs ) =  default;
+
+RenderTask& RenderTask::operator=( RenderTask&& rhs ) =  default;
+
 void RenderTask::SetSourceActor( Actor actor )
 {
   // NULL handle is allowed
index 37755fe..5d85da4 100644 (file)
@@ -226,6 +226,23 @@ public:
   RenderTask& operator=(const RenderTask& rhs);
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  RenderTask( RenderTask&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  RenderTask& operator=( RenderTask&& rhs );
+
+  /**
    * @brief Sets the actors to be rendered.
    * @SINCE_1_0.0
    * @param[in] actor This actor and its children will be rendered.
index f9a2ba3..0badfa9 100644 (file)
@@ -86,6 +86,10 @@ FrameBuffer::FrameBuffer( Internal::FrameBuffer* pointer )
 {
 }
 
+FrameBuffer::FrameBuffer( FrameBuffer&& rhs ) =  default;
+
+FrameBuffer& FrameBuffer::operator=( FrameBuffer&& rhs ) =  default;
+
 void FrameBuffer::AttachColorTexture( Texture& texture )
 {
   AttachColorTexture( texture, 0u, 0u );
index a3fafe2..6c1ced7 100644 (file)
@@ -134,6 +134,23 @@ public:
   FrameBuffer& operator=( const FrameBuffer& handle );
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  FrameBuffer( FrameBuffer&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  FrameBuffer& operator=( FrameBuffer&& rhs );
+
+  /**
    * @brief Attach the base LOD of a 2D texture to the framebuffer for color rendering.
    * @note This causes a color attachment to be added.
    * @note Repeated calls to this method add textures as subsequent color attachments.
index a9c7867..2b69e87 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -54,6 +54,10 @@ Geometry& Geometry::operator=( const Geometry& handle )
   return *this;
 }
 
+Geometry::Geometry( Geometry&& rhs ) =  default;
+
+Geometry& Geometry::operator=( Geometry&& rhs ) =  default;
+
 std::size_t Geometry::AddVertexBuffer( PropertyBuffer& vertexBuffer )
 {
   DALI_ASSERT_ALWAYS( vertexBuffer && "VertexBuffer is not initialized ");
index d6db70a..a898e56 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_GEOMETRY_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.
@@ -114,6 +114,23 @@ public:
   Geometry& operator=( const Geometry& handle );
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  Geometry( Geometry&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  Geometry& operator=( Geometry&& rhs );
+
+  /**
    * @brief Adds a PropertyBuffer to be used as source of geometry vertices.
    *
    * @SINCE_1_1.43
index 75e2b0c..91fdd46 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -56,6 +56,10 @@ PropertyBuffer& PropertyBuffer::operator=( const PropertyBuffer& handle )
   return *this;
 }
 
+PropertyBuffer::PropertyBuffer( PropertyBuffer&& rhs ) =  default;
+
+PropertyBuffer& PropertyBuffer::operator=( PropertyBuffer&& rhs ) =  default;
+
 void PropertyBuffer::SetData( const void* data, std::size_t size )
 {
   GetImplementation(*this).SetData( data, static_cast<uint32_t>( size ) ); // only support 4,294,967,295 bytes
index e2680e0..c6037e4 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_PROPERTY_BUFFER_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.
@@ -125,6 +125,23 @@ public:
   PropertyBuffer& operator=( const PropertyBuffer& handle );
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  PropertyBuffer( PropertyBuffer&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  PropertyBuffer& operator=( PropertyBuffer&& rhs );
+
+  /**
    * @brief Updates the whole buffer information.
    *
    * This function expects a pointer to an array of structures with the same
index 11458e1..14f42ea 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -56,6 +56,10 @@ Renderer& Renderer::operator=( const Renderer& handle )
   return *this;
 }
 
+Renderer::Renderer( Renderer&& rhs ) =  default;
+
+Renderer& Renderer::operator=( Renderer&& rhs ) =  default;
+
 void Renderer::SetGeometry( Geometry& geometry )
 {
   DALI_ASSERT_ALWAYS( geometry && "Geometry handle not initialized" );
index 89b171f..8ff7f97 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_RENDERER_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.
@@ -478,6 +478,23 @@ public:
   Renderer& operator=( const Renderer& handle );
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  Renderer( Renderer&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  Renderer& operator=( Renderer&& rhs );
+
+  /**
    * @brief Sets the geometry to be used by this renderer.
    *
    * @SINCE_1_1.43
index 4439014..ac57115 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -54,6 +54,9 @@ Sampler& Sampler::operator=( const Sampler& handle )
   return *this;
 }
 
+Sampler::Sampler( Sampler&& rhs ) =  default;
+
+Sampler& Sampler::operator=( Sampler&& rhs ) =  default;
 
 void Sampler::SetFilterMode( FilterMode::Type minFilter, FilterMode::Type magFilter )
 {
index e83c8b1..cc44ff0 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_SAMPLER_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.
@@ -94,6 +94,23 @@ public:
 
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  Sampler( Sampler&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  Sampler& operator=( Sampler&& rhs );
+
+  /**
    * @brief Sets the filter modes for this sampler.
    * Calling this function sets the properties MINIFICATION_FILTER and MAGNIFICATION_FILTER.
    *
index 4a1751d..7b9cfa5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -56,6 +56,10 @@ Shader& Shader::operator=( const Shader& handle )
   return *this;
 }
 
+Shader::Shader( Shader&& rhs ) =  default;
+
+Shader& Shader::operator=( Shader&& rhs ) =  default;
+
 Shader::Shader( Internal::Shader* pointer )
 : Handle( pointer )
 {
index 36e9f23..1009a46 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_SHADER_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.
@@ -171,6 +171,23 @@ public:
    */
   Shader& operator=( const Shader& handle );
 
+  /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  Shader( Shader&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  Shader& operator=( Shader&& rhs );
+
 public:
 
   /**
index cc48b11..fdcb141 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -56,6 +56,10 @@ TextureSet& TextureSet::operator=( const TextureSet& handle )
   return *this;
 }
 
+TextureSet::TextureSet( TextureSet&& rhs ) =  default;
+
+TextureSet& TextureSet::operator=( TextureSet&& rhs ) =  default;
+
 void TextureSet::SetTexture( size_t index, Texture texture )
 {
   if( texture )
index 8af0ca6..90c314c 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TEXTURE_SET_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.
@@ -97,6 +97,23 @@ public:
   TextureSet& operator=( const TextureSet& handle );
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  TextureSet( TextureSet&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  TextureSet& operator=( TextureSet&& rhs );
+
+  /**
    * @brief Sets the texture at position "index".
    *
    * @SINCE_1_1.43
index f23a3f2..0a8b80d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -62,6 +62,10 @@ Texture& Texture::operator=( const Texture& handle )
   return *this;
 }
 
+Texture::Texture( Texture&& rhs ) =  default;
+
+Texture& Texture::operator=( Texture&& rhs ) =  default;
+
 bool Texture::Upload( PixelData pixelData )
 {
   Internal::PixelData& internalPixelData = GetImplementation( pixelData );
index a043c7d..8668772 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TEXTURE_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.
@@ -142,6 +142,23 @@ public:
   Texture& operator=( const Texture& handle );
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  Texture( Texture&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  Texture& operator=( Texture&& rhs );
+
+  /**
    * @brief Uploads data to the texture from a PixelData object.
    *
    * @SINCE_1_1.43