1 #ifndef _RIVE_KEYED_PROPERTY_BASE_HPP_
2 #define _RIVE_KEYED_PROPERTY_BASE_HPP_
4 #include "core/field_types/core_uint_type.hpp"
7 class KeyedPropertyBase : public Core
13 static const uint16_t typeKey = 26;
15 /// Helper to quickly determine if a core object extends another without
17 bool isTypeOf(uint16_t typeKey) const override
21 case KeyedPropertyBase::typeKey:
28 uint16_t coreType() const override { return typeKey; }
30 static const uint16_t propertyKeyPropertyKey = 53;
33 int m_PropertyKey = Core::invalidPropertyKey;
35 inline int propertyKey() const { return m_PropertyKey; }
36 void propertyKey(int value)
38 if (m_PropertyKey == value)
42 m_PropertyKey = value;
46 Core* clone() const override;
47 void copy(const KeyedPropertyBase& object)
49 m_PropertyKey = object.m_PropertyKey;
52 bool deserialize(uint16_t propertyKey, BinaryReader& reader) override
56 case propertyKeyPropertyKey:
57 m_PropertyKey = CoreUintType::deserialize(reader);
64 virtual void propertyKeyChanged() {}