10514581ef5be41f26839cf76f46f40834d43fbb
[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                 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
54                 {
55                         switch (propertyKey)
56                         {
57                                 case innerRadiusPropertyKey:
58                                         m_InnerRadius = CoreDoubleType::deserialize(reader);
59                                         return true;
60                         }
61                         return Polygon::deserialize(propertyKey, reader);
62                 }
63
64         protected:
65                 virtual void innerRadiusChanged() {}
66         };
67 } // namespace rive
68
69 #endif