-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdataCenter.h
More file actions
32 lines (24 loc) · 768 Bytes
/
Copy pathdataCenter.h
File metadata and controls
32 lines (24 loc) · 768 Bytes
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
#ifndef DTS_EX2_DATACENTER_H
#define DTS_EX2_DATACENTER_H
#include "dataCenterGroup.h"
#include <memory>
class DataCenter{
private:
int DC_ID;
DataCenter* next;
std::shared_ptr<DataCenterGroup> group;
public:
int getID();
DataCenter* getNext();
void setNext(DataCenter* next);
std::shared_ptr<DataCenterGroup> getGroup();
void setGroup(const std::shared_ptr<DataCenterGroup>& group);
explicit DataCenter(int ID):DC_ID(ID),next(nullptr),group(new DataCenterGroup){};
~DataCenter() = default;
/*~DataCenter(){
// std::cout << "~DataCenter() " << DC_ID<<std::endl;
};*/
DataCenter& operator=(const DataCenter& dc) = delete;
DataCenter(const DataCenter& dc) = delete;
};
#endif //DTS_EX2_DATACENTER_H