summaryrefslogtreecommitdiff
path: root/src/Cage.hh
blob: 28871c3425e2e9b2a0f54ad1b312bc93873d0951 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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