summaryrefslogtreecommitdiff
path: root/src/Mammal.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mammal.hh')
-rw-r--r--src/Mammal.hh62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/Mammal.hh b/src/Mammal.hh
new file mode 100644
index 0000000..12b3bcb
--- /dev/null
+++ b/src/Mammal.hh
@@ -0,0 +1,62 @@
+#ifndef MAMMAL
+#define MAMMAL
+
+#include <utility>
+
+#include "ZooAnimal.hh"
+
+namespace zoo {
+/**
+ * @brief Used to store the name, location, and minimum cage size for a mammal
+ */
+class Mammal final : public ZooAnimal {
+private:
+ std::string exhibit;
+ std::string name;
+ int cageSizeMin;
+ [[maybe_unused]] int padding;
+
+public:
+ explicit Mammal(std::string _exhibit = "", std::string _name = "",
+ int _cageSizeMin = 0, int _idNumber = 0, int _cageNumber = 0,
+ int _dateAcquired = 0, std::string _species = "",
+ Zoo *_zoo = nullptr)
+ : ZooAnimal(_idNumber, _cageNumber, _dateAcquired, std::move(_species),
+ _zoo),
+ exhibit(std::move(_exhibit)), name(std::move(_name)),
+ cageSizeMin(_cageSizeMin), padding(0) {}
+
+ ~Mammal() override;
+
+ /**
+ * @brief Set the exhibit of a mammal
+ */
+ void setExhibit(std::string);
+ /**
+ * @brief Set the name of a mammal
+ */
+ void setName(std::string);
+ /**
+ * @brief Set the cage size of a mammal
+ */
+ void setCageSizeMin(int);
+
+ /**
+ * @brief Get the exhibit of a mammal
+ */
+ std::string getExhibit();
+ /**
+ * @brief Get the name of a mammal
+ */
+ std::string getName();
+ /**
+ * @brief Get the cage size of a mammal
+ */
+ [[nodiscard]] int getCageSizeMin() const;
+
+private:
+ static bool validateCageSizeMin(int);
+};
+} // namespace zoo
+
+#endif // MAMMAL