1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

LibCore: Move CObject serialization into CObject::save_to(JsonObject&)

The idea is for subclasses to override this and add whatever properties
are relevant for them, then call up to their base class, etc.
This commit is contained in:
Andreas Kling 2019-08-18 20:36:37 +02:00
parent a32123f221
commit c2213449c0
3 changed files with 16 additions and 4 deletions

View file

@ -7,6 +7,10 @@
#include <AK/Vector.h>
#include <AK/Weakable.h>
namespace AK {
class JsonObject;
}
class CEvent;
class CChildEvent;
class CCustomEvent;
@ -63,6 +67,8 @@ public:
bool is_widget() const { return m_widget; }
virtual bool is_window() const { return false; }
virtual void save_to(AK::JsonObject&);
static IntrusiveList<CObject, &CObject::m_all_objects_list_node>& all_objects();
protected: