2359c89a25d76060d4cb9daa311e3f6e03119e47
[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                 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
52                 {
53                         switch (propertyKey)
54                         {
55                                 case isClosedPropertyKey:
56                                         m_IsClosed = CoreBoolType::deserialize(reader);
57                                         return true;
58                         }
59                         return Path::deserialize(propertyKey, reader);
60                 }
61
62         protected:
63                 virtual void isClosedChanged() {}
64         };
65 } // namespace rive
66
67 #endif