#include "ObjectManager.h" namespace nt { void ObjectManager::Register(std::vector path, std::unique_ptr object, std::unique_ptr type) { auto head = std::make_unique(); head->reference_count = 0; head->handle_count = 0; head->path = std::move(path); head->type = std::move(type); auto entry = std::make_unique(); entry->head = std::move(head); entry->object = std::move(object); entry->next = std::move(entries); entries = std::move(entry); } ObjectManager::registry* ObjectManager::Find(const std::vector object_path) { registry* current = entries.get(); while (current != nullptr) { if (current->head->path == object_path) return current; current = current->next.get(); } return nullptr; } }