exchange
Low-latency exchange in C++
Loading...
Searching...
No Matches
exchange::server::MatchingEngine Class Reference

#include <matching_engine.hpp>

Public Member Functions

 MatchingEngine (const EventMpscQueue &inQueue, const ActionSpmcSender &actionSender, std::span< const SecurityId > securities)
void loop ()
std::vector< Action > processEvent (const Event &event)

Constructor & Destructor Documentation

◆ MatchingEngine()

exchange::server::MatchingEngine::MatchingEngine ( const EventMpscQueue & inQueue,
const ActionSpmcSender & actionSender,
std::span< const SecurityId > securities )

Member Function Documentation

◆ loop()

void exchange::server::MatchingEngine::loop ( )

Perform one iteration of the matching engine's workflow.

Pops from and pushes to once on the shared memory queues.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ processEvent()

std::vector< Action > exchange::server::MatchingEngine::processEvent ( const Event & event)

Given an event from the gateway requesting that something happen to an order, potentially act on that request to mutate the orderbook and obtain a list of changes to it, for downstream consumers.

Parameters
eventThe event coming from the gateway.
Returns
The list of actions that were performed on the internal orderbook.
Here is the caller graph for this function:

The documentation for this class was generated from the following files: