From fa563f2f597cc522daab5a6d0c62e45595877908 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 12 Mar 2022 10:51:20 +0100 Subject: [PATCH] kraken: make functional binary --- src/CMakeLists.txt | 1 - src/kraken.cc | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0ab39e1..161c973 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,7 +10,6 @@ add_subdirectory(utils) configure_file(config.h.in config.h) target_link_libraries(kraken PRIVATE - book csv engine parse diff --git a/src/kraken.cc b/src/kraken.cc index 5eb9e4a..f57eea4 100644 --- a/src/kraken.cc +++ b/src/kraken.cc @@ -1,5 +1,18 @@ #include +#include "csv/write-csv.hh" +#include "engine/csv-engine-listener.hh" +#include "engine/engine.hh" +#include "parse/parse.hh" + int main() { - std::cout << "Hello World!\n"; + auto const orders = kraken::parse::parse_orders(std::cin); + + auto listener = std::make_shared(); + + auto engine = kraken::engine::Engine(listener); + + engine.process_orders(orders); + + kraken::csv::write_csv(std::cout, listener->output()); }