scoutos / scout / libscout / src / helper_classes / Order.h @ ca164875
History | View | Annotate | Download (768 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,
|
18 |
Time order_start_time, Path order_path, Time order_est_time); |
19 |
|
20 |
int getid() const; |
21 |
Address get_source() const;
|
22 |
Address get_dest() const;
|
23 |
Time get_start_time() const;
|
24 |
Path get_path() const;
|
25 |
Time get_est_time() const;
|
26 |
void set_path(Path order_path);
|
27 |
|
28 |
bool operator==(Order& o1, Order& o2);
|
29 |
|
30 |
}; |
31 |
|
32 |
class CompareOrder { |
33 |
public:
|
34 |
bool operator()(Order& o1, Order& o2);
|
35 |
}; |
36 |
|
37 |
#endif
|