-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcar.h
40 lines (34 loc) · 1.05 KB
/
car.h
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
/*
*
* Created By German Irias 02/18/2011
*
*/
#ifndef Car_h
#define Car_h
#include "position.h"
#include "event.h"
namespace tfg
{
class Car {
public:
Car(); // default constructor
Car(const Car& other); // copy constructor
~Car(); // default destructor
int GetID() const; // return id
void SetID(int id); // set id
bool GetAccident() const; // return accident
void SetAccident(bool acc); // set accident
struct tm * GetTimestamp() const; // return timestamp
Position * GetPosition() const; // return position
void UpdatePosition(Position * p); // set position
int GetStoredTime(); //return timestamp
void SetTime(int time); //set time
private:
static unsigned long maxID; //Auto-inc when creating a new Car. That way every Car has a UID
int myID; // unique id for each car in the graph
bool accident; // true if it had an accident, false otherwise
int timestamp; // current time
Position * pos; // tells where in the graph is the car
};
}
#endif