8f00524f4571eb7b9b34fd7db68dd6a732f86369
[platform/core/uifw/rive-tizen.git] / submodule / include / generated / drawable_base.hpp
1 #ifndef _RIVE_DRAWABLE_BASE_HPP_
2 #define _RIVE_DRAWABLE_BASE_HPP_
3 #include "core/field_types/core_uint_type.hpp"
4 #include "node.hpp"
5 namespace rive
6 {
7         class DrawableBase : public Node
8         {
9         protected:
10                 typedef Node Super;
11
12         public:
13                 static const int typeKey = 13;
14
15                 /// Helper to quickly determine if a core object extends another without
16                 /// RTTI at runtime.
17                 bool isTypeOf(int typeKey) const override
18                 {
19                         switch (typeKey)
20                         {
21                                 case DrawableBase::typeKey:
22                                 case NodeBase::typeKey:
23                                 case TransformComponentBase::typeKey:
24                                 case ContainerComponentBase::typeKey:
25                                 case ComponentBase::typeKey:
26                                         return true;
27                                 default:
28                                         return false;
29                         }
30                 }
31
32                 int coreType() const override { return typeKey; }
33
34                 static const int blendModeValuePropertyKey = 23;
35
36         private:
37                 int m_BlendModeValue = 3;
38         public:
39                 inline int blendModeValue() const { return m_BlendModeValue; }
40                 void blendModeValue(int value)
41                 {
42                         if (m_BlendModeValue == value)
43                         {
44                                 return;
45                         }
46                         m_BlendModeValue = value;
47                         blendModeValueChanged();
48                 }
49
50                 bool deserialize(int propertyKey, BinaryReader& reader) override
51                 {
52                         switch (propertyKey)
53                         {
54                                 case blendModeValuePropertyKey:
55                                         m_BlendModeValue = CoreUintType::deserialize(reader);
56                                         return true;
57                         }
58                         return Node::deserialize(propertyKey, reader);
59                 }
60
61         protected:
62                 virtual void blendModeValueChanged() {}
63         };
64 } // namespace rive
65
66 #endif