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
| #include "bom.hpp"
| #include "book.hpp"
| #include "json.hpp"
| #include "protocol.hpp"
| #include <chrono>
| #include <iostream>
| #include <unistd.h>
| #include <unordered_map>
|
| int main(void)
| {
| // book::Book b = book::testBook(10, true);
| auto bs = protocol::recoverBook();
| // protocol::catchUp(bs);
| // std::cout << bs.size() << std::endl;
| // for (auto i : bs) {
| // std::cout << i.first << std::endl;
| // i.second.printBook();
| // }
| bom::initialise();
| bom::updateBom(bs);
| bom::destroy();
| protocol::catchUp(bs);
| std::cout << bs.size() << std::endl;
| for (auto& i : bs) {
| std::cout << i.first << ", " << i.second.expiry.count() << ", " << i.second.bomPrice << std::endl;
| i.second.printBook();
| }
| }
|
|