-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLine.cpp
More file actions
78 lines (59 loc) · 1.05 KB
/
Copy pathLine.cpp
File metadata and controls
78 lines (59 loc) · 1.05 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#include "Line.h"
int line_LastId = -1;
// Constructor
Line::Line(){
this->id = ++line_LastId;
this->length = 0;
this->width = 0;
this->nodeA = NULL;
this->nodeB = NULL;
}
// Destructor
Line::~Line(){
}
// get id
int Line::getId(){
return this->id;
}
// get&set NodeA
void Line::setNodeA(class Node* node){
this->nodeA = node;
}
class Node* Line::getNodeA(){
return this->nodeA;
}
// get&set NodeB
void Line::setNodeB(class Node* node){
this->nodeB = node;
}
class Node* Line::getNodeB(){
return this->nodeB;
}
// get&set Length
void Line::setLength(const int length){
this->length = length;
}
int Line::getLength(){
return this->length;
}
// get&set Width
void Line::setWidth(const int width){
this->width = width;
}
int Line::getWidth(){
return this->width;
}
// get&set Marked
void Line::setMarked(bool marked){
this->marked = marked;
}
bool Line::getMarked(){
return this->marked;
}
// get&set Direction
void Line::setDirection(Direction direction){
this->direction = direction;
}
Direction Line::getDirection(){
return this->direction;
}