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/Cage.hh | |
| download | zoo-main.tar.xz zoo-main.zip | |
Diffstat (limited to 'src/Cage.hh')
| -rw-r--r-- | src/Cage.hh | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/Cage.hh b/src/Cage.hh new file mode 100644 index 0000000..28871c3 --- /dev/null +++ b/src/Cage.hh @@ -0,0 +1,59 @@ +#ifndef CAGE +#define CAGE + +#include <string> +#include <utility> + +#include "Zoo.hh" + +namespace zoo { +/** + * @brief Used to store the location, size, and number of a single cage at the + * zoo + */ +class Cage { +private: + int cageNumber; + int cageSqFt; + std::string cageLocation; + Zoo *zoo; + +public: + explicit Cage(int _cageNumber = 0, int _cageSqFt = 0, + std::string _cageLocation = "", Zoo *_zoo = nullptr) + : cageNumber(_cageNumber), cageSqFt(_cageSqFt), + cageLocation(std::move(_cageLocation)), zoo(_zoo) {} + + /** + * @brief Set the number of a cage + */ + void setCageNumber(int); + /** + * @brief Set the location of a cage + */ + void setCageLocation(std::string); + /** + * @brief Set the square footage of a cage + */ + void setCageSqFt(int); + + /** + * @brief Get the number of a cage + */ + [[nodiscard]] int getCageNumber() const; + /** + * @brief Get the location of a cage + */ + std::string getCageLocation(); + /** + * @brief Get the square footage of a cage + */ + [[nodiscard]] int getCageSqFt() const; + +private: + static bool validateSqFt(int); + bool validateCageNumber(int); +}; +} // namespace zoo + +#endif // CAGE |