Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / rive-cpp / include / rive / generated / animation / blend_animation_direct_base.hpp
1 #ifndef _RIVE_BLEND_ANIMATION_DIRECT_BASE_HPP_
2 #define _RIVE_BLEND_ANIMATION_DIRECT_BASE_HPP_
3 #include "rive/animation/blend_animation.hpp"
4 #include "rive/core/field_types/core_uint_type.hpp"
5 namespace rive {
6     class BlendAnimationDirectBase : public BlendAnimation {
7     protected:
8         typedef BlendAnimation Super;
9
10     public:
11         static const uint16_t typeKey = 77;
12
13         /// Helper to quickly determine if a core object extends another without RTTI
14         /// at runtime.
15         bool isTypeOf(uint16_t typeKey) const override {
16             switch (typeKey) {
17                 case BlendAnimationDirectBase::typeKey:
18                 case BlendAnimationBase::typeKey:
19                     return true;
20                 default:
21                     return false;
22             }
23         }
24
25         uint16_t coreType() const override { return typeKey; }
26
27         static const uint16_t inputIdPropertyKey = 168;
28
29     private:
30         uint32_t m_InputId = -1;
31
32     public:
33         inline uint32_t inputId() const { return m_InputId; }
34         void inputId(uint32_t value) {
35             if (m_InputId == value) {
36                 return;
37             }
38             m_InputId = value;
39             inputIdChanged();
40         }
41
42         Core* clone() const override;
43         void copy(const BlendAnimationDirectBase& object) {
44             m_InputId = object.m_InputId;
45             BlendAnimation::copy(object);
46         }
47
48         bool deserialize(uint16_t propertyKey, BinaryReader& reader) override {
49             switch (propertyKey) {
50                 case inputIdPropertyKey:
51                     m_InputId = CoreUintType::deserialize(reader);
52                     return true;
53             }
54             return BlendAnimation::deserialize(propertyKey, reader);
55         }
56
57     protected:
58         virtual void inputIdChanged() {}
59     };
60 } // namespace rive
61
62 #endif