From cb5f269b13429f0e1ffbc41426227983e5ccaeba Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 20 Sep 2021 17:31:54 +0200 Subject: Simplify/fix task dependency calculation. And tasks unit-tests. --- src/tasks.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/tasks.h') diff --git a/src/tasks.h b/src/tasks.h index e5d1daf..c5b326e 100644 --- a/src/tasks.h +++ b/src/tasks.h @@ -17,9 +17,17 @@ struct Target std::string path; }; +//! Get list of all registered targets const std::deque& getTargets(const Settings& settings); +//! Returns next dirty task from the dirtyTasks list that has all its dependencies +//! fulfilled. +//! The returned task is removed from the dirty list. +//! Return nullptr if no dirty task is ready. std::shared_ptr getNextTask(const std::list>& allTasks, std::list>& dirtyTasks); + +//! Get list of tasks filtered by name including each of their direct +//! dependency tasks (ie. objects tasks from their sources). std::list> getTasks(const Settings& settings, const std::vector names = {}); -- cgit v1.2.3