#ifndef ZOO_ANIMAL #define ZOO_ANIMAL #include #include #include "Zoo.hh" namespace zoo { /** * @brief Used to store the identification number, cage number where the animal * is kept, species of animal, and date of acquisition */ class ZooAnimal { private: int idNumber; int cageNumber; int dateAcquired; [[maybe_unused]] int padding; std::string species; Zoo *zoo; public: explicit ZooAnimal(int _idNumber = 0, int _cageNumber = 0, int _dateAcquired = 0, std::string _species = "", Zoo *_zoo = nullptr) : idNumber(_idNumber), cageNumber(_cageNumber), dateAcquired(_dateAcquired), padding(0), species(std::move(_species)), zoo(_zoo) {} virtual ~ZooAnimal(); /** * @brief Set the ID number of a zoo animal */ void setIDNum(int); /** * @brief Set the cage number of a zoo animal */ void setCageNum(int); /** * @brief Set the date of acquisition of a zoo animal */ void setDateAcq(int); /** * @brief Set the species of a zoo animal */ void setSpecies(std::string); /** * @brief Get the ID number of a zoo animal */ [[nodiscard]] int getIDNum() const; /** * @brief Get the cage number of a zoo animal */ [[nodiscard]] int getCageNum() const; /** * @brief Get the date of acquisition of a zoo animal */ [[nodiscard]] int getDateAcq() const; /** * @brief Get the species of a zoo animal */ std::string getSpecies(); private: bool validateCageNumber(int); }; } // namespace zoo #endif // ZOO_ANIMAL