up-to-date submodule(rive-cpp)
[platform/core/uifw/rive-tizen.git] / submodule / include / generated / shapes / star_base.hpp
1 #ifndef _RIVE_STAR_BASE_HPP_
2 #define _RIVE_STAR_BASE_HPP_
3 #include "core/field_types/core_double_type.hpp"
4 #include "shapes/polygon.hpp"
5 namespace rive
6 {
7         class StarBase : public Polygon
8         {
9         protected:
10                 typedef Polygon Super;
11
12         public:
13                 static const uint16_t typeKey = 52;
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 StarBase::typeKey:
22                                 case PolygonBase::typeKey:
23                                 case ParametricPathBase::typeKey:
24                                 case PathBase::typeKey:
25                                 case NodeBase::typeKey:
26                                 case TransformComponentBase::typeKey:
27                                 case ContainerComponentBase::typeKey:
28                                 case ComponentBase::typeKey:
29                                         return true;
30                                 default:
31                                         return false;
32                         }
33                 }
34
35                 uint16_t coreType() const override { return typeKey; }
36
37                 static const uint16_t innerRadiusPropertyKey = 127;
38
39         private:
40                 float m_InnerRadius = 0.5f;
41         public:
42                 inline float innerRadius() const { return m_InnerRadius; }
43                 void innerRadius(float value)
44                 {
45                         if (m_InnerRadius == value)
46                         {
47                                 return;
48                         }
49                         m_InnerRadius = value;
50                         innerRadiusChanged();
51                 }
52
53                 Core* clone() const override;
54                 void copy(const StarBase& object)
55                 {
56                         m_InnerRadius = object.m_InnerRadius;
57                         Polygon::copy(object);
58                 }
59
60                 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
61                 {
62                         switch (propertyKey)
63                         {
64                                 case innerRadiusPropertyKey:
65                                         m_InnerRadius = CoreDoubleType::deserialize(reader);
66                                         return true;
67                         }
68                         return Polygon::deserialize(propertyKey, reader);
69                 }
70
71         protected:
72                 virtual void innerRadiusChanged() {}
73         };
74 } // namespace rive
75
76 #endif