[Adaptation Layer] Added rive-tizen adaptation layer class.
[platform/core/uifw/rive-tizen.git] / submodule / include / generated / animation / state_transition_base.hpp
1 #ifndef _RIVE_STATE_TRANSITION_BASE_HPP_
2 #define _RIVE_STATE_TRANSITION_BASE_HPP_
3 #include "animation/state_machine_layer_component.hpp"
4 #include "core/field_types/core_uint_type.hpp"
5 namespace rive
6 {
7         class StateTransitionBase : public StateMachineLayerComponent
8         {
9         protected:
10                 typedef StateMachineLayerComponent Super;
11
12         public:
13                 static const uint16_t typeKey = 65;
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 StateTransitionBase::typeKey:
22                                 case StateMachineLayerComponentBase::typeKey:
23                                         return true;
24                                 default:
25                                         return false;
26                         }
27                 }
28
29                 uint16_t coreType() const override { return typeKey; }
30
31                 static const uint16_t stateToIdPropertyKey = 151;
32                 static const uint16_t flagsPropertyKey = 152;
33                 static const uint16_t durationPropertyKey = 158;
34                 static const uint16_t exitTimePropertyKey = 160;
35
36         private:
37                 int m_StateToId = -1;
38                 int m_Flags = 0;
39                 int m_Duration = 0;
40                 int m_ExitTime = 0;
41         public:
42                 inline int stateToId() const { return m_StateToId; }
43                 void stateToId(int value)
44                 {
45                         if (m_StateToId == value)
46                         {
47                                 return;
48                         }
49                         m_StateToId = value;
50                         stateToIdChanged();
51                 }
52
53                 inline int flags() const { return m_Flags; }
54                 void flags(int value)
55                 {
56                         if (m_Flags == value)
57                         {
58                                 return;
59                         }
60                         m_Flags = value;
61                         flagsChanged();
62                 }
63
64                 inline int duration() const { return m_Duration; }
65                 void duration(int value)
66                 {
67                         if (m_Duration == value)
68                         {
69                                 return;
70                         }
71                         m_Duration = value;
72                         durationChanged();
73                 }
74
75                 inline int exitTime() const { return m_ExitTime; }
76                 void exitTime(int value)
77                 {
78                         if (m_ExitTime == value)
79                         {
80                                 return;
81                         }
82                         m_ExitTime = value;
83                         exitTimeChanged();
84                 }
85
86                 Core* clone() const override;
87                 void copy(const StateTransitionBase& object)
88                 {
89                         m_StateToId = object.m_StateToId;
90                         m_Flags = object.m_Flags;
91                         m_Duration = object.m_Duration;
92                         m_ExitTime = object.m_ExitTime;
93                         StateMachineLayerComponent::copy(object);
94                 }
95
96                 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
97                 {
98                         switch (propertyKey)
99                         {
100                                 case stateToIdPropertyKey:
101                                         m_StateToId = CoreUintType::deserialize(reader);
102                                         return true;
103                                 case flagsPropertyKey:
104                                         m_Flags = CoreUintType::deserialize(reader);
105                                         return true;
106                                 case durationPropertyKey:
107                                         m_Duration = CoreUintType::deserialize(reader);
108                                         return true;
109                                 case exitTimePropertyKey:
110                                         m_ExitTime = CoreUintType::deserialize(reader);
111                                         return true;
112                         }
113                         return StateMachineLayerComponent::deserialize(propertyKey, reader);
114                 }
115
116         protected:
117                 virtual void stateToIdChanged() {}
118                 virtual void flagsChanged() {}
119                 virtual void durationChanged() {}
120                 virtual void exitTimeChanged() {}
121         };
122 } // namespace rive
123
124 #endif