submodule: add rive-cpp to rive-tizen as submodule
[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 "core.hpp"
4 #include "core/field_types/core_string_type.hpp"
5 #include <string>
6 namespace rive
7 {
8         class AnimationBase : public Core
9         {
10         protected:
11                 typedef Core Super;
12
13         public:
14                 static const int typeKey = 27;
15
16                 /// Helper to quickly determine if a core object extends another without
17                 /// RTTI at runtime.
18                 bool isTypeOf(int typeKey) const override
19                 {
20                         switch (typeKey)
21                         {
22                                 case AnimationBase::typeKey:
23                                         return true;
24                                 default:
25                                         return false;
26                         }
27                 }
28
29                 int coreType() const override { return typeKey; }
30
31                 static const int namePropertyKey = 55;
32
33         private:
34                 std::string m_Name = "";
35         public:
36                 inline 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                 bool deserialize(int propertyKey, BinaryReader& reader) override
48                 {
49                         switch (propertyKey)
50                         {
51                                 case namePropertyKey:
52                                         m_Name = CoreStringType::deserialize(reader);
53                                         return true;
54                         }
55                         return false;
56                 }
57
58         protected:
59                 virtual void nameChanged() {}
60         };
61 } // namespace rive
62
63 #endif