[Adaptation Layer] Added rive-tizen adaptation layer class.
[platform/core/uifw/rive-tizen.git] / submodule / include / generated / animation / transition_value_condition_base.hpp
1 #ifndef _RIVE_TRANSITION_VALUE_CONDITION_BASE_HPP_
2 #define _RIVE_TRANSITION_VALUE_CONDITION_BASE_HPP_
3 #include "animation/transition_condition.hpp"
4 #include "core/field_types/core_uint_type.hpp"
5 namespace rive
6 {
7         class TransitionValueConditionBase : public TransitionCondition
8         {
9         protected:
10                 typedef TransitionCondition Super;
11
12         public:
13                 static const uint16_t typeKey = 69;
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 TransitionValueConditionBase::typeKey:
22                                 case TransitionConditionBase::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 opValuePropertyKey = 156;
32
33         private:
34                 int m_OpValue = 0;
35         public:
36                 inline int opValue() const { return m_OpValue; }
37                 void opValue(int value)
38                 {
39                         if (m_OpValue == value)
40                         {
41                                 return;
42                         }
43                         m_OpValue = value;
44                         opValueChanged();
45                 }
46
47                 void copy(const TransitionValueConditionBase& object)
48                 {
49                         m_OpValue = object.m_OpValue;
50                         TransitionCondition::copy(object);
51                 }
52
53                 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
54                 {
55                         switch (propertyKey)
56                         {
57                                 case opValuePropertyKey:
58                                         m_OpValue = CoreUintType::deserialize(reader);
59                                         return true;
60                         }
61                         return TransitionCondition::deserialize(propertyKey, reader);
62                 }
63
64         protected:
65                 virtual void opValueChanged() {}
66         };
67 } // namespace rive
68
69 #endif