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                 Core* clone() const override;
88                 void copy(const CubicWeightBase& object)
89                 {
90                         m_InValues = object.m_InValues;
91                         m_InIndices = object.m_InIndices;
92                         m_OutValues = object.m_OutValues;
93                         m_OutIndices = object.m_OutIndices;
94                         Weight::copy(object);
95                 }
96
97                 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
98                 {
99                         switch (propertyKey)
100                         {
101                                 case inValuesPropertyKey:
102                                         m_InValues = CoreUintType::deserialize(reader);
103                                         return true;
104                                 case inIndicesPropertyKey:
105                                         m_InIndices = CoreUintType::deserialize(reader);
106                                         return true;
107                                 case outValuesPropertyKey:
108                                         m_OutValues = CoreUintType::deserialize(reader);
109                                         return true;
110                                 case outIndicesPropertyKey:
111                                         m_OutIndices = CoreUintType::deserialize(reader);
112                                         return true;
113                         }
114                         return Weight::deserialize(propertyKey, reader);
115                 }
116
117         protected:
118                 virtual void inValuesChanged() {}
119                 virtual void inIndicesChanged() {}
120                 virtual void outValuesChanged() {}
121                 virtual void outIndicesChanged() {}
122         };
123 } // namespace rive
124
125 #endif