Change copy constructor and copy assignment in common classes to use the default...
[platform/core/uifw/dali-core.git] / dali / public-api / animation / key-frames.cpp
1 /*
2  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/public-api/animation/key-frames.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/public-api/animation/alpha-function.h>
23 #include <dali/public-api/math/degree.h>
24 #include <dali/public-api/math/radian.h>
25 #include <dali/internal/event/animation/key-frames-impl.h>
26
27 namespace Dali
28 {
29
30 KeyFrames KeyFrames::New()
31 {
32   Internal::KeyFrames* internal = Internal::KeyFrames::New();
33   return KeyFrames(internal);
34 }
35
36 KeyFrames KeyFrames::DownCast( BaseHandle handle )
37 {
38   return KeyFrames( dynamic_cast<Dali::Internal::KeyFrames*>(handle.GetObjectPtr()) );
39 }
40
41 KeyFrames::KeyFrames()
42 {
43 }
44
45 KeyFrames::~KeyFrames()
46 {
47 }
48
49 KeyFrames::KeyFrames(const KeyFrames& handle) = default;
50
51 KeyFrames& KeyFrames::operator=(const KeyFrames& rhs) = default;
52
53 KeyFrames::KeyFrames( KeyFrames&& rhs ) = default;
54
55 KeyFrames& KeyFrames::operator=( KeyFrames&& rhs ) = default;
56
57 Property::Type KeyFrames::GetType() const
58 {
59   return GetImplementation(*this).GetType();
60 }
61
62 void KeyFrames::Add(float time, Property::Value value)
63 {
64   Add(time, value, AlphaFunction::DEFAULT);
65 }
66
67 void KeyFrames::Add(float time, Property::Value value, AlphaFunction alpha)
68 {
69   GetImplementation(*this).Add(time, value, alpha);
70 }
71
72 KeyFrames::KeyFrames(Internal::KeyFrames* internal)
73   : BaseHandle(internal)
74 {
75 }
76
77
78
79 } // Dali