summaryrefslogtreecommitdiff
path: root/graphs/cpp/caste_or_cast/nurturer.hh
diff options
context:
space:
mode:
Diffstat (limited to 'graphs/cpp/caste_or_cast/nurturer.hh')
-rw-r--r--graphs/cpp/caste_or_cast/nurturer.hh27
1 files changed, 27 insertions, 0 deletions
diff --git a/graphs/cpp/caste_or_cast/nurturer.hh b/graphs/cpp/caste_or_cast/nurturer.hh
new file mode 100644
index 0000000..af7eec7
--- /dev/null
+++ b/graphs/cpp/caste_or_cast/nurturer.hh
@@ -0,0 +1,27 @@
+#pragma once
+
+#include "worker.hh"
+
+/*
+ * Nurturers worker sub-caste
+ */
+class Nurturer : public Worker
+{
+public:
+ //! inherit Worker Constructors
+ using Worker::Worker;
+ //! final override of the work() Worker virtual method
+ void work() override final;
+
+ /*!
+ * @details final override of the communicate() Ant virtual method
+ * @return true if the communication succeeded
+ * */
+ bool communicate(std::weak_ptr<Ant> wk_receiver) override final;
+ //! feed the queen
+ void feedQueen();
+ //! feed larvae
+ void feedLarvae();
+ //! clean the nest / colony
+ void cleanNest();
+};