f852e11c728113217f30e8aeffa18bfccd8f8e2d
[platform/core/uifw/rive-tizen.git] / submodule / include / generated / shapes / points_path_base.hpp
1 #ifndef _RIVE_POINTS_PATH_BASE_HPP_
2 #define _RIVE_POINTS_PATH_BASE_HPP_
3 #include "core/field_types/core_bool_type.hpp"
4 #include "shapes/path.hpp"
5 namespace rive
6 {
7         class PointsPathBase : public Path
8         {
9         protected:
10                 typedef Path Super;
11
12         public:
13                 static const uint16_t typeKey = 16;
14
15                 /// Helper to quickly determine if a core object extends another without
16                 /// RTTI at runtime.
17                 bool isTypeOf(uint16_t typeKey) const override
18                 {
19                         switch (typeKey)
20                         {
21                                 case PointsPathBase::typeKey:
22                                 case PathBase::typeKey:
23                                 case NodeBase::typeKey:
24                                 case TransformComponentBase::typeKey:
25                                 case ContainerComponentBase::typeKey:
26                                 case ComponentBase::typeKey:
27                                         return true;
28                                 default:
29                                         return false;
30                         }
31                 }
32
33                 uint16_t coreType() const override { return typeKey; }
34
35                 static const uint16_t isClosedPropertyKey = 32;
36
37         private:
38                 bool m_IsClosed = false;
39         public:
40                 inline bool isClosed() const { return m_IsClosed; }
41                 void isClosed(bool value)
42                 {
43                         if (m_IsClosed == value)
44                         {
45                                 return;
46                         }
47                         m_IsClosed = value;
48                         isClosedChanged();
49                 }
50
51                 Core* clone() const override;
52                 void copy(const PointsPathBase& object)
53                 {
54                         m_IsClosed = object.m_IsClosed;
55                         Path::copy(object);
56                 }
57
58                 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
59                 {
60                         switch (propertyKey)
61                         {
62                                 case isClosedPropertyKey:
63                                         m_IsClosed = CoreBoolType::deserialize(reader);
64                                         return true;
65                         }
66                         return Path::deserialize(propertyKey, reader);
67                 }
68
69         protected:
70                 virtual void isClosedChanged() {}
71         };
72 } // namespace rive
73
74 #endif