// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com) // This file is part of the "Nazara Engine - Core module" // For conditions of distribution and use, see copyright notice in Config.hpp #pragma once #ifndef NAZARA_CORE_OBJECTLIBRARY_HPP #define NAZARA_CORE_OBJECTLIBRARY_HPP #include #include #include #include #include namespace Nz { template class ObjectLibrary { friend Type; public: ObjectLibrary() = default; ~ObjectLibrary() = default; void Clear(); std::shared_ptr Get(std::string_view name); bool Has(std::string_view name); void Register(std::string name, std::shared_ptr object); std::shared_ptr Query(std::string_view name); void Unregister(std::string_view name); private: std::unordered_map, StringHash<>, std::equal_to<>> m_library; }; } #include #endif // NAZARA_CORE_OBJECTLIBRARY_HPP