-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cage.h
43 lines (36 loc) · 1.27 KB
/
Cage.h
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
#ifndef CAGE_H
#define CAGE_H
#include<string>
#include<vector>
#include"Dinosaur.h"
class Cage
{
private:
std::string size;
std::string climate;
int countEmp = 0;//áðîé ðàáîòíèöè â êëåòêàòà
std::string era;
std::vector<Dinosaur> animals;
public:
Cage() = default;
Cage(const std::string& size, const std::string& climate);
std::string getSize() const;
std::string getClimate() const;
size_t getCountEmp() const;
std::vector<Dinosaur> getAnimals() const;
std::string getEra() const;
void setAnimal(const Dinosaur& other);
void setCountEmp(const size_t& countEmp);
void buildCageForExistedAnimal(std::istream& in, const Dinosaur& animal);
//Ñúçäàâàíå íà êëåòêà â çàâèñèìîñò îò âèäà íà æèâîòíîòî, êîåòî ùå å âúòðå.
void buildCage(std::istream& in);
//Ñúçäàâàíå íà êëåòêà, â êîÿòî íÿìà æèâîòíè è ïåðñîíàë, ÷ðåç ïîñî÷âàíå íà ðàçìåð è êëèìàò.
void removeAnimalAndStaffFromCage(size_t index);//Ïðåìàõâàíå íà æèâîòíî è ïåðñîíàë ïî äàäåíî ÷èñëî.
friend std::ostream& operator << (std::ostream& out, const Cage& other);
//Èçâåæäàíå íà èíôîðìàöèÿ çà äàäåíà êëåòêà.
void write(std::ofstream& out);
//Çàïèñâàíå íà èíôîðìàöèÿ çà êëåòêà â áèíàðåí ôàéë.
void read(std::ifstream& in);
//×åòåíå íà èíôîðìàöèÿ çà êëåòêà îò áèíàðåí ôàéë.
};
#endif