-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPosition.cpp
42 lines (36 loc) · 1.06 KB
/
Position.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
/*************************************************************************
* Author: German Irias
* Program: Position.cpp
* Description: This is the implementation of the Position class for
* for the Traffic Graph API
*************************************************************************/
#include "position.h"
namespace tfg
{
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-Constructors/Destructor=-=-=-=-=-=-=-=-=-=-=-
// Constructor: position is in road
Position::Position(Intersection* b, Intersection* e)
:beginning(b),
end(e)
{
}
// Constructor: position is in intersection
Position::Position(Intersection* b)
:beginning(b),
end(NULL)
{
}
// Copy constructor
Position::Position(const Position & other)
:beginning(other.beginning),
end(other.end)
{
}
// Assignment Operator
const Position & Position::operator=(const Position & other)
{
beginning = other.beginning;
end = other.end;
return *this;
}
}