-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
30 lines (23 loc) · 783 Bytes
/
main.cpp
File metadata and controls
30 lines (23 loc) · 783 Bytes
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
#include "src/client_handler.h"
#include "src/data_feeder.h"
#include "src/observer.h"
#include "src/parser.h"
#include <iostream>
int main(int argc, char const *argv[]) {
std::string file_path(
"/home/igor/Projects/c++/nasdaq/data/01302019.NASDAQ_ITCH50");
ClientHandler client_handler;
MarkerObserver<ClientHandler> observer(client_handler);
ItchParser<MarkerObserver<ClientHandler>> itch_parser(observer);
DataFeeder<ItchParser<MarkerObserver<ClientHandler>>> data_feeder(
itch_parser);
try {
data_feeder.open_data_source(file_path.data());
} catch (std::ios::failure e) {
std::cout << "[ERROR] Can't open data source file=" << argv[1] << " due to "
<< e.what() << "\n";
return 1;
}
data_feeder.open();
return 0;
}