aboutsummaryrefslogtreecommitdiffstats
path: root/src/ObjectManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ObjectManager.cpp')
-rw-r--r--src/ObjectManager.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ObjectManager.cpp b/src/ObjectManager.cpp
index 19f862d..67504c3 100644
--- a/src/ObjectManager.cpp
+++ b/src/ObjectManager.cpp
@@ -30,4 +30,19 @@ namespace nt
}
return nullptr;
}
+
+ bool ObjectManager::Unregister(const std::vector<std::string>& object_path)
+ {
+ std::unique_ptr<registry>* slot = &entries;
+ while (slot->get() != nullptr)
+ {
+ if ((*slot)->head->path == object_path)
+ {
+ *slot = std::move((*slot)->next);
+ return true;
+ }
+ slot = &(*slot)->next;
+ }
+ return false;
+ }
}