Add 'override' mark to ResourceFormat class

This commit is contained in:
ppphp 2024-03-25 04:06:34 +08:00
parent 99ff024f78
commit d4e1a74efb
17 changed files with 120 additions and 120 deletions

View file

@ -153,17 +153,17 @@ public:
class ResourceFormatLoaderCrypto : public ResourceFormatLoader { class ResourceFormatLoaderCrypto : public ResourceFormatLoader {
public: 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); 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; virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual bool handles_type(const String &p_type) const; virtual bool handles_type(const String &p_type) const override;
virtual String get_resource_type(const String &p_path) const; virtual String get_resource_type(const String &p_path) const override;
}; };
class ResourceFormatSaverCrypto : public ResourceFormatSaver { class ResourceFormatSaverCrypto : public ResourceFormatSaver {
public: public:
virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0); 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; virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override;
virtual bool recognize(const Ref<Resource> &p_resource) const; virtual bool recognize(const Ref<Resource> &p_resource) const override;
}; };
#endif // CRYPTO_H #endif // CRYPTO_H

View file

@ -176,10 +176,10 @@ class GDExtensionResourceLoader : public ResourceFormatLoader {
public: public:
static Error load_gdextension_resource(const String &p_path, Ref<GDExtension> &p_extension); static Error load_gdextension_resource(const String &p_path, Ref<GDExtension> &p_extension);
virtual Ref<Resource> load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE); virtual Ref<Resource> load(const String &p_path, const String &p_original_path, Error *r_error, 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; virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual bool handles_type(const String &p_type) const; virtual bool handles_type(const String &p_type) const override;
virtual String get_resource_type(const String &p_path) const; virtual String get_resource_type(const String &p_path) const override;
}; };
#ifdef TOOLS_ENABLED #ifdef TOOLS_ENABLED

View file

@ -103,10 +103,10 @@ public:
class ResourceFormatLoaderImage : public ResourceFormatLoader { class ResourceFormatLoaderImage : public ResourceFormatLoader {
public: 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); 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; virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual bool handles_type(const String &p_type) const; virtual bool handles_type(const String &p_type) const override;
virtual String get_resource_type(const String &p_path) const; virtual String get_resource_type(const String &p_path) const override;
}; };
#endif // IMAGE_LOADER_H #endif // IMAGE_LOADER_H

View file

@ -98,17 +98,17 @@ public:
class ResourceFormatLoaderJSON : public ResourceFormatLoader { class ResourceFormatLoaderJSON : public ResourceFormatLoader {
public: 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); 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; virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual bool handles_type(const String &p_type) const; virtual bool handles_type(const String &p_type) const override;
virtual String get_resource_type(const String &p_path) const; virtual String get_resource_type(const String &p_path) const override;
}; };
class ResourceFormatSaverJSON : public ResourceFormatSaver { class ResourceFormatSaverJSON : public ResourceFormatSaver {
public: public:
virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0); 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; virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override;
virtual bool recognize(const Ref<Resource> &p_resource) const; virtual bool recognize(const Ref<Resource> &p_resource) const override;
}; };
#endif // JSON_H #endif // JSON_H

View file

@ -110,16 +110,16 @@ public:
class ResourceFormatLoaderBinary : public ResourceFormatLoader { class ResourceFormatLoaderBinary : public ResourceFormatLoader {
public: 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); 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; virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const override;
virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual bool handles_type(const String &p_type) const; virtual bool handles_type(const String &p_type) const override;
virtual String get_resource_type(const String &p_path) const; virtual String get_resource_type(const String &p_path) const override;
virtual String get_resource_script_class(const String &p_path) const; virtual String get_resource_script_class(const String &p_path) const override;
virtual void get_classes_used(const String &p_path, HashSet<StringName> *r_classes); virtual void get_classes_used(const String &p_path, HashSet<StringName> *r_classes) override;
virtual ResourceUID::ID get_resource_uid(const String &p_path) const; virtual ResourceUID::ID get_resource_uid(const String &p_path) const override;
virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false); virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false) override;
virtual Error rename_dependencies(const String &p_path, const HashMap<String, String> &p_map); virtual Error rename_dependencies(const String &p_path, const HashMap<String, String> &p_map) override;
}; };
class ResourceFormatSaverBinaryInstance { class ResourceFormatSaverBinaryInstance {
@ -181,10 +181,10 @@ public:
class ResourceFormatSaverBinary : public ResourceFormatSaver { class ResourceFormatSaverBinary : public ResourceFormatSaver {
public: public:
static ResourceFormatSaverBinary *singleton; static ResourceFormatSaverBinary *singleton;
virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0); virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0) override;
virtual Error set_uid(const String &p_path, ResourceUID::ID p_uid); virtual Error set_uid(const String &p_path, ResourceUID::ID p_uid) override;
virtual bool recognize(const Ref<Resource> &p_resource) const; virtual bool recognize(const Ref<Resource> &p_resource) const override;
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const; virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override;
ResourceFormatSaverBinary(); ResourceFormatSaverBinary();
}; };

View file

@ -59,22 +59,22 @@ class ResourceFormatImporter : public ResourceFormatLoader {
public: public:
static ResourceFormatImporter *get_singleton() { return singleton; } static ResourceFormatImporter *get_singleton() { return singleton; }
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); 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; virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const; virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const override;
virtual bool recognize_path(const String &p_path, const String &p_for_type = String()) const; virtual bool recognize_path(const String &p_path, const String &p_for_type = String()) const override;
virtual bool handles_type(const String &p_type) const; virtual bool handles_type(const String &p_type) const override;
virtual String get_resource_type(const String &p_path) const; virtual String get_resource_type(const String &p_path) const override;
virtual ResourceUID::ID get_resource_uid(const String &p_path) const; virtual ResourceUID::ID get_resource_uid(const String &p_path) const override;
virtual Variant get_resource_metadata(const String &p_path) const; virtual Variant get_resource_metadata(const String &p_path) const;
virtual bool is_import_valid(const String &p_path) const; virtual bool is_import_valid(const String &p_path) const override;
virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false); virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false) override;
virtual bool is_imported(const String &p_path) const { return recognize_path(p_path); } virtual bool is_imported(const String &p_path) const override { return recognize_path(p_path); }
virtual String get_import_group_file(const String &p_path) const; virtual String get_import_group_file(const String &p_path) const override;
virtual void get_classes_used(const String &p_path, HashSet<StringName> *r_classes); virtual void get_classes_used(const String &p_path, HashSet<StringName> *r_classes) override;
virtual bool exists(const String &p_path) const; virtual bool exists(const String &p_path) const override;
virtual int get_import_order(const String &p_path) const; virtual int get_import_order(const String &p_path) const override;
Error get_import_order_threads_and_importer(const String &p_path, int &r_order, bool &r_can_threads, String &r_importer) const; Error get_import_order_threads_and_importer(const String &p_path, int &r_order, bool &r_can_threads, String &r_importer) const;

View file

@ -38,10 +38,10 @@
class TranslationLoaderPO : public ResourceFormatLoader { class TranslationLoaderPO : public ResourceFormatLoader {
public: public:
static Ref<Resource> load_translation(Ref<FileAccess> f, Error *r_error = nullptr); 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); 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; virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual bool handles_type(const String &p_type) const; virtual bool handles_type(const String &p_type) const override;
virtual String get_resource_type(const String &p_path) const; virtual String get_resource_type(const String &p_path) const override;
TranslationLoaderPO() {} TranslationLoaderPO() {}
}; };

View file

@ -39,9 +39,9 @@ public:
static Error save_image(const String &p_path, const Ref<Image> &p_img); static Error save_image(const String &p_path, const Ref<Image> &p_img);
static Vector<uint8_t> save_image_to_buffer(const Ref<Image> &p_img); static Vector<uint8_t> save_image_to_buffer(const Ref<Image> &p_img);
virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0); virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0) override;
virtual bool recognize(const Ref<Resource> &p_resource) const; virtual bool recognize(const Ref<Resource> &p_resource) const override;
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const; virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override;
ResourceSaverPNG(); ResourceSaverPNG();
}; };

View file

@ -35,10 +35,10 @@
class ResourceFormatDDS : public ResourceFormatLoader { class ResourceFormatDDS : public ResourceFormatLoader {
public: 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); 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; virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual bool handles_type(const String &p_type) const; virtual bool handles_type(const String &p_type) const override;
virtual String get_resource_type(const String &p_path) const; virtual String get_resource_type(const String &p_path) const override;
virtual ~ResourceFormatDDS() {} virtual ~ResourceFormatDDS() {}
}; };

View file

@ -629,18 +629,18 @@ public:
class ResourceFormatLoaderGDScript : public ResourceFormatLoader { class ResourceFormatLoaderGDScript : public ResourceFormatLoader {
public: 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); 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; virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual bool handles_type(const String &p_type) const; virtual bool handles_type(const String &p_type) const override;
virtual String get_resource_type(const String &p_path) const; virtual String get_resource_type(const String &p_path) const override;
virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false); virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false) override;
}; };
class ResourceFormatSaverGDScript : public ResourceFormatSaver { class ResourceFormatSaverGDScript : public ResourceFormatSaver {
public: public:
virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0); 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; virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override;
virtual bool recognize(const Ref<Resource> &p_resource) const; virtual bool recognize(const Ref<Resource> &p_resource) const override;
}; };
#endif // GDSCRIPT_H #endif // GDSCRIPT_H

View file

@ -36,10 +36,10 @@
class ResourceFormatKTX : public ResourceFormatLoader { class ResourceFormatKTX : public ResourceFormatLoader {
public: 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); 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; virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual bool handles_type(const String &p_type) const; virtual bool handles_type(const String &p_type) const override;
virtual String get_resource_type(const String &p_path) const; virtual String get_resource_type(const String &p_path) const override;
virtual ~ResourceFormatKTX() {} virtual ~ResourceFormatKTX() {}
ResourceFormatKTX(); ResourceFormatKTX();

View file

@ -173,10 +173,10 @@ public:
class ResourceFormatLoaderTheora : public ResourceFormatLoader { class ResourceFormatLoaderTheora : public ResourceFormatLoader {
public: 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); 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; virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual bool handles_type(const String &p_type) const; virtual bool handles_type(const String &p_type) const override;
virtual String get_resource_type(const String &p_path) const; virtual String get_resource_type(const String &p_path) const override;
}; };
#endif // VIDEO_STREAM_THEORA_H #endif // VIDEO_STREAM_THEORA_H

View file

@ -39,9 +39,9 @@ public:
static Error save_image(const String &p_path, const Ref<Image> &p_img, const bool p_lossy = false, const float p_quality = 0.75f); static Error save_image(const String &p_path, const Ref<Image> &p_img, const bool p_lossy = false, const float p_quality = 0.75f);
static Vector<uint8_t> save_image_to_buffer(const Ref<Image> &p_img, const bool p_lossy = false, const float p_quality = 0.75f); static Vector<uint8_t> save_image_to_buffer(const Ref<Image> &p_img, const bool p_lossy = false, const float p_quality = 0.75f);
virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0); virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0) override;
virtual bool recognize(const Ref<Resource> &p_resource) const; virtual bool recognize(const Ref<Resource> &p_resource) const override;
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const; virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override;
ResourceSaverWebP(); ResourceSaverWebP();
}; };

View file

@ -113,10 +113,10 @@ public:
class ResourceFormatLoaderCompressedTexture2D : public ResourceFormatLoader { class ResourceFormatLoaderCompressedTexture2D : public ResourceFormatLoader {
public: 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); 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; virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual bool handles_type(const String &p_type) const; virtual bool handles_type(const String &p_type) const override;
virtual String get_resource_type(const String &p_path) const; virtual String get_resource_type(const String &p_path) const override;
}; };
class CompressedTextureLayered : public TextureLayered { class CompressedTextureLayered : public TextureLayered {
@ -178,10 +178,10 @@ public:
class ResourceFormatLoaderCompressedTextureLayered : public ResourceFormatLoader { class ResourceFormatLoaderCompressedTextureLayered : public ResourceFormatLoader {
public: 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); 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; virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual bool handles_type(const String &p_type) const; virtual bool handles_type(const String &p_type) const override;
virtual String get_resource_type(const String &p_path) const; virtual String get_resource_type(const String &p_path) const override;
}; };
class CompressedTexture2DArray : public CompressedTextureLayered { class CompressedTexture2DArray : public CompressedTextureLayered {
@ -264,10 +264,10 @@ public:
class ResourceFormatLoaderCompressedTexture3D : public ResourceFormatLoader { class ResourceFormatLoaderCompressedTexture3D : public ResourceFormatLoader {
public: 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); 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; virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual bool handles_type(const String &p_type) const; virtual bool handles_type(const String &p_type) const override;
virtual String get_resource_type(const String &p_path) const; virtual String get_resource_type(const String &p_path) const override;
}; };
#endif // COMPRESSED_TEXTURE_H #endif // COMPRESSED_TEXTURE_H

View file

@ -139,17 +139,17 @@ public:
class ResourceFormatLoaderText : public ResourceFormatLoader { class ResourceFormatLoaderText : public ResourceFormatLoader {
public: public:
static ResourceFormatLoaderText *singleton; static ResourceFormatLoaderText *singleton;
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); 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; virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const override;
virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual bool handles_type(const String &p_type) const; virtual bool handles_type(const String &p_type) const override;
virtual void get_classes_used(const String &p_path, HashSet<StringName> *r_classes); virtual void get_classes_used(const String &p_path, HashSet<StringName> *r_classes) override;
virtual String get_resource_type(const String &p_path) const; virtual String get_resource_type(const String &p_path) const override;
virtual String get_resource_script_class(const String &p_path) const; virtual String get_resource_script_class(const String &p_path) const override;
virtual ResourceUID::ID get_resource_uid(const String &p_path) const; virtual ResourceUID::ID get_resource_uid(const String &p_path) const override;
virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false); virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false) override;
virtual Error rename_dependencies(const String &p_path, const HashMap<String, String> &p_map); virtual Error rename_dependencies(const String &p_path, const HashMap<String, String> &p_map) override;
static Error convert_file_to_binary(const String &p_src_path, const String &p_dst_path); static Error convert_file_to_binary(const String &p_src_path, const String &p_dst_path);
@ -199,10 +199,10 @@ public:
class ResourceFormatSaverText : public ResourceFormatSaver { class ResourceFormatSaverText : public ResourceFormatSaver {
public: public:
static ResourceFormatSaverText *singleton; static ResourceFormatSaverText *singleton;
virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0); virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0) override;
virtual Error set_uid(const String &p_path, ResourceUID::ID p_uid); virtual Error set_uid(const String &p_path, ResourceUID::ID p_uid) override;
virtual bool recognize(const Ref<Resource> &p_resource) const; virtual bool recognize(const Ref<Resource> &p_resource) const override;
virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const; virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override;
ResourceFormatSaverText(); ResourceFormatSaverText();
}; };

View file

@ -96,17 +96,17 @@ VARIANT_ENUM_CAST(Shader::Mode);
class ResourceFormatLoaderShader : public ResourceFormatLoader { class ResourceFormatLoaderShader : public ResourceFormatLoader {
public: 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); 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; virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual bool handles_type(const String &p_type) const; virtual bool handles_type(const String &p_type) const override;
virtual String get_resource_type(const String &p_path) const; virtual String get_resource_type(const String &p_path) const override;
}; };
class ResourceFormatSaverShader : public ResourceFormatSaver { class ResourceFormatSaverShader : public ResourceFormatSaver {
public: public:
virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0); 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; virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override;
virtual bool recognize(const Ref<Resource> &p_resource) const; virtual bool recognize(const Ref<Resource> &p_resource) const override;
}; };
#endif // SHADER_H #endif // SHADER_H

View file

@ -58,17 +58,17 @@ public:
class ResourceFormatLoaderShaderInclude : public ResourceFormatLoader { class ResourceFormatLoaderShaderInclude : public ResourceFormatLoader {
public: 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); 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; virtual void get_recognized_extensions(List<String> *p_extensions) const override;
virtual bool handles_type(const String &p_type) const; virtual bool handles_type(const String &p_type) const override;
virtual String get_resource_type(const String &p_path) const; virtual String get_resource_type(const String &p_path) const override;
}; };
class ResourceFormatSaverShaderInclude : public ResourceFormatSaver { class ResourceFormatSaverShaderInclude : public ResourceFormatSaver {
public: public:
virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0); 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; virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override;
virtual bool recognize(const Ref<Resource> &p_resource) const; virtual bool recognize(const Ref<Resource> &p_resource) const override;
}; };
#endif // SHADER_INCLUDE_H #endif // SHADER_INCLUDE_H