summaryrefslogtreecommitdiff
path: root/src/nodemanager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nodemanager.cc')
-rw-r--r--src/nodemanager.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nodemanager.cc b/src/nodemanager.cc
index 32a93b4..8c7cb56 100644
--- a/src/nodemanager.cc
+++ b/src/nodemanager.cc
@@ -81,23 +81,23 @@ void NodeManager::init(std::string filename)
t.attributes["title"] = "root";
t.id = ROOT_ID;
- tree.insertAsChild(0, ROOT_ID, t);
+ tree.insertAsChild(0, ROOT_ID, t, -1);
t.attributes["title"] = "Finished";
t.id = FINISHED_ID;
- tree.insertAsChild(ROOT_ID, FINISHED_ID, t);
+ tree.insertAsChild(ROOT_ID, FINISHED_ID, t, -1);
t.attributes["title"] = "Backlog";
t.id = BACKLOG_ID;
- tree.insertAsChild(ROOT_ID, BACKLOG_ID, t);
+ tree.insertAsChild(ROOT_ID, BACKLOG_ID, t, -1);
t.attributes["title"] = "Lost+Found";
t.id = LOSTFOUND_ID;
- tree.insertAsChild(ROOT_ID, LOSTFOUND_ID, t);
+ tree.insertAsChild(ROOT_ID, LOSTFOUND_ID, t, -1);
t.attributes["title"] = "Projects";
t.id = PROJECTS_ID;
- tree.insertAsChild(ROOT_ID, PROJECTS_ID, t);
+ tree.insertAsChild(ROOT_ID, PROJECTS_ID, t, -1);
}
tree.toStdOut();
@@ -113,7 +113,7 @@ nodeid_t NodeManager::createId()
return tree.createId();
}
-NodeIdListPair NodeManager::moveNode(nodeid_t id, nodeid_t to)
+NodeIdListPair NodeManager::moveNode(nodeid_t id, nodeid_t to, nodeid_t beforeId)
throw (std::exception)
{
if(isProtected(id))
@@ -145,7 +145,7 @@ NodeIdListPair NodeManager::moveNode(nodeid_t id, nodeid_t to)
ancestors = tree.ancestorList(to);
tilcreate.insert(tilcreate.end(), ancestors.begin(), ancestors.end());
- tree.move(id, to);
+ tree.move(id, to, beforeId);
NodeIdListPair tilpair;
tilpair.first = tilremove;
@@ -210,7 +210,7 @@ NodeIdList NodeManager::updateNode(nodeid_t id, const std::string &name,
return affectedNodes;
}
-NodeIdList NodeManager::createNode(nodeid_t parentid, nodeid_t *pid)
+NodeIdList NodeManager::createNode(nodeid_t parentid, nodeid_t *pid, nodeid_t insertbeforeid)
throw (std::exception)
{
NodeIdList affectedNodes;
@@ -226,7 +226,7 @@ NodeIdList NodeManager::createNode(nodeid_t parentid, nodeid_t *pid)
try
{
- affectedNodes = tree.insertAsChild(parentid, id, t);
+ affectedNodes = tree.insertAsChild(parentid, id, t, insertbeforeid);
}
catch(std::exception& e)
{