Clean up the code to build successfully on macOS
[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()
29 {
30 }
31
32 TypeInfo::~TypeInfo()
33 {
34 }
35
36 TypeInfo::TypeInfo(const TypeInfo& copy) = default;
37
38 TypeInfo& TypeInfo::operator=(const TypeInfo& rhs) = default;
39
40 TypeInfo::TypeInfo(TypeInfo&& rhs) = default;
41
42 TypeInfo& TypeInfo::operator=(TypeInfo&& rhs) = default;
43
44 const std::string& TypeInfo::GetName() const
45 {
46   return GetImplementation(*this).GetName();
47 }
48
49 const std::string& TypeInfo::GetBaseName() const
50 {
51   return GetImplementation(*this).GetBaseName();
52 }
53
54 BaseHandle TypeInfo::CreateInstance() const
55 {
56   return GetImplementation(*this).CreateInstance();
57 }
58
59 TypeInfo::CreateFunction TypeInfo::GetCreator() const
60 {
61   return GetImplementation(*this).GetCreator();
62 }
63
64 size_t TypeInfo::GetActionCount() const
65 {
66   return GetImplementation(*this).GetActionCount();
67 }
68
69 std::string TypeInfo::GetActionName(size_t index)
70 {
71   return GetImplementation(*this).GetActionName(static_cast<uint32_t>(index));
72 }
73
74 size_t TypeInfo::GetSignalCount() const
75 {
76   return GetImplementation(*this).GetSignalCount();
77 }
78
79 std::string TypeInfo::GetSignalName(size_t index)
80 {
81   return GetImplementation(*this).GetSignalName(static_cast<uint32_t>(index));
82 }
83
84 size_t TypeInfo::GetPropertyCount() const
85 {
86   return GetImplementation(*this).GetPropertyCount();
87 }
88
89 void TypeInfo::GetPropertyIndices(Property::IndexContainer& indices) const
90 {
91   indices.Clear(); // We do not want to clear the container if called internally, so only clear here
92   GetImplementation(*this).GetPropertyIndices(indices);
93 }
94
95 const std::string& TypeInfo::GetPropertyName(Property::Index index) const
96 {
97   return GetImplementation(*this).GetRegisteredPropertyName(index);
98 }
99
100 Property::Index TypeInfo::GetChildPropertyIndex(const std::string& name) const
101 {
102   return GetImplementation(*this).GetChildPropertyIndex(name);
103 }
104
105 const std::string& TypeInfo::GetChildPropertyName(Property::Index index) const
106 {
107   return GetImplementation(*this).GetChildPropertyName(index);
108 }
109
110 Property::Type TypeInfo::GetChildPropertyType(Property::Index index) const
111 {
112   return GetImplementation(*this).GetChildPropertyType(index);
113 }
114
115 void TypeInfo::GetChildPropertyIndices(Property::IndexContainer& indices) const
116 {
117   indices.Clear(); // We do not want to clear the container if called internally, so only clear here
118   GetImplementation(*this).GetChildPropertyIndices(indices);
119 }
120
121 TypeInfo::TypeInfo(Internal::TypeInfo* internal)
122 : BaseHandle(internal)
123 {
124 }
125
126 } // namespace Dali