kraken: make functional binary

This commit is contained in:
Bruno BELANYI 2022-03-12 10:51:20 +01:00
parent e5ddd16da2
commit fa563f2f59
2 changed files with 14 additions and 2 deletions

View file

@ -10,7 +10,6 @@ add_subdirectory(utils)
configure_file(config.h.in config.h)
target_link_libraries(kraken PRIVATE
book
csv
engine
parse

View file

@ -1,5 +1,18 @@
#include <iostream>
#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<kraken::engine::CsvEngineListener>();
auto engine = kraken::engine::Engine(listener);
engine.process_orders(orders);
kraken::csv::write_csv(std::cout, listener->output());
}