root / scout / libscout / src / helper_classes / Order.h @ 9b4328d7
History | View | Annotate | Download (749 Bytes)
1 |
#ifndef _ORDER_
|
---|---|
2 |
#define _ORDER_
|
3 |
|
4 |
#define MAX_WAIT_TIME 120 //2 minutes in seconds |
5 |
|
6 |
typedef unsigned int Address; |
7 |
typedef unsigned int Path; |
8 |
typedef double Time; |
9 |
|
10 |
class Order { |
11 |
int id;
|
12 |
Address source, dest; |
13 |
Time start_time; |
14 |
Path path; |
15 |
Time est_time; |
16 |
public:
|
17 |
Order(int order_id, Address order_source, Address order_dest, Time order_deadline, Time order_start_time, Path order_path, Time order_est_time);
|
18 |
|
19 |
int getid() const; |
20 |
Address get_source() const;
|
21 |
Address get_dest() const;
|
22 |
Time get_start_time() const;
|
23 |
Path get_path() const;
|
24 |
void set_path(Path order_path);
|
25 |
|
26 |
bool operator==(Order& o1, Order& o2);
|
27 |
|
28 |
}; |
29 |
|
30 |
class CompareOrder { |
31 |
public:
|
32 |
bool operator()(Order& o1, Order& o2);
|
33 |
}; |
34 |
|
35 |
#endif
|