mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 02:35:07 +00:00

This patch expands the object model of this program quite a bit. We now have a RemoteProcess object that contains a list of remote root RemoteObject objects. The RemoteProcess vends a RemoteObjectGraphModel&, and indices in that model have internal_data() pointing to a corresponding RemoteObject. RemoteObjects in turn vend a RemoteObjectPropertyModel&, which is what we use to show the object properties. This is pretty cool :^)
22 lines
558 B
C++
22 lines
558 B
C++
#pragma once
|
|
|
|
#include <AK/NonnullOwnPtrVector.h>
|
|
#include <LibCore/CLocalSocket.h>
|
|
|
|
class RemoteObjectGraphModel;
|
|
class RemoteObject;
|
|
|
|
class RemoteProcess {
|
|
public:
|
|
explicit RemoteProcess(pid_t);
|
|
void update();
|
|
|
|
RemoteObjectGraphModel& object_graph_model() { return *m_object_graph_model; }
|
|
const NonnullOwnPtrVector<RemoteObject>& roots() const { return m_roots; }
|
|
|
|
private:
|
|
pid_t m_pid { -1 };
|
|
NonnullRefPtr<RemoteObjectGraphModel> m_object_graph_model;
|
|
CLocalSocket m_socket;
|
|
NonnullOwnPtrVector<RemoteObject> m_roots;
|
|
};
|