1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #110837 from wheatear-dev/add-gdsoftclass-deeper

Add `GDSOFTCLASS` to deeper inheritors of `Object`
This commit is contained in:
Thaddeus Crews
2025-09-25 12:13:56 -05:00
51 changed files with 154 additions and 18 deletions

View File

@@ -77,6 +77,8 @@ public:
private:
class BandwidthProfiler : public EngineProfiler {
GDSOFTCLASS(BandwidthProfiler, EngineProfiler);
protected:
struct BandwidthFrame {
uint32_t timestamp;
@@ -92,12 +94,14 @@ private:
int bandwidth_usage(const Vector<BandwidthFrame> &p_buffer, int p_pointer);
public:
void toggle(bool p_enable, const Array &p_opts);
void add(const Array &p_data);
void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time);
void toggle(bool p_enable, const Array &p_opts) override;
void add(const Array &p_data) override;
void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time) override;
};
class RPCProfiler : public EngineProfiler {
GDSOFTCLASS(RPCProfiler, EngineProfiler);
private:
HashMap<ObjectID, RPCNodeInfo> rpc_node_data;
uint64_t last_profile_time = 0;
@@ -105,20 +109,22 @@ private:
void init_node(const ObjectID p_node);
public:
void toggle(bool p_enable, const Array &p_opts);
void add(const Array &p_data);
void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time);
void toggle(bool p_enable, const Array &p_opts) override;
void add(const Array &p_data) override;
void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time) override;
};
class ReplicationProfiler : public EngineProfiler {
GDSOFTCLASS(ReplicationProfiler, EngineProfiler);
private:
HashMap<ObjectID, SyncInfo> sync_data;
uint64_t last_profile_time = 0;
public:
void toggle(bool p_enable, const Array &p_opts);
void add(const Array &p_data);
void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time);
void toggle(bool p_enable, const Array &p_opts) override;
void add(const Array &p_data) override;
void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time) override;
};
static Error _capture(void *p_user, const String &p_msg, const Array &p_args, bool &r_captured);