[Adaptation Layer] Added rive-tizen adaptation layer class.
[platform/core/uifw/rive-tizen.git] / submodule / include / generated / animation / state_machine_component_base.hpp
1 #ifndef _RIVE_STATE_MACHINE_COMPONENT_BASE_HPP_
2 #define _RIVE_STATE_MACHINE_COMPONENT_BASE_HPP_
3 #include <string>
4 #include "core.hpp"
5 #include "core/field_types/core_string_type.hpp"
6 namespace rive
7 {
8         class StateMachineComponentBase : public Core
9         {
10         protected:
11                 typedef Core Super;
12
13         public:
14                 static const uint16_t typeKey = 54;
15
16                 /// Helper to quickly determine if a core object extends another without
17                 /// RTTI at runtime.
18                 bool isTypeOf(uint16_t typeKey) const override
19                 {
20                         switch (typeKey)
21                         {
22                                 case StateMachineComponentBase::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 namePropertyKey = 138;
32
33         private:
34                 std::string m_Name = "";
35         public:
36                 inline const std::string& name() const { return m_Name; }
37                 void name(std::string value)
38                 {
39                         if (m_Name == value)
40                         {
41                                 return;
42                         }
43                         m_Name = value;
44                         nameChanged();
45                 }
46
47                 void copy(const StateMachineComponentBase& object)
48                 {
49                         m_Name = object.m_Name;
50                 }
51
52                 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
53                 {
54                         switch (propertyKey)
55                         {
56                                 case namePropertyKey:
57                                         m_Name = CoreStringType::deserialize(reader);
58                                         return true;
59                         }
60                         return false;
61                 }
62
63         protected:
64                 virtual void nameChanged() {}
65         };
66 } // namespace rive
67
68 #endif