Change copy constructor and copy assignment in common classes to use the default...
[platform/core/uifw/dali-core.git] / dali / public-api / animation / animation.cpp
index 4663f95..aea5404 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.
@@ -23,7 +23,7 @@
 #include <dali/public-api/animation/time-period.h>
 #include <dali/internal/event/actors/actor-impl.h>
 #include <dali/internal/event/animation/animation-impl.h>
-#include <dali/internal/event/effects/shader-effect-impl.h>
+#include <dali/internal/event/animation/path-impl.h>
 
 namespace Dali
 {
@@ -53,16 +53,13 @@ Animation::~Animation()
 {
 }
 
-Animation::Animation(const Animation& handle)
-: BaseHandle(handle)
-{
-}
+Animation::Animation(const Animation& handle) = default;
 
-Animation& Animation::operator=(const Animation& rhs)
-{
-  BaseHandle::operator=(rhs);
-  return *this;
-}
+Animation& Animation::operator=(const Animation& rhs) = default;
+
+Animation::Animation( Animation&& rhs ) = default;
+
+Animation& Animation::operator=( Animation&& rhs ) = default;
 
 void Animation::SetDuration(float durationSeconds)
 {
@@ -79,17 +76,17 @@ void Animation::SetLooping(bool looping)
   GetImplementation(*this).SetLooping(looping);
 }
 
-void Animation::SetLoopCount(int count)
+void Animation::SetLoopCount(int32_t count)
 {
   GetImplementation(*this).SetLoopCount(count);
 }
 
-int Animation::GetLoopCount()
+int32_t Animation::GetLoopCount()
 {
   return GetImplementation(*this).GetLoopCount();
 }
 
-int Animation::GetCurrentLoop()
+int32_t Animation::GetCurrentLoop()
 {
   return GetImplementation(*this).GetCurrentLoop();
 }
@@ -139,6 +136,10 @@ void Animation::PlayFrom(float progress)
   GetImplementation(*this).PlayFrom(progress);
 }
 
+void Animation::PlayAfter( float delaySeconds )
+{
+  GetImplementation( *this ).PlayAfter( delaySeconds );
+}
 
 void Animation::Pause()
 {
@@ -160,6 +161,16 @@ void Animation::Clear()
   GetImplementation(*this).Clear();
 }
 
+void Animation::SetLoopingMode( LoopingMode loopingMode )
+{
+  GetImplementation( *this ).SetLoopingMode( loopingMode );
+}
+
+Animation::LoopingMode Animation::GetLoopingMode() const
+{
+  return GetImplementation( *this ).GetLoopingMode();
+}
+
 Animation::AnimationSignalType& Animation::FinishedSignal()
 {
   return GetImplementation(*this).FinishedSignal();