Skip to content

Commit c32c260

Browse files
committed
Merge pull request #110837 from wheatear-dev/add-gdsoftclass-deeper
Add `GDSOFTCLASS` to deeper inheritors of `Object`
2 parents 5aa220e + e366471 commit c32c260

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+154
-18
lines changed

core/crypto/crypto.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ class Crypto : public RefCounted {
149149
};
150150

151151
class ResourceFormatLoaderCrypto : public ResourceFormatLoader {
152+
GDSOFTCLASS(ResourceFormatLoaderCrypto, ResourceFormatLoader);
153+
152154
public:
153155
virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE) override;
154156
virtual void get_recognized_extensions(List<String> *p_extensions) const override;
@@ -161,6 +163,8 @@ class ResourceFormatLoaderCrypto : public ResourceFormatLoader {
161163
};
162164

163165
class ResourceFormatSaverCrypto : public ResourceFormatSaver {
166+
GDSOFTCLASS(ResourceFormatSaverCrypto, ResourceFormatSaver);
167+
164168
public:
165169
virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0) override;
166170
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override;

core/debugger/remote_debugger.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ class RemoteDebugger::PerformanceProfiler : public EngineProfiler {
4848
uint64_t last_monitor_modification_time = 0;
4949

5050
public:
51-
void toggle(bool p_enable, const Array &p_opts) {}
52-
void add(const Array &p_data) {}
53-
void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time) {
51+
void toggle(bool p_enable, const Array &p_opts) override {}
52+
void add(const Array &p_data) override {}
53+
void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time) override {
5454
if (!performance) {
5555
return;
5656
}

core/debugger/remote_debugger_peer.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
#include "core/string/ustring.h"
3838

3939
class RemoteDebuggerPeer : public RefCounted {
40+
GDSOFTCLASS(RemoteDebuggerPeer, RefCounted);
41+
4042
protected:
4143
int max_queued_messages = 4096;
4244

@@ -54,6 +56,8 @@ class RemoteDebuggerPeer : public RefCounted {
5456
};
5557

5658
class RemoteDebuggerPeerTCP : public RemoteDebuggerPeer {
59+
GDSOFTCLASS(RemoteDebuggerPeerTCP, RemoteDebuggerPeer);
60+
5761
private:
5862
Ref<StreamPeerTCP> tcp_client;
5963
Mutex mutex;

core/extension/gdextension.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ class GDExtension : public Resource {
183183
VARIANT_ENUM_CAST(GDExtension::InitializationLevel)
184184

185185
class GDExtensionResourceLoader : public ResourceFormatLoader {
186+
GDSOFTCLASS(GDExtensionResourceLoader, ResourceFormatLoader);
187+
186188
public:
187189
static Error load_gdextension_resource(const String &p_path, Ref<GDExtension> &p_extension);
188190

core/io/http_client_tcp.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
#include "core/crypto/crypto.h"
3636

3737
class HTTPClientTCP : public HTTPClient {
38+
GDSOFTCLASS(HTTPClientTCP, HTTPClient);
39+
3840
private:
3941
Status status = STATUS_DISCONNECTED;
4042
IP::ResolverID resolving = IP::RESOLVER_INVALID_ID;

core/io/image_loader.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ class ImageLoader {
101101
};
102102

103103
class ResourceFormatLoaderImage : public ResourceFormatLoader {
104+
GDSOFTCLASS(ResourceFormatLoaderImage, ResourceFormatLoader);
105+
104106
public:
105107
virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE) override;
106108
virtual void get_recognized_extensions(List<String> *p_extensions) const override;

core/io/json.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ class JSON : public Resource {
107107
};
108108

109109
class ResourceFormatLoaderJSON : public ResourceFormatLoader {
110+
GDSOFTCLASS(ResourceFormatLoaderJSON, ResourceFormatLoader);
111+
110112
public:
111113
virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE) override;
112114
virtual void get_recognized_extensions(List<String> *p_extensions) const override;
@@ -119,6 +121,8 @@ class ResourceFormatLoaderJSON : public ResourceFormatLoader {
119121
};
120122

121123
class ResourceFormatSaverJSON : public ResourceFormatSaver {
124+
GDSOFTCLASS(ResourceFormatSaverJSON, ResourceFormatSaver);
125+
122126
public:
123127
virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0) override;
124128
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override;

core/io/plist.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
class PListNode;
3838

3939
class PList : public RefCounted {
40+
GDSOFTCLASS(PList, RefCounted);
41+
4042
friend class PListNode;
4143

4244
public:

core/io/resource_format_binary.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ class ResourceLoaderBinary {
108108
};
109109

110110
class ResourceFormatLoaderBinary : public ResourceFormatLoader {
111+
GDSOFTCLASS(ResourceFormatLoaderBinary, ResourceFormatLoader);
112+
111113
public:
112114
virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE) override;
113115
virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const override;
@@ -179,6 +181,8 @@ class ResourceFormatSaverBinaryInstance {
179181
};
180182

181183
class ResourceFormatSaverBinary : public ResourceFormatSaver {
184+
GDSOFTCLASS(ResourceFormatSaverBinary, ResourceFormatSaver);
185+
182186
public:
183187
static inline ResourceFormatSaverBinary *singleton = nullptr;
184188
virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0) override;

core/io/resource_importer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class ResourceFormatImporter;
3939
typedef Ref<Resource> (*ResourceFormatImporterLoadOnStartup)(ResourceFormatImporter *p_importer, const String &p_path, Error *r_error, bool p_use_sub_threads, float *r_progress, ResourceFormatLoader::CacheMode p_cache_mode);
4040

4141
class ResourceFormatImporter : public ResourceFormatLoader {
42+
GDSOFTCLASS(ResourceFormatImporter, ResourceFormatLoader);
43+
4244
struct PathAndType {
4345
String path;
4446
String type;

0 commit comments

Comments
 (0)