diff options
| author | Fuwn <[email protected]> | 2022-06-09 22:10:55 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-06-09 22:10:55 -0700 |
| commit | 3f07f307569afce65e0ed96499e344f8c2656198 (patch) | |
| tree | 0a8938ebd967d575678ddd3c83c206074331ca2b /src/Mammal.hh | |
| download | zoo-main.tar.xz zoo-main.zip | |
Diffstat (limited to 'src/Mammal.hh')
| -rw-r--r-- | src/Mammal.hh | 62 |
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 |