Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / rive-cpp / include / rive / generated / animation / event_input_change_base.hpp
1 #ifndef _RIVE_EVENT_INPUT_CHANGE_BASE_HPP_
2 #define _RIVE_EVENT_INPUT_CHANGE_BASE_HPP_
3 #include "rive/core.hpp"
4 #include "rive/core/field_types/core_uint_type.hpp"
5 namespace rive {
6     class EventInputChangeBase : public Core {
7     protected:
8         typedef Core Super;
9
10     public:
11         static const uint16_t typeKey = 116;
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 EventInputChangeBase::typeKey:
18                     return true;
19                 default:
20                     return false;
21             }
22         }
23
24         uint16_t coreType() const override { return typeKey; }
25
26         static const uint16_t inputIdPropertyKey = 227;
27
28     private:
29         uint32_t m_InputId = -1;
30
31     public:
32         inline uint32_t inputId() const { return m_InputId; }
33         void inputId(uint32_t value) {
34             if (m_InputId == value) {
35                 return;
36             }
37             m_InputId = value;
38             inputIdChanged();
39         }
40
41         void copy(const EventInputChangeBase& object) { m_InputId = object.m_InputId; }
42
43         bool deserialize(uint16_t propertyKey, BinaryReader& reader) override {
44             switch (propertyKey) {
45                 case inputIdPropertyKey:
46                     m_InputId = CoreUintType::deserialize(reader);
47                     return true;
48             }
49             return false;
50         }
51
52     protected:
53         virtual void inputIdChanged() {}
54     };
55 } // namespace rive
56
57 #endif