use modern construct '= default' for special functions.
[platform/core/uifw/dali-core.git] / dali / public-api / object / type-info.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/object/type-info.h>
20
21 // EXTERNAL INCLUDES
22
23 // INTERNAL INCLUDES
24 #include <dali/internal/event/common/type-info-impl.h>
25
26 namespace Dali
27 {
28 TypeInfo::TypeInfo() = default;
29
30 TypeInfo::~TypeInfo() = default;
31
32 TypeInfo::TypeInfo(const TypeInfo& copy) = default;
33
34 TypeInfo& TypeInfo::operator=(const TypeInfo& rhs) = default;
35
36 TypeInfo::TypeInfo(TypeInfo&& rhs) = default;
37
38 TypeInfo& TypeInfo::operator=(TypeInfo&& rhs) = default;
39
40 const std::string& TypeInfo::GetName() const
41 {
42   return GetImplementation(*this).GetName();
43 }
44
45 const std::string& TypeInfo::GetBaseName() const
46 {
47   return GetImplementation(*this).GetBaseName();
48 }
49
50 BaseHandle TypeInfo::CreateInstance() const
51 {
52   return GetImplementation(*this).CreateInstance();
53 }
54
55 TypeInfo::CreateFunction TypeInfo::GetCreator() const
56 {
57   return GetImplementation(*this).GetCreator();
58 }
59
60 size_t TypeInfo::GetActionCount() const
61 {
62   return GetImplementation(*this).GetActionCount();
63 }
64
65 std::string TypeInfo::GetActionName(size_t index)
66 {
67   return GetImplementation(*this).GetActionName(static_cast<uint32_t>(index));
68 }
69
70 size_t TypeInfo::GetSignalCount() const
71 {
72   return GetImplementation(*this).GetSignalCount();
73 }
74
75 std::string TypeInfo::GetSignalName(size_t index)
76 {
77   return GetImplementation(*this).GetSignalName(static_cast<uint32_t>(index));
78 }
79
80 size_t TypeInfo::GetPropertyCount() const
81 {
82   return GetImplementation(*this).GetPropertyCount();
83 }
84
85 void TypeInfo::GetPropertyIndices(Property::IndexContainer& indices) const
86 {
87   indices.Clear(); // We do not want to clear the container if called internally, so only clear here
88   GetImplementation(*this).GetPropertyIndices(indices);
89 }
90
91 const std::string& TypeInfo::GetPropertyName(Property::Index index) const
92 {
93   return GetImplementation(*this).GetRegisteredPropertyName(index);
94 }
95
96 Property::Index TypeInfo::GetChildPropertyIndex(const std::string& name) const
97 {
98   return GetImplementation(*this).GetChildPropertyIndex(name);
99 }
100
101 const std::string& TypeInfo::GetChildPropertyName(Property::Index index) const
102 {
103   return GetImplementation(*this).GetChildPropertyName(index);
104 }
105
106 Property::Type TypeInfo::GetChildPropertyType(Property::Index index) const
107 {
108   return GetImplementation(*this).GetChildPropertyType(index);
109 }
110
111 void TypeInfo::GetChildPropertyIndices(Property::IndexContainer& indices) const
112 {
113   indices.Clear(); // We do not want to clear the container if called internally, so only clear here
114   GetImplementation(*this).GetChildPropertyIndices(indices);
115 }
116
117 TypeInfo::TypeInfo(Internal::TypeInfo* internal)
118 : BaseHandle(internal)
119 {
120 }
121
122 } // namespace Dali