From d21701afe4230d633ae685ffeee6f5fb5a76f34d Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 27 Jun 2020 11:37:27 +0200 Subject: Check for existing ids in the tree when creating a new node. --- src/nodemanager.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/nodemanager.h') diff --git a/src/nodemanager.h b/src/nodemanager.h index 97d890f..85b7955 100644 --- a/src/nodemanager.h +++ b/src/nodemanager.h @@ -45,7 +45,7 @@ public: void init(std::string filename); - NodeIdList createNode(nodeid_t parentid, nodeid_t *id, nodeid_t insertbeforeid) throw (std::exception); + NodeIdList createNode(nodeid_t parentid, nodeid_t id, nodeid_t insertbeforeid) throw (std::exception); NodeIdList updateNode(nodeid_t id, const std::string &name, const std::string &value) throw (std::exception); NodeIdList removeNode(nodeid_t id) throw (std::exception); @@ -61,6 +61,7 @@ public: void flushNodes(); nodeid_t createId(); + bool hasId(nodeid_t id); private: // NodeIdList ancestorList(nodeid_t node); -- cgit v1.2.3