up-to-date submodule(rive-cpp)
[platform/core/uifw/rive-tizen.git] / submodule / include / generated / bones / cubic_weight_base.hpp
1 #ifndef _RIVE_CUBIC_WEIGHT_BASE_HPP_
2 #define _RIVE_CUBIC_WEIGHT_BASE_HPP_
3 #include "bones/weight.hpp"
4 #include "core/field_types/core_uint_type.hpp"
5 namespace rive
6 {
7         class CubicWeightBase : public Weight
8         {
9         protected:
10                 typedef Weight Super;
11
12         public:
13                 static const uint16_t typeKey = 46;
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 CubicWeightBase::typeKey:
22                                 case WeightBase::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 inValuesPropertyKey = 110;
33                 static const uint16_t inIndicesPropertyKey = 111;
34                 static const uint16_t outValuesPropertyKey = 112;
35                 static const uint16_t outIndicesPropertyKey = 113;
36
37         private:
38                 int m_InValues = 255;
39                 int m_InIndices = 1;
40                 int m_OutValues = 255;
41                 int m_OutIndices = 1;
42         public:
43                 inline int inValues() const { return m_InValues; }
44                 void inValues(int value)
45                 {
46                         if (m_InValues == value)
47                         {
48                                 return;
49                         }
50                         m_InValues = value;
51                         inValuesChanged();
52                 }
53
54                 inline int inIndices() const { return m_InIndices; }
55                 void inIndices(int value)
56                 {
57                         if (m_InIndices == value)
58                         {
59                                 return;
60                         }
61                         m_InIndices = value;
62                         inIndicesChanged();
63                 }
64
65                 inline int outValues() const { return m_OutValues; }
66                 void outValues(int value)
67                 {
68                         if (m_OutValues == value)
69                         {
70                                 return;
71                         }
72                         m_OutValues = value;
73                         outValuesChanged();
74                 }
75
76                 inline int outIndices() const { return m_OutIndices; }
77                 void outIndices(int value)
78                 {
79                         if (m_OutIndices == value)
80                         {
81                                 return;
82                         }
83                         m_OutIndices = value;
84                         outIndicesChanged();
85                 }
86
87                 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
88                 {
89                         switch (propertyKey)
90                         {
91                                 case inValuesPropertyKey:
92                                         m_InValues = CoreUintType::deserialize(reader);
93                                         return true;
94                                 case inIndicesPropertyKey:
95                                         m_InIndices = CoreUintType::deserialize(reader);
96                                         return true;
97                                 case outValuesPropertyKey:
98                                         m_OutValues = CoreUintType::deserialize(reader);
99                                         return true;
100                                 case outIndicesPropertyKey:
101                                         m_OutIndices = CoreUintType::deserialize(reader);
102                                         return true;
103                         }
104                         return Weight::deserialize(propertyKey, reader);
105                 }
106
107         protected:
108                 virtual void inValuesChanged() {}
109                 virtual void inIndicesChanged() {}
110                 virtual void outValuesChanged() {}
111                 virtual void outIndicesChanged() {}
112         };
113 } // namespace rive
114
115 #endif