-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLocation.cpp
More file actions
47 lines (37 loc) · 676 Bytes
/
Location.cpp
File metadata and controls
47 lines (37 loc) · 676 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include<iostream>
#include "Location.h"
using namespace std;
Location::Location()
{
node = 0;
}
Location::Location(unsigned int node1)
{
node = node1;
}
bool Location::operator== (const Location& other) const
{
if ((node != other.node))
return false;
else
return true;
}
bool Location::isInaccessible() const
{
bool status;
if(node == 0)
status = true;
else
status = false;
return status;
}
/*void Location::print(ostream& out) const
{
out << "(row = " << row;
out << "column = ) " << column;
}*/
std::ostream& operator<< (std::ostream& out, const Location& location)
{
out << "(node = " << location.node;
return out;
}