// Copyright (C) 2021 Jérôme "Lynix" 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 namespace Nz { template class ObjectLibrary { friend Type; public: ObjectLibrary() = default; ~ObjectLibrary() = default; void Clear(); std::shared_ptr Get(const std::string& name); bool Has(const std::string& name); void Register(const std::string& name, std::shared_ptr object); std::shared_ptr Query(const std::string& name); void Unregister(const std::string& name); private: std::unordered_map> m_library; }; } #include #endif // NAZARA_CORE_OBJECTLIBRARY_HPP