ITCHCPP 1.6.0
High-Performance NASDAQ TotalView-ITCH 5.0 Parser & Market-Data Platform
Loading...
Searching...
No Matches
sink.hpp
Go to the documentation of this file.
1#pragma once
2
11
12#include "itch/messages.hpp"
13
14namespace itch::io {
15
22 public:
24 MessageSink() = default;
25
27 MessageSink(const MessageSink&) = default;
28
30 MessageSink(MessageSink&&) noexcept = default;
31
35 auto operator=(const MessageSink&) -> MessageSink& = default;
36
40 auto operator=(MessageSink&&) noexcept -> MessageSink& = default;
41
43 virtual ~MessageSink() = default;
44
48 virtual auto write(const Message& message) -> void = 0;
49
51 virtual auto flush() -> void {}
52};
53
54} // namespace itch::io
A generic streaming sink for parsed ITCH messages.
Definition sink.hpp:21
MessageSink(MessageSink &&) noexcept=default
Move-constructs a sink.
MessageSink()=default
Default-constructs an empty sink.
virtual auto flush() -> void
Flushes any buffered output. The default is a no-op.
Definition sink.hpp:51
virtual auto write(const Message &message) -> void=0
Consumes one parsed message.
MessageSink(const MessageSink &)=default
Copy-constructs a sink.
Defines every ITCH 5.0 message struct, the Message variant, and the stream-printing helpers used to f...
std::variant< SystemEventMessage, StockDirectoryMessage, StockTradingActionMessage, RegSHOMessage, MarketParticipantPositionMessage, MWCBDeclineLevelMessage, MWCBStatusMessage, IPOQuotingPeriodUpdateMessage, LULDAuctionCollarMessage, OperationalHaltMessage, AddOrderMessage, AddOrderMPIDAttributionMessage, OrderExecutedMessage, OrderExecutedWithPriceMessage, OrderCancelMessage, OrderDeleteMessage, OrderReplaceMessage, NonCrossTradeMessage, CrossTradeMessage, BrokenTradeMessage, NOIIMessage, RetailPriceImprovementIndicatorMessage, DLCRMessage > Message
A variant able to hold any one of the ITCH 5.0 message structs.
Definition messages.hpp:483