summaryrefslogtreecommitdiff
path: root/src/tasks.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-09-20 17:31:54 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2021-09-20 17:31:54 +0200
commitcb5f269b13429f0e1ffbc41426227983e5ccaeba (patch)
tree14e4bd292e1a16ff3d844e73a466ab051f7345d7 /src/tasks.h
parent41ce3a4dcf5a03588b7c350445e73975c6b12ff7 (diff)
Simplify/fix task dependency calculation. And tasks unit-tests.
Diffstat (limited to 'src/tasks.h')
-rw-r--r--src/tasks.h8
1 files changed, 8 insertions, 0 deletions
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<Target>& 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<Task> getNextTask(const std::list<std::shared_ptr<Task>>& allTasks,
std::list<std::shared_ptr<Task>>& dirtyTasks);
+
+//! Get list of tasks filtered by name including each of their direct
+//! dependency tasks (ie. objects tasks from their sources).
std::list<std::shared_ptr<Task>> getTasks(const Settings& settings,
const std::vector<std::string> names = {});