-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrderChainHashTable.h
More file actions
53 lines (41 loc) · 1.04 KB
/
Copy pathOrderChainHashTable.h
File metadata and controls
53 lines (41 loc) · 1.04 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
/*
* OrderChainHashTable.h
*
* Created on: 2016Äê5ÔÂ1ÈÕ
* Author: LeoBrilliant
*/
#ifndef ORDERCHAINHASHTABLE_H_
#define ORDERCHAINHASHTABLE_H_
#include "Types.h"
#include "Constants.h"
#include "ChainHashTable.h"
#include "Order.h"
#include "ProgramMessage.h"
class OrderChainHashTable : public ChainHashTable<Order*, string>
{
public:
OrderChainHashTable();
OrderChainHashTable(
DirectionType direction,
PriceType tick,
PriceType upperPriceBound,
PriceType lowerPriceBound
);
virtual ~OrderChainHashTable();
Order* GetBestPriceOrder();
PriceType GetBestPrice();
DirectionType GetDirection();
//private:
DirectionType Direction;
PriceType Tick;
PriceType UpperPriceBound;
PriceType LowerPriceBound;
int HashFunc(Order* key);
int MatchFunc(Order* key1, Order* key2);
IntIDType CalBuckets();
PriceType GetMaxPrice();
PriceType GetMinPrice();
PriceType GetLevelPrice(IntIDType level);
Order* GetFirstOrder(PriceType price);
};
#endif /* ORDERCHAINHASHTABLE_H_ */