Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / rive-cpp / include / rive / generated / nested_artboard_base.hpp
1 #ifndef _RIVE_NESTED_ARTBOARD_BASE_HPP_
2 #define _RIVE_NESTED_ARTBOARD_BASE_HPP_
3 #include "rive/core/field_types/core_uint_type.hpp"
4 #include "rive/drawable.hpp"
5 namespace rive {
6     class NestedArtboardBase : public Drawable {
7     protected:
8         typedef Drawable Super;
9
10     public:
11         static const uint16_t typeKey = 92;
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 NestedArtboardBase::typeKey:
18                 case DrawableBase::typeKey:
19                 case NodeBase::typeKey:
20                 case TransformComponentBase::typeKey:
21                 case WorldTransformComponentBase::typeKey:
22                 case ContainerComponentBase::typeKey:
23                 case ComponentBase::typeKey:
24                     return true;
25                 default:
26                     return false;
27             }
28         }
29
30         uint16_t coreType() const override { return typeKey; }
31
32         static const uint16_t artboardIdPropertyKey = 197;
33
34     private:
35         uint32_t m_ArtboardId = -1;
36
37     public:
38         inline uint32_t artboardId() const { return m_ArtboardId; }
39         void artboardId(uint32_t value) {
40             if (m_ArtboardId == value) {
41                 return;
42             }
43             m_ArtboardId = value;
44             artboardIdChanged();
45         }
46
47         Core* clone() const override;
48         void copy(const NestedArtboardBase& object) {
49             m_ArtboardId = object.m_ArtboardId;
50             Drawable::copy(object);
51         }
52
53         bool deserialize(uint16_t propertyKey, BinaryReader& reader) override {
54             switch (propertyKey) {
55                 case artboardIdPropertyKey:
56                     m_ArtboardId = CoreUintType::deserialize(reader);
57                     return true;
58             }
59             return Drawable::deserialize(propertyKey, reader);
60         }
61
62     protected:
63         virtual void artboardIdChanged() {}
64     };
65 } // namespace rive
66
67 #endif