[Adaptation Layer] Added rive-tizen adaptation layer class.
[platform/core/uifw/rive-tizen.git] / submodule / include / generated / shapes / path_vertex_base.hpp
1 #ifndef _RIVE_PATH_VERTEX_BASE_HPP_
2 #define _RIVE_PATH_VERTEX_BASE_HPP_
3 #include "container_component.hpp"
4 #include "core/field_types/core_double_type.hpp"
5 namespace rive
6 {
7         class PathVertexBase : public ContainerComponent
8         {
9         protected:
10                 typedef ContainerComponent Super;
11
12         public:
13                 static const uint16_t typeKey = 14;
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 PathVertexBase::typeKey:
22                                 case ContainerComponentBase::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 xPropertyKey = 24;
33                 static const uint16_t yPropertyKey = 25;
34
35         private:
36                 float m_X = 0.0f;
37                 float m_Y = 0.0f;
38         public:
39                 inline float x() const { return m_X; }
40                 void x(float value)
41                 {
42                         if (m_X == value)
43                         {
44                                 return;
45                         }
46                         m_X = value;
47                         xChanged();
48                 }
49
50                 inline float y() const { return m_Y; }
51                 void y(float value)
52                 {
53                         if (m_Y == value)
54                         {
55                                 return;
56                         }
57                         m_Y = value;
58                         yChanged();
59                 }
60
61                 void copy(const PathVertexBase& object)
62                 {
63                         m_X = object.m_X;
64                         m_Y = object.m_Y;
65                         ContainerComponent::copy(object);
66                 }
67
68                 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
69                 {
70                         switch (propertyKey)
71                         {
72                                 case xPropertyKey:
73                                         m_X = CoreDoubleType::deserialize(reader);
74                                         return true;
75                                 case yPropertyKey:
76                                         m_Y = CoreDoubleType::deserialize(reader);
77                                         return true;
78                         }
79                         return ContainerComponent::deserialize(propertyKey, reader);
80                 }
81
82         protected:
83                 virtual void xChanged() {}
84                 virtual void yChanged() {}
85         };
86 } // namespace rive
87
88 #endif