summaryrefslogtreecommitdiff
path: root/src/Zoo.hh
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-06-09 22:10:55 -0700
committerFuwn <[email protected]>2022-06-09 22:10:55 -0700
commit3f07f307569afce65e0ed96499e344f8c2656198 (patch)
tree0a8938ebd967d575678ddd3c83c206074331ca2b /src/Zoo.hh
downloadzoo-main.tar.xz
zoo-main.zip
feat: initial commitHEADmain
Diffstat (limited to 'src/Zoo.hh')
-rw-r--r--src/Zoo.hh61
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