[dali_2.3.21] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-scene3d / public-api / model-motion / motion-index / motion-index.cpp
1 /*
2  * Copyright (c) 2023 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-scene3d/public-api/model-motion/motion-index/motion-index.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-scene3d/internal/model-motion/motion-index/motion-index-impl.h>
23
24 namespace Dali
25 {
26 namespace Scene3D
27 {
28 MotionIndex::MotionIndex()
29 {
30 }
31
32 MotionIndex::MotionIndex(const MotionIndex& motionIndex) = default;
33
34 MotionIndex::MotionIndex(MotionIndex&& rhs) noexcept = default;
35
36 MotionIndex::~MotionIndex()
37 {
38 }
39
40 MotionIndex& MotionIndex::operator=(const MotionIndex& handle) = default;
41
42 MotionIndex& MotionIndex::operator=(MotionIndex&& rhs) noexcept = default;
43
44 MotionIndex MotionIndex::DownCast(BaseHandle handle)
45 {
46   return MotionIndex(dynamic_cast<Dali::Scene3D::Internal::MotionIndex*>(handle.GetObjectPtr()));
47 }
48
49 MotionIndex::MotionIndex(Dali::Scene3D::Internal::MotionIndex* internal)
50 : BaseHandle(internal)
51 {
52 }
53
54 // Public Method
55
56 void MotionIndex::SetModelNodeId(Property::Key modelNodeId)
57 {
58   GetImplementation(*this).SetModelNodeId(modelNodeId);
59 }
60
61 Property::Key MotionIndex::GetModelNodeId() const
62 {
63   return GetImplementation(*this).GetModelNodeId();
64 }
65
66 std::string MotionIndex::GetPropertyName(ModelNode node)
67 {
68   return GetImplementation(*this).GetPropertyName(node);
69 }
70
71 Property::Index MotionIndex::GetPropertyIndex(ModelNode node)
72 {
73   return GetImplementation(*this).GetPropertyIndex(node);
74 }
75
76 } // namespace Scene3D
77
78 } // namespace Dali