#include "resource_loader.h"
#include "core/config/project_settings.h"
#include "core/core_bind.h"
#include "core/io/dir_access.h"
#include "core/io/file_access.h"
#include "core/io/resource_importer.h"
#include "core/object/script_language.h"
#include "core/os/condition_variable.h"
#include "core/os/os.h"
#include "core/os/safe_binary_mutex.h"
#include "core/string/print_string.h"
#include "core/string/translation_server.h"
#include "core/templates/rb_set.h"
#include "core/variant/variant_parser.h"
#include "servers/rendering_server.h"
#ifdef DEBUG_LOAD_THREADED
#define print_lt …
#else
#define print_lt(m_text) …
#endif
Ref<ResourceFormatLoader> ResourceLoader::loader[ResourceLoader::MAX_LOADERS];
int ResourceLoader::loader_count = …;
bool ResourceFormatLoader::recognize_path(const String &p_path, const String &p_for_type) const { … }
bool ResourceFormatLoader::handles_type(const String &p_type) const { … }
void ResourceFormatLoader::get_classes_used(const String &p_path, HashSet<StringName> *r_classes) { … }
String ResourceFormatLoader::get_resource_type(const String &p_path) const { … }
String ResourceFormatLoader::get_resource_script_class(const String &p_path) const { … }
ResourceUID::ID ResourceFormatLoader::get_resource_uid(const String &p_path) const { … }
bool ResourceFormatLoader::has_custom_uid_support() const { … }
void ResourceFormatLoader::get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const { … }
void ResourceLoader::get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) { … }
bool ResourceFormatLoader::exists(const String &p_path) const { … }
void ResourceFormatLoader::get_recognized_extensions(List<String> *p_extensions) const { … }
Ref<Resource> ResourceFormatLoader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { … }
void ResourceFormatLoader::get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types) { … }
Error ResourceFormatLoader::rename_dependencies(const String &p_path, const HashMap<String, String> &p_map) { … }
void ResourceFormatLoader::_bind_methods() { … }
#define PREPARE_FOR_WTP_WAIT …
#define RESTORE_AFTER_WTP_WAIT …
void ResourceLoader::LoadToken::clear() { … }
ResourceLoader::LoadToken::~LoadToken() { … }
Ref<Resource> ResourceLoader::_load(const String &p_path, const String &p_original_path, const String &p_type_hint, ResourceFormatLoader::CacheMode p_cache_mode, Error *r_error, bool p_use_sub_threads, float *r_progress) { … }
void ResourceLoader::_run_load_task(void *p_userdata) { … }
static String _validate_local_path(const String &p_path) { … }
Error ResourceLoader::load_threaded_request(const String &p_path, const String &p_type_hint, bool p_use_sub_threads, ResourceFormatLoader::CacheMode p_cache_mode) { … }
ResourceLoader::LoadToken *ResourceLoader::_load_threaded_request_reuse_user_token(const String &p_path) { … }
void ResourceLoader::_load_threaded_request_setup_user_token(LoadToken *p_token, const String &p_path) { … }
Ref<Resource> ResourceLoader::load(const String &p_path, const String &p_type_hint, ResourceFormatLoader::CacheMode p_cache_mode, Error *r_error) { … }
Ref<ResourceLoader::LoadToken> ResourceLoader::_load_start(const String &p_path, const String &p_type_hint, LoadThreadMode p_thread_mode, ResourceFormatLoader::CacheMode p_cache_mode, bool p_for_user) { … }
float ResourceLoader::_dependency_get_progress(const String &p_path) { … }
ResourceLoader::ThreadLoadStatus ResourceLoader::load_threaded_get_status(const String &p_path, float *r_progress) { … }
Ref<Resource> ResourceLoader::load_threaded_get(const String &p_path, Error *r_error) { … }
Ref<Resource> ResourceLoader::_load_complete(LoadToken &p_load_token, Error *r_error) { … }
Ref<Resource> ResourceLoader::_load_complete_inner(LoadToken &p_load_token, Error *r_error, MutexLock<SafeBinaryMutex<BINARY_MUTEX_TAG>> &p_thread_load_lock) { … }
bool ResourceLoader::_ensure_load_progress() { … }
void ResourceLoader::resource_changed_connect(Resource *p_source, const Callable &p_callable, uint32_t p_flags) { … }
void ResourceLoader::resource_changed_disconnect(Resource *p_source, const Callable &p_callable) { … }
void ResourceLoader::resource_changed_emit(Resource *p_source) { … }
Ref<Resource> ResourceLoader::ensure_resource_ref_override_for_outer_load(const String &p_path, const String &p_res_type) { … }
Ref<Resource> ResourceLoader::get_resource_ref_override(const String &p_path) { … }
bool ResourceLoader::exists(const String &p_path, const String &p_type_hint) { … }
void ResourceLoader::add_resource_format_loader(Ref<ResourceFormatLoader> p_format_loader, bool p_at_front) { … }
void ResourceLoader::remove_resource_format_loader(Ref<ResourceFormatLoader> p_format_loader) { … }
int ResourceLoader::get_import_order(const String &p_path) { … }
String ResourceLoader::get_import_group_file(const String &p_path) { … }
bool ResourceLoader::is_import_valid(const String &p_path) { … }
bool ResourceLoader::is_imported(const String &p_path) { … }
void ResourceLoader::get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types) { … }
Error ResourceLoader::rename_dependencies(const String &p_path, const HashMap<String, String> &p_map) { … }
void ResourceLoader::get_classes_used(const String &p_path, HashSet<StringName> *r_classes) { … }
String ResourceLoader::get_resource_type(const String &p_path) { … }
String ResourceLoader::get_resource_script_class(const String &p_path) { … }
ResourceUID::ID ResourceLoader::get_resource_uid(const String &p_path) { … }
bool ResourceLoader::has_custom_uid_support(const String &p_path) { … }
String ResourceLoader::_path_remap(const String &p_path, bool *r_translation_remapped) { … }
String ResourceLoader::import_remap(const String &p_path) { … }
String ResourceLoader::path_remap(const String &p_path) { … }
void ResourceLoader::reload_translation_remaps() { … }
void ResourceLoader::load_translation_remaps() { … }
void ResourceLoader::clear_translation_remaps() { … }
void ResourceLoader::clear_thread_load_tasks() { … }
void ResourceLoader::load_path_remaps() { … }
void ResourceLoader::clear_path_remaps() { … }
void ResourceLoader::set_load_callback(ResourceLoadedCallback p_callback) { … }
ResourceLoadedCallback ResourceLoader::_loaded_callback = …;
Ref<ResourceFormatLoader> ResourceLoader::_find_custom_resource_format_loader(const String &path) { … }
bool ResourceLoader::add_custom_resource_format_loader(const String &script_path) { … }
void ResourceLoader::set_create_missing_resources_if_class_unavailable(bool p_enable) { … }
void ResourceLoader::add_custom_loaders() { … }
void ResourceLoader::remove_custom_loaders() { … }
bool ResourceLoader::is_cleaning_tasks() { … }
Vector<String> ResourceLoader::list_directory(const String &p_directory) { … }
void ResourceLoader::initialize() { … }
void ResourceLoader::finalize() { … }
ResourceLoadErrorNotify ResourceLoader::err_notify = …;
DependencyErrorNotify ResourceLoader::dep_err_notify = …;
bool ResourceLoader::create_missing_resources_if_class_unavailable = …;
bool ResourceLoader::abort_on_missing_resource = …;
bool ResourceLoader::timestamp_on_load = …;
thread_local int ResourceLoader::load_nesting = …;
thread_local Vector<String> ResourceLoader::load_paths_stack;
thread_local HashMap<int, HashMap<String, Ref<Resource>>> ResourceLoader::res_ref_overrides;
thread_local ResourceLoader::ThreadLoadTask *ResourceLoader::curr_load_task = …;
SafeBinaryMutex<ResourceLoader::BINARY_MUTEX_TAG> &_get_res_loader_mutex() { … }
template <>
thread_local SafeBinaryMutex<ResourceLoader::BINARY_MUTEX_TAG>::TLSData SafeBinaryMutex<ResourceLoader::BINARY_MUTEX_TAG>::tls_data(_get_res_loader_mutex());
SafeBinaryMutex<ResourceLoader::BINARY_MUTEX_TAG> ResourceLoader::thread_load_mutex;
HashMap<String, ResourceLoader::ThreadLoadTask> ResourceLoader::thread_load_tasks;
bool ResourceLoader::cleaning_tasks = …;
HashMap<String, ResourceLoader::LoadToken *> ResourceLoader::user_load_tokens;
SelfList<Resource>::List ResourceLoader::remapped_list;
HashMap<String, Vector<String>> ResourceLoader::translation_remaps;
HashMap<String, String> ResourceLoader::path_remaps;
ResourceLoaderImport ResourceLoader::import = …;