#include "resourcemanager.h" std::unordered_map> ResourceManager::data; void ResourceManager::add(void* resource, const std::string &type, const std::string name) { data[type][name] = resource; } void* ResourceManager::get(const std::string &type, const std::string name) { return check(type,name) ? data[type][name] : NULL; } bool ResourceManager::check(const std::string &type, const std::string name){ return data.count(type) && data[type].count(name); }