// Copyright (C) 2015 Jérôme Leclercq // This file is part of the "Nazara Engine - Core module" // For conditions of distribution and use, see copyright notice in Config.hpp #include #include template NzObjectRef NzObjectLibrary::Get(const NzString& name) { NzObjectRef ref = Query(name); if (!ref) NazaraError("Object \"" + name + "\" is not present"); return ref; } template bool NzObjectLibrary::Has(const NzString& name) { return Type::s_library.find(name) != Type::s_library.end(); } template void NzObjectLibrary::Register(const NzString& name, NzObjectRef object) { Type::s_library.emplace(name, object); } template NzObjectRef NzObjectLibrary::Query(const NzString& name) { auto it = Type::s_library.find(name); if (it != Type::s_library.end()) return it->second; else return nullptr; } template void NzObjectLibrary::Unregister(const NzString& name) { Type::s_library.erase(name); } template bool NzObjectLibrary::Initialize() { return true; // Que faire } template void NzObjectLibrary::Uninitialize() { Type::s_library.clear(); } #include