summaryrefslogtreecommitdiff
path: root/src/tasktree.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tasktree.cc')
-rw-r--r--src/tasktree.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tasktree.cc b/src/tasktree.cc
index ee181eb..e2e2bf6 100644
--- a/src/tasktree.cc
+++ b/src/tasktree.cc
@@ -70,12 +70,17 @@ static void concatTaskIdLists(TaskIdList& pre, TaskIdList& post) {
TaskTree::TaskTree() {
root = NULL;
+ nextid = 10;
}
TaskTree::~TaskTree() {
// cleanup tree
}
+taskid_t TaskTree::createId() {
+ return nextid++;
+}
+
static taskid_t rootid = -1;
TaskIdList TaskTree::insertAsChild(taskid_t parentid, taskid_t id, task_t data)
@@ -329,7 +334,7 @@ std::string TaskTree::toXML()
std::string xml;
xml += "<?xml version='1.0' encoding='UTF-8'?>\n";
- xml += "<tasktree>\n";
+ xml += "<tasktree nextid=\""+id2str(nextid)+"\">\n";
xml += root->toXML(" ");
xml += "</tasktree>";