[Adaptation Layer] Added rive-tizen adaptation layer class.
[platform/core/uifw/rive-tizen.git] / submodule / include / generated / animation / transition_number_condition_base.hpp
1 #ifndef _RIVE_TRANSITION_NUMBER_CONDITION_BASE_HPP_
2 #define _RIVE_TRANSITION_NUMBER_CONDITION_BASE_HPP_
3 #include "animation/transition_value_condition.hpp"
4 #include "core/field_types/core_double_type.hpp"
5 namespace rive
6 {
7         class TransitionNumberConditionBase : public TransitionValueCondition
8         {
9         protected:
10                 typedef TransitionValueCondition Super;
11
12         public:
13                 static const uint16_t typeKey = 70;
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 TransitionNumberConditionBase::typeKey:
22                                 case TransitionValueConditionBase::typeKey:
23                                 case TransitionConditionBase::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 valuePropertyKey = 157;
33
34         private:
35                 float m_Value = 0.0f;
36         public:
37                 inline float value() const { return m_Value; }
38                 void value(float value)
39                 {
40                         if (m_Value == value)
41                         {
42                                 return;
43                         }
44                         m_Value = value;
45                         valueChanged();
46                 }
47
48                 Core* clone() const override;
49                 void copy(const TransitionNumberConditionBase& object)
50                 {
51                         m_Value = object.m_Value;
52                         TransitionValueCondition::copy(object);
53                 }
54
55                 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
56                 {
57                         switch (propertyKey)
58                         {
59                                 case valuePropertyKey:
60                                         m_Value = CoreDoubleType::deserialize(reader);
61                                         return true;
62                         }
63                         return TransitionValueCondition::deserialize(propertyKey, reader);
64                 }
65
66         protected:
67                 virtual void valueChanged() {}
68         };
69 } // namespace rive
70
71 #endif