-
Notifications
You must be signed in to change notification settings - Fork 0
/
DBentry.cpp
46 lines (36 loc) · 821 Bytes
/
DBentry.cpp
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
#include "DBentry.h"
DBentry::DBentry(){
name = "";
IPaddress = 0;
active = false;
}
DBentry::DBentry(string _name, unsigned int _IPaddress, bool _active){
name = _name;
IPaddress = _IPaddress;
active = _active;
}
DBentry::~DBentry(){}
bool DBentry::getActive() const{
return active;
}
unsigned int DBentry::getIPaddress() const{
return IPaddress;
}
string DBentry::getName() const{
return name;
}
void DBentry::setActive(bool _active){
active = _active;
}
void DBentry::setIPaddress(unsigned int _IPaddress){
IPaddress = _IPaddress;
}
void DBentry::setName(string _name){
name = _name;
}
void DBentry::print(){
string status;
if(active) status = "active";
else status = "inactive";
cout << name << " : " << IPaddress << " : " << status << endl;
}