up-to-date submodule(rive-cpp)
[platform/core/uifw/rive-tizen.git] / submodule / include / generated / shapes / cubic_detached_vertex_base.hpp
1 #ifndef _RIVE_CUBIC_DETACHED_VERTEX_BASE_HPP_
2 #define _RIVE_CUBIC_DETACHED_VERTEX_BASE_HPP_
3 #include "core/field_types/core_double_type.hpp"
4 #include "shapes/cubic_vertex.hpp"
5 namespace rive
6 {
7         class CubicDetachedVertexBase : public CubicVertex
8         {
9         protected:
10                 typedef CubicVertex Super;
11
12         public:
13                 static const uint16_t typeKey = 6;
14
15                 /// Helper to quickly determine if a core object extends another without
16                 /// RTTI at runtime.
17                 bool isTypeOf(uint16_t typeKey) const override
18                 {
19                         switch (typeKey)
20                         {
21                                 case CubicDetachedVertexBase::typeKey:
22                                 case CubicVertexBase::typeKey:
23                                 case PathVertexBase::typeKey:
24                                 case ContainerComponentBase::typeKey:
25                                 case ComponentBase::typeKey:
26                                         return true;
27                                 default:
28                                         return false;
29                         }
30                 }
31
32                 uint16_t coreType() const override { return typeKey; }
33
34                 static const uint16_t inRotationPropertyKey = 84;
35                 static const uint16_t inDistancePropertyKey = 85;
36                 static const uint16_t outRotationPropertyKey = 86;
37                 static const uint16_t outDistancePropertyKey = 87;
38
39         private:
40                 float m_InRotation = 0.0f;
41                 float m_InDistance = 0.0f;
42                 float m_OutRotation = 0.0f;
43                 float m_OutDistance = 0.0f;
44         public:
45                 inline float inRotation() const { return m_InRotation; }
46                 void inRotation(float value)
47                 {
48                         if (m_InRotation == value)
49                         {
50                                 return;
51                         }
52                         m_InRotation = value;
53                         inRotationChanged();
54                 }
55
56                 inline float inDistance() const { return m_InDistance; }
57                 void inDistance(float value)
58                 {
59                         if (m_InDistance == value)
60                         {
61                                 return;
62                         }
63                         m_InDistance = value;
64                         inDistanceChanged();
65                 }
66
67                 inline float outRotation() const { return m_OutRotation; }
68                 void outRotation(float value)
69                 {
70                         if (m_OutRotation == value)
71                         {
72                                 return;
73                         }
74                         m_OutRotation = value;
75                         outRotationChanged();
76                 }
77
78                 inline float outDistance() const { return m_OutDistance; }
79                 void outDistance(float value)
80                 {
81                         if (m_OutDistance == value)
82                         {
83                                 return;
84                         }
85                         m_OutDistance = value;
86                         outDistanceChanged();
87                 }
88
89                 Core* clone() const override;
90                 void copy(const CubicDetachedVertexBase& object)
91                 {
92                         m_InRotation = object.m_InRotation;
93                         m_InDistance = object.m_InDistance;
94                         m_OutRotation = object.m_OutRotation;
95                         m_OutDistance = object.m_OutDistance;
96                         CubicVertex::copy(object);
97                 }
98
99                 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
100                 {
101                         switch (propertyKey)
102                         {
103                                 case inRotationPropertyKey:
104                                         m_InRotation = CoreDoubleType::deserialize(reader);
105                                         return true;
106                                 case inDistancePropertyKey:
107                                         m_InDistance = CoreDoubleType::deserialize(reader);
108                                         return true;
109                                 case outRotationPropertyKey:
110                                         m_OutRotation = CoreDoubleType::deserialize(reader);
111                                         return true;
112                                 case outDistancePropertyKey:
113                                         m_OutDistance = CoreDoubleType::deserialize(reader);
114                                         return true;
115                         }
116                         return CubicVertex::deserialize(propertyKey, reader);
117                 }
118
119         protected:
120                 virtual void inRotationChanged() {}
121                 virtual void inDistanceChanged() {}
122                 virtual void outRotationChanged() {}
123                 virtual void outDistanceChanged() {}
124         };
125 } // namespace rive
126
127 #endif