root / trunk / code / projects / warehouse / helper_classes / Order.h @ 2009
History | View | Annotate | Download (839 Bytes)
1 | 2009 | jmcarrol | #ifndef _ORDER_
|
---|---|---|---|
2 | #define _ORDER_
|
||
3 | 2003 | jmcarrol | |
4 | 2009 | jmcarrol | #include "../Behavior.h" |
5 | #include "../behaviors/navigationMap.h" |
||
6 | 2003 | jmcarrol | |
7 | 2009 | jmcarrol | #define MAX_WAIT_TIME 120 //2 minutes in seconds |
8 | 2003 | jmcarrol | |
9 | 2009 | jmcarrol | typedef unsigned int Address; |
10 | 2003 | jmcarrol | |
11 | 2009 | jmcarrol | class Order { |
12 | int id;
|
||
13 | Address source, dest; |
||
14 | Time start_time; |
||
15 | Path path; |
||
16 | Duration est_time; |
||
17 | public:
|
||
18 | Order(int order_id, Address order_source, Address order_dest,
|
||
19 | Time order_start_time, Path order_path, Duration order_est_time); |
||
20 | |||
21 | Order() {}; |
||
22 | 2003 | jmcarrol | |
23 | 2009 | jmcarrol | int getid() const; |
24 | Address get_source() const;
|
||
25 | Address get_dest() const;
|
||
26 | Time get_start_time() const;
|
||
27 | Path get_path() const;
|
||
28 | Duration get_est_time() const;
|
||
29 | void set_path(Path order_path);
|
||
30 | int get_priority() const; |
||
31 | 2003 | jmcarrol | |
32 | 2009 | jmcarrol | bool operator==(Order& order);
|
33 | |||
34 | }; |
||
35 | 2003 | jmcarrol | |
36 | 2009 | jmcarrol | class CompareOrder { |
37 | public:
|
||
38 | bool operator()(Order& o1, Order& o2);
|
||
39 | }; |
||
40 | 2003 | jmcarrol | |
41 | 2009 | jmcarrol | #endif |