diff options
Diffstat (limited to 'src/Zoo.hh')
| -rw-r--r-- | src/Zoo.hh | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/Zoo.hh b/src/Zoo.hh new file mode 100644 index 0000000..4f4173b --- /dev/null +++ b/src/Zoo.hh @@ -0,0 +1,61 @@ +#ifndef ZOO +#define ZOO + +#include <string> + +namespace zoo { +/** + * @brief Used to store the names of exhibits and cage numbers, in separate + * arrays + */ +class Zoo { +private: + std::string *exhibits; + int *cages; + int numExhibits; + int numCages; + +public: + Zoo() + : exhibits(new std::string[0]()), cages(new int[0]()), numExhibits(0), + numCages(0) {} + + ~Zoo(); + + /** + * @brief Add an exhibit to the zoo + */ + void setExhibit(std::string); + /** + * @brief Add a cage to the zoo + */ + void setCage(int); + + /** + * @brief Get an exhibit's name from the zoo from its ID + * @return An exhibit's name + */ + std::string *getExhibit(std::size_t); + /** + * @brief Get a cage's ID from the zoo from its index + * @return A cage's ID + */ + int *getCage(std::size_t); + /** + * @brief Get the number of exhibits within the zoo + * @return The number of exhibits within the Zoo + */ + [[nodiscard]] int getNumExhibits() const; + /** + * @brief Get the number of cages within the zoo + * @return The number of cages within the Zoo + */ + [[nodiscard]] int getNumCages() const; + +private: + void incrementNumExhibits(); + void incrementNumCages(); +}; +} // namespace zoo + +#endif // ZOO |