exchange
Low-latency exchange in C++
Loading...
Searching...
No Matches
matching_engine.hpp
Go to the documentation of this file.
1#pragma once
2
8
9#include <span>
10#include <unordered_map>
11#include <vector>
12
13namespace exchange::server
14{
16{
17 EventMpscQueue inQueue;
18 ActionSpmcSender actionSender;
19 std::unordered_map<SecurityId, OrderBook> state;
20
21 public:
22 MatchingEngine(const EventMpscQueue &inQueue, const ActionSpmcSender &actionSender,
23 std::span<const SecurityId> securities);
24
30 void loop();
31
40 std::vector<Action> processEvent(const Event &event);
41};
42} // namespace exchange::server
Definition action_spmc_sender.hpp:15
Definition event_mpsc_queue.hpp:15
MatchingEngine(const EventMpscQueue &inQueue, const ActionSpmcSender &actionSender, std::span< const SecurityId > securities)
Definition matching_engine.cpp:20
std::vector< Action > processEvent(const Event &event)
Definition matching_engine.cpp:39
void loop()
Definition matching_engine.cpp:30
Definition main.hpp:4
Definition event.hpp:17