godot/core/io/resource.cpp

/**************************************************************************/
/*  resource.cpp                                                          */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* Permission is hereby granted, free of charge, to any person obtaining  */
/* a copy of this software and associated documentation files (the        */
/* "Software"), to deal in the Software without restriction, including    */
/* without limitation the rights to use, copy, modify, merge, publish,    */
/* distribute, sublicense, and/or sell copies of the Software, and to     */
/* permit persons to whom the Software is furnished to do so, subject to  */
/* the following conditions:                                              */
/*                                                                        */
/* The above copyright notice and this permission notice shall be         */
/* included in all copies or substantial portions of the Software.        */
/*                                                                        */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#include "resource.h"

#include "core/io/file_access.h"
#include "core/io/resource_loader.h"
#include "core/math/math_funcs.h"
#include "core/object/script_language.h"
#include "core/os/os.h"
#include "scene/main/node.h" //only so casting works

#include <stdio.h>

void Resource::emit_changed() {}

void Resource::_resource_path_changed() {}

void Resource::set_path(const String &p_path, bool p_take_over) {}

String Resource::get_path() const {}

void Resource::set_path_cache(const String &p_path) {}

String Resource::generate_scene_unique_id() {}

void Resource::set_scene_unique_id(const String &p_id) {}

String Resource::get_scene_unique_id() const {}

void Resource::set_name(const String &p_name) {}

String Resource::get_name() const {}

void Resource::update_configuration_warning() {}

bool Resource::editor_can_reload_from_file() {}

void Resource::connect_changed(const Callable &p_callable, uint32_t p_flags) {}

void Resource::disconnect_changed(const Callable &p_callable) {}

void Resource::reset_state() {}

Error Resource::copy_from(const Ref<Resource> &p_resource) {}

void Resource::reload_from_file() {}

void Resource::_dupe_sub_resources(Variant &r_variant, Node *p_for_scene, HashMap<Ref<Resource>, Ref<Resource>> &p_remap_cache) {}

Ref<Resource> Resource::duplicate_for_local_scene(Node *p_for_scene, HashMap<Ref<Resource>, Ref<Resource>> &p_remap_cache) {}

void Resource::_find_sub_resources(const Variant &p_variant, HashSet<Ref<Resource>> &p_resources_found) {}

void Resource::configure_for_local_scene(Node *p_for_scene, HashMap<Ref<Resource>, Ref<Resource>> &p_remap_cache) {}

Ref<Resource> Resource::duplicate(bool p_subresources) const {}

void Resource::_set_path(const String &p_path) {}

void Resource::_take_over_path(const String &p_path) {}

RID Resource::get_rid() const {}

#ifdef TOOLS_ENABLED

uint32_t Resource::hash_edited_version_for_preview() const {}

#endif

void Resource::set_local_to_scene(bool p_enable) {}

bool Resource::is_local_to_scene() const {}

Node *Resource::get_local_scene() const {}

void Resource::setup_local_to_scene() {}

void Resource::reset_local_to_scene() {}

Node *(*Resource::_get_local_scene_func)() =;
void (*Resource::_update_configuration_warning)() =;

void Resource::set_as_translation_remapped(bool p_remapped) {}

//helps keep IDs same number when loading/saving scenes. -1 clears ID and it Returns -1 when no id stored
void Resource::set_id_for_path(const String &p_path, const String &p_id) {}

String Resource::get_id_for_path(const String &p_path) const {}

void Resource::_bind_methods() {}

Resource::Resource() :{}

Resource::~Resource() {}

HashMap<String, Resource *> ResourceCache::resources;
#ifdef TOOLS_ENABLED
HashMap<String, HashMap<String, String>> ResourceCache::resource_path_cache;
#endif

Mutex ResourceCache::lock;
#ifdef TOOLS_ENABLED
RWLock ResourceCache::path_cache_lock;
#endif

void ResourceCache::clear() {}

bool ResourceCache::has(const String &p_path) {}

Ref<Resource> ResourceCache::get_ref(const String &p_path) {}

void ResourceCache::get_cached_resources(List<Ref<Resource>> *p_resources) {}

int ResourceCache::get_cached_resource_count() {}