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
commit c32c2606f4
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
51 changed files with 154 additions and 18 deletions

View file

@ -35,6 +35,8 @@
#include "core/crypto/crypto.h"
class HTTPClientTCP : public HTTPClient {
GDSOFTCLASS(HTTPClientTCP, HTTPClient);
private:
Status status = STATUS_DISCONNECTED;
IP::ResolverID resolving = IP::RESOLVER_INVALID_ID;

View file

@ -101,6 +101,8 @@ public:
};
class ResourceFormatLoaderImage : public ResourceFormatLoader {
GDSOFTCLASS(ResourceFormatLoaderImage, ResourceFormatLoader);
public:
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;
virtual void get_recognized_extensions(List<String> *p_extensions) const override;

View file

@ -107,6 +107,8 @@ public:
};
class ResourceFormatLoaderJSON : public ResourceFormatLoader {
GDSOFTCLASS(ResourceFormatLoaderJSON, ResourceFormatLoader);
public:
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;
virtual void get_recognized_extensions(List<String> *p_extensions) const override;
@ -119,6 +121,8 @@ public:
};
class ResourceFormatSaverJSON : public ResourceFormatSaver {
GDSOFTCLASS(ResourceFormatSaverJSON, ResourceFormatSaver);
public:
virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0) override;
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override;

View file

@ -37,6 +37,8 @@
class PListNode;
class PList : public RefCounted {
GDSOFTCLASS(PList, RefCounted);
friend class PListNode;
public:

View file

@ -108,6 +108,8 @@ public:
};
class ResourceFormatLoaderBinary : public ResourceFormatLoader {
GDSOFTCLASS(ResourceFormatLoaderBinary, ResourceFormatLoader);
public:
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;
virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const override;
@ -179,6 +181,8 @@ public:
};
class ResourceFormatSaverBinary : public ResourceFormatSaver {
GDSOFTCLASS(ResourceFormatSaverBinary, ResourceFormatSaver);
public:
static inline ResourceFormatSaverBinary *singleton = nullptr;
virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0) override;

View file

@ -39,6 +39,8 @@ class ResourceFormatImporter;
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);
class ResourceFormatImporter : public ResourceFormatLoader {
GDSOFTCLASS(ResourceFormatImporter, ResourceFormatLoader);
struct PathAndType {
String path;
String type;

View file

@ -35,6 +35,8 @@
#include "core/string/translation.h"
class TranslationLoaderPO : public ResourceFormatLoader {
GDSOFTCLASS(TranslationLoaderPO, ResourceFormatLoader);
public:
static Ref<Resource> load_translation(Ref<FileAccess> f, Error *r_error = nullptr);
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;