[Adaptation Layer] Added rive-tizen adaptation layer class.
[platform/core/uifw/rive-tizen.git] / submodule / include / generated / bones / tendon_base.hpp
1 #ifndef _RIVE_TENDON_BASE_HPP_
2 #define _RIVE_TENDON_BASE_HPP_
3 #include "component.hpp"
4 #include "core/field_types/core_double_type.hpp"
5 #include "core/field_types/core_uint_type.hpp"
6 namespace rive
7 {
8         class TendonBase : public Component
9         {
10         protected:
11                 typedef Component Super;
12
13         public:
14                 static const uint16_t typeKey = 44;
15
16                 /// Helper to quickly determine if a core object extends another without
17                 /// RTTI at runtime.
18                 bool isTypeOf(uint16_t typeKey) const override
19                 {
20                         switch (typeKey)
21                         {
22                                 case TendonBase::typeKey:
23                                 case ComponentBase::typeKey:
24                                         return true;
25                                 default:
26                                         return false;
27                         }
28                 }
29
30                 uint16_t coreType() const override { return typeKey; }
31
32                 static const uint16_t boneIdPropertyKey = 95;
33                 static const uint16_t xxPropertyKey = 96;
34                 static const uint16_t yxPropertyKey = 97;
35                 static const uint16_t xyPropertyKey = 98;
36                 static const uint16_t yyPropertyKey = 99;
37                 static const uint16_t txPropertyKey = 100;
38                 static const uint16_t tyPropertyKey = 101;
39
40         private:
41                 int m_BoneId = -1;
42                 float m_Xx = 1.0f;
43                 float m_Yx = 0.0f;
44                 float m_Xy = 0.0f;
45                 float m_Yy = 1.0f;
46                 float m_Tx = 0.0f;
47                 float m_Ty = 0.0f;
48         public:
49                 inline int boneId() const { return m_BoneId; }
50                 void boneId(int value)
51                 {
52                         if (m_BoneId == value)
53                         {
54                                 return;
55                         }
56                         m_BoneId = value;
57                         boneIdChanged();
58                 }
59
60                 inline float xx() const { return m_Xx; }
61                 void xx(float value)
62                 {
63                         if (m_Xx == value)
64                         {
65                                 return;
66                         }
67                         m_Xx = value;
68                         xxChanged();
69                 }
70
71                 inline float yx() const { return m_Yx; }
72                 void yx(float value)
73                 {
74                         if (m_Yx == value)
75                         {
76                                 return;
77                         }
78                         m_Yx = value;
79                         yxChanged();
80                 }
81
82                 inline float xy() const { return m_Xy; }
83                 void xy(float value)
84                 {
85                         if (m_Xy == value)
86                         {
87                                 return;
88                         }
89                         m_Xy = value;
90                         xyChanged();
91                 }
92
93                 inline float yy() const { return m_Yy; }
94                 void yy(float value)
95                 {
96                         if (m_Yy == value)
97                         {
98                                 return;
99                         }
100                         m_Yy = value;
101                         yyChanged();
102                 }
103
104                 inline float tx() const { return m_Tx; }
105                 void tx(float value)
106                 {
107                         if (m_Tx == value)
108                         {
109                                 return;
110                         }
111                         m_Tx = value;
112                         txChanged();
113                 }
114
115                 inline float ty() const { return m_Ty; }
116                 void ty(float value)
117                 {
118                         if (m_Ty == value)
119                         {
120                                 return;
121                         }
122                         m_Ty = value;
123                         tyChanged();
124                 }
125
126                 Core* clone() const override;
127                 void copy(const TendonBase& object)
128                 {
129                         m_BoneId = object.m_BoneId;
130                         m_Xx = object.m_Xx;
131                         m_Yx = object.m_Yx;
132                         m_Xy = object.m_Xy;
133                         m_Yy = object.m_Yy;
134                         m_Tx = object.m_Tx;
135                         m_Ty = object.m_Ty;
136                         Component::copy(object);
137                 }
138
139                 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
140                 {
141                         switch (propertyKey)
142                         {
143                                 case boneIdPropertyKey:
144                                         m_BoneId = CoreUintType::deserialize(reader);
145                                         return true;
146                                 case xxPropertyKey:
147                                         m_Xx = CoreDoubleType::deserialize(reader);
148                                         return true;
149                                 case yxPropertyKey:
150                                         m_Yx = CoreDoubleType::deserialize(reader);
151                                         return true;
152                                 case xyPropertyKey:
153                                         m_Xy = CoreDoubleType::deserialize(reader);
154                                         return true;
155                                 case yyPropertyKey:
156                                         m_Yy = CoreDoubleType::deserialize(reader);
157                                         return true;
158                                 case txPropertyKey:
159                                         m_Tx = CoreDoubleType::deserialize(reader);
160                                         return true;
161                                 case tyPropertyKey:
162                                         m_Ty = CoreDoubleType::deserialize(reader);
163                                         return true;
164                         }
165                         return Component::deserialize(propertyKey, reader);
166                 }
167
168         protected:
169                 virtual void boneIdChanged() {}
170                 virtual void xxChanged() {}
171                 virtual void yxChanged() {}
172                 virtual void xyChanged() {}
173                 virtual void yyChanged() {}
174                 virtual void txChanged() {}
175                 virtual void tyChanged() {}
176         };
177 } // namespace rive
178
179 #endif