dc5cd7d559af3a5a95020a4c88245c68379a25fa
[platform/core/uifw/rive-tizen.git] / submodule / include / generated / shapes / clipping_shape_base.hpp
1 #ifndef _RIVE_CLIPPING_SHAPE_BASE_HPP_
2 #define _RIVE_CLIPPING_SHAPE_BASE_HPP_
3 #include "component.hpp"
4 #include "core/field_types/core_bool_type.hpp"
5 #include "core/field_types/core_uint_type.hpp"
6 namespace rive
7 {
8         class ClippingShapeBase : public Component
9         {
10         protected:
11                 typedef Component Super;
12
13         public:
14                 static const uint16_t typeKey = 42;
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 ClippingShapeBase::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 sourceIdPropertyKey = 92;
33                 static const uint16_t fillRulePropertyKey = 93;
34                 static const uint16_t isVisiblePropertyKey = 94;
35
36         private:
37                 int m_SourceId = -1;
38                 int m_FillRule = 0;
39                 bool m_IsVisible = true;
40         public:
41                 inline int sourceId() const { return m_SourceId; }
42                 void sourceId(int value)
43                 {
44                         if (m_SourceId == value)
45                         {
46                                 return;
47                         }
48                         m_SourceId = value;
49                         sourceIdChanged();
50                 }
51
52                 inline int fillRule() const { return m_FillRule; }
53                 void fillRule(int value)
54                 {
55                         if (m_FillRule == value)
56                         {
57                                 return;
58                         }
59                         m_FillRule = value;
60                         fillRuleChanged();
61                 }
62
63                 inline bool isVisible() const { return m_IsVisible; }
64                 void isVisible(bool value)
65                 {
66                         if (m_IsVisible == value)
67                         {
68                                 return;
69                         }
70                         m_IsVisible = value;
71                         isVisibleChanged();
72                 }
73
74                 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
75                 {
76                         switch (propertyKey)
77                         {
78                                 case sourceIdPropertyKey:
79                                         m_SourceId = CoreUintType::deserialize(reader);
80                                         return true;
81                                 case fillRulePropertyKey:
82                                         m_FillRule = CoreUintType::deserialize(reader);
83                                         return true;
84                                 case isVisiblePropertyKey:
85                                         m_IsVisible = CoreBoolType::deserialize(reader);
86                                         return true;
87                         }
88                         return Component::deserialize(propertyKey, reader);
89                 }
90
91         protected:
92                 virtual void sourceIdChanged() {}
93                 virtual void fillRuleChanged() {}
94                 virtual void isVisibleChanged() {}
95         };
96 } // namespace rive
97
98 #endif