LibGUI: Make old register_property a private method of Object

This commit is contained in:
Dan Klishch 2023-11-05 19:29:32 -05:00 committed by Andrew Kaster
parent 1f4b15dcaa
commit 61d82e36b6
Notes: sideshowbarker 2024-07-17 08:36:27 +09:00

View file

@ -58,8 +58,6 @@ public:
protected:
explicit Object(Core::EventReceiver* parent = nullptr);
void register_property(ByteString const& name, Function<JsonValue()> getter, Function<bool(JsonValue const&)> setter = nullptr);
template<typename Getter, typename Deserializer, typename Setter>
void register_property(StringView name, Getter&& getter, Deserializer&& deserializer, Setter&& setter)
{
@ -98,6 +96,8 @@ protected:
}
private:
void register_property(ByteString const& name, Function<JsonValue()> getter, Function<bool(JsonValue const&)> setter = nullptr);
HashMap<ByteString, NonnullOwnPtr<Property>> m_properties;
};