summaryrefslogtreecommitdiff
path: root/src/Mammal.cc
blob: 2763fcc4e41f1c1ad28c9ae25a2cdf2e2d4658e3 (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
#include <utility>

#include "Mammal.hh"

namespace zoo {
Mammal::~Mammal() = default;

void Mammal::setExhibit(std::string _exhibit) {
  this->exhibit = std::move(_exhibit);
}

void Mammal::setName(std::string _name) { this->name = std::move(_name); }

void Mammal::setCageSizeMin(int _cageSizeMin) {
  if (Mammal::validateCageSizeMin(_cageSizeMin)) {
    this->cageSizeMin = _cageSizeMin;
  }
}

std::string Mammal::getExhibit() { return this->exhibit; }

std::string Mammal::getName() { return this->name; }

int Mammal::getCageSizeMin() const { return this->cageSizeMin; }

bool Mammal::validateCageSizeMin(int cageSize) {
  if (cageSize < 2 || cageSize > 100000) {
    return false;
  } else {
    return true;
  }
}
} // namespace zoo