diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2019-02-08 20:26:14 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2019-02-09 15:40:28 +0100 |
commit | 1ae51ff94d0f1f27a4e4cc657371578db13c3ca1 (patch) | |
tree | f383cb73afa171ac10ab91eafea9f11804042744 /src/tasktree.h | |
parent | fb958041310617c7aeef36a8dc9041e2a51fae6d (diff) |
Make code compile again (fix bitrot dating back from 2013).
Diffstat (limited to 'src/tasktree.h')
-rw-r--r-- | src/tasktree.h | 58 |
1 files changed, 28 insertions, 30 deletions
diff --git a/src/tasktree.h b/src/tasktree.h index 8efadeb..e33cd61 100644 --- a/src/tasktree.h +++ b/src/tasktree.h @@ -25,8 +25,7 @@ * along with Munia; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef __MUNIA_TASKTREE_H__ -#define __MUNIA_TASKTREE_H__ +#pragma once #include <list> #include <map> @@ -40,48 +39,47 @@ typedef std::list<class node*> NodeList; class node { public: - taskid_t id; - node* parent; - task_t data; - NodeList children; + taskid_t id; + node* parent; + task_t data; + NodeList children; - std::string toXML(std::string prefix); + std::string toXML(std::string prefix); }; typedef node node_t; -class TaskTree { - friend class XmlParser; +class TaskTree +{ + friend class XmlParser; public: - TaskTree(); - ~TaskTree(); + TaskTree(); + ~TaskTree(); - taskid_t createId(); + taskid_t createId(); - TaskIdList insertAsChild(taskid_t parentid, taskid_t id, task_t data) throw (std::exception); - TaskIdList remove(taskid_t id) throw (std::exception); - TaskIdList move(taskid_t id, taskid_t newParentId) throw (std::exception); - TaskIdList updateData(taskid_t id, const std::string &name, - const std::string &value) throw (std::exception); - task_t data(taskid_t id) throw (std::exception); + TaskIdList insertAsChild(taskid_t parentid, taskid_t id, task_t data) throw (std::exception); + TaskIdList remove(taskid_t id) throw (std::exception); + TaskIdList move(taskid_t id, taskid_t newParentId) throw (std::exception); + TaskIdList updateData(taskid_t id, const std::string &name, + const std::string &value) throw (std::exception); + task_t data(taskid_t id) throw (std::exception); - TaskIdList bfs(taskid_t id) throw (std::exception); + TaskIdList bfs(taskid_t id) throw (std::exception); - TaskIdList ancestorList(taskid_t id) throw (std::exception); + TaskIdList ancestorList(taskid_t id) throw (std::exception); - void toStdOut(); + void toStdOut(); - std::string toXML(); - void fromXML(std::string xml); + std::string toXML(); + void fromXML(std::string xml); - taskid_t nextid; + taskid_t nextid; private: - node_t* createNode(taskid_t id); - void insertChild(node_t* parent, node_t* child); + node_t* createNode(taskid_t id); + void insertChild(node_t* parent, node_t* child); - node_t* root; - std::map<int, node_t*> id2node; + node_t* root; + std::map<int, node_t*> id2node; }; - -#endif/*__MUNIA_TASKTREE_H__*/ |