Formatted API
[platform/core/uifw/dali-core.git] / dali / public-api / animation / key-frames.cpp
index 873bb12..d2394dd 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.
 #include <dali/public-api/animation/key-frames.h>
 
 // INTERNAL INCLUDES
-#include <dali/public-api/animation/alpha-functions.h>
+#include <dali/internal/event/animation/key-frames-impl.h>
+#include <dali/public-api/animation/alpha-function.h>
 #include <dali/public-api/math/degree.h>
 #include <dali/public-api/math/radian.h>
-#include <dali/internal/event/animation/key-frames-impl.h>
 
 namespace Dali
 {
-
 KeyFrames KeyFrames::New()
 {
   Internal::KeyFrames* internal = Internal::KeyFrames::New();
   return KeyFrames(internal);
 }
 
-KeyFrames KeyFrames::DownCast( BaseHandle handle )
+KeyFrames KeyFrames::DownCast(BaseHandle handle)
 {
-  return KeyFrames( dynamic_cast<Dali::Internal::KeyFrames*>(handle.GetObjectPtr()) );
+  return KeyFrames(dynamic_cast<Dali::Internal::KeyFrames*>(handle.GetObjectPtr()));
 }
 
 KeyFrames::KeyFrames()
@@ -46,16 +45,13 @@ KeyFrames::~KeyFrames()
 {
 }
 
-KeyFrames::KeyFrames(const KeyFrames& handle)
-: BaseHandle(handle)
-{
-}
+KeyFrames::KeyFrames(const KeyFrames& handle) = default;
 
-KeyFrames& KeyFrames::operator=(const KeyFrames& rhs)
-{
-  BaseHandle::operator=(rhs);
-  return *this;
-}
+KeyFrames& KeyFrames::operator=(const KeyFrames& rhs) = default;
+
+KeyFrames::KeyFrames(KeyFrames&& rhs) = default;
+
+KeyFrames& KeyFrames::operator=(KeyFrames&& rhs) = default;
 
 Property::Type KeyFrames::GetType() const
 {
@@ -64,7 +60,7 @@ Property::Type KeyFrames::GetType() const
 
 void KeyFrames::Add(float time, Property::Value value)
 {
-  Add(time, value, AlphaFunctions::Linear);
+  Add(time, value, AlphaFunction::DEFAULT);
 }
 
 void KeyFrames::Add(float time, Property::Value value, AlphaFunction alpha)
@@ -73,10 +69,8 @@ void KeyFrames::Add(float time, Property::Value value, AlphaFunction alpha)
 }
 
 KeyFrames::KeyFrames(Internal::KeyFrames* internal)
-  : BaseHandle(internal)
+: BaseHandle(internal)
 {
 }
 
-
-
-} // Dali
+} // namespace Dali