[Adaptation Layer] Added rive-tizen adaptation layer class.
[platform/core/uifw/rive-tizen.git] / submodule / include / generated / animation / animation_base.hpp
1 #ifndef _RIVE_ANIMATION_BASE_HPP_
2 #define _RIVE_ANIMATION_BASE_HPP_
3 #include <string>
4 #include "core.hpp"
5 #include "core/field_types/core_string_type.hpp"
6 namespace rive
7 {
8         class AnimationBase : public Core
9         {
10         protected:
11                 typedef Core Super;
12
13         public:
14                 static const uint16_t typeKey = 27;
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 AnimationBase::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 = 55;
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                 Core* clone() const override;
48                 void copy(const AnimationBase& object) { m_Name = object.m_Name; }
49
50                 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
51                 {
52                         switch (propertyKey)
53                         {
54                                 case namePropertyKey:
55                                         m_Name = CoreStringType::deserialize(reader);
56                                         return true;
57                         }
58                         return false;
59                 }
60
61         protected:
62                 virtual void nameChanged() {}
63         };
64 } // namespace rive
65
66 #endif