From e88c44f9dbbb7fa52ba66eea1cf16db0ce9d2360 Mon Sep 17 00:00:00 2001 From: arham Date: Mon, 4 May 2026 16:39:15 -0400 Subject: [PATCH] CME TEMPLATE 9 --- .../ilink3/generated/BusinessReject521.h | 6 +- .../orderman/ilink3/generated/CmtaGiveUpCD.h | 4 +- .../orderman/ilink3/generated/CrossTypeEnum.h | 75 + .../spark/orderman/ilink3/generated/DATA.h | 2 +- .../orderman/ilink3/generated/Decimal32NULL.h | 2 +- .../orderman/ilink3/generated/Decimal64NULL.h | 10 +- .../orderman/ilink3/generated/Establish503.h | 6 +- .../ilink3/generated/EstablishmentAck504.h | 90 +- .../ilink3/generated/EstablishmentReject505.h | 90 +- .../orderman/ilink3/generated/ExecInst.h | 2 +- .../orderman/ilink3/generated/ExecMode.h | 4 +- .../ilink3/generated/ExecutionAck539.h | 6 +- .../generated/ExecutionReportCancel534.h | 6 +- .../generated/ExecutionReportElimination524.h | 6 +- .../generated/ExecutionReportModify531.h | 6 +- .../ilink3/generated/ExecutionReportNew522.h | 6 +- .../ExecutionReportPendingCancel564.h | 6 +- .../ExecutionReportPendingReplace565.h | 6 +- .../generated/ExecutionReportReject523.h | 6 +- .../generated/ExecutionReportStatus532.h | 6 +- .../ExecutionReportTradeAddendumOutright548.h | 334 +- .../ExecutionReportTradeAddendumSpread549.h | 246 +- ...ExecutionReportTradeAddendumSpreadLeg550.h | 372 +- .../ExecutionReportTradeOutright525.h | 14 +- .../generated/ExecutionReportTradeSpread526.h | 6 +- .../ExecutionReportTradeSpreadLeg527.h | 132 +- .../orderman/ilink3/generated/GroupSize.h | 2 +- .../orderman/ilink3/generated/MassQuote517.h | 6 +- .../ilink3/generated/MassQuoteAck545.h | 87 +- .../ilink3/generated/MassQuoteRequest567.h | 2577 ++++++++++++++ .../ilink3/generated/MassQuoteResponse571.h | 3152 +++++++++++++++++ .../ilink3/generated/MaturityMonthYear.h | 2 +- .../orderman/ilink3/generated/MessageHeader.h | 2 +- .../orderman/ilink3/generated/Negotiate500.h | 6 +- .../ilink3/generated/NegotiationReject502.h | 90 +- .../ilink3/generated/NegotiationResponse501.h | 90 +- .../ilink3/generated/NewOrderCross544.h | 6 +- .../ilink3/generated/NewOrderSingle514.h | 6 +- .../orderman/ilink3/generated/NotApplied513.h | 6 +- .../ilink3/generated/OrderCancelReject535.h | 6 +- .../generated/OrderCancelReplaceReject536.h | 6 +- .../generated/OrderCancelReplaceRequest515.h | 6 +- .../ilink3/generated/OrderCancelRequest516.h | 6 +- .../generated/OrderMassActionReport562.h | 6 +- .../generated/OrderMassActionRequest529.h | 6 +- .../generated/OrderMassStatusRequest530.h | 6 +- .../ilink3/generated/OrderStatusRequest533.h | 6 +- .../spark/orderman/ilink3/generated/PRICE9.h | 2 +- .../orderman/ilink3/generated/PRICENULL9.h | 2 +- .../PartyDetailsDefinitionRequest518.h | 6 +- .../PartyDetailsDefinitionRequestAck519.h | 6 +- .../generated/PartyDetailsListReport538.h | 6 +- .../generated/PartyDetailsListRequest537.h | 6 +- .../ilink3/generated/QuoteCancel528.h | 6 +- .../ilink3/generated/QuoteCancelAck563.h | 164 +- .../ilink3/generated/QuoteCancelByGroup569.h | 1835 ++++++++++ .../generated/QuoteCancelByInstrument570.h | 1632 +++++++++ .../ilink3/generated/QuoteCancelBySet568.h | 1699 +++++++++ .../ilink3/generated/RequestForCross566.h | 2376 +++++++++++++ .../ilink3/generated/RequestForQuote543.h | 6 +- .../ilink3/generated/RequestForQuoteAck546.h | 6 +- .../ilink3/generated/Retransmission509.h | 6 +- .../ilink3/generated/RetransmitReject510.h | 6 +- .../ilink3/generated/RetransmitRequest508.h | 6 +- .../spark/orderman/ilink3/generated/SMPI.h | 4 +- .../generated/SecurityDefinitionRequest560.h | 6 +- .../generated/SecurityDefinitionResponse561.h | 6 +- .../orderman/ilink3/generated/Sequence506.h | 6 +- .../spark/orderman/ilink3/generated/Side.h | 72 + .../orderman/ilink3/generated/Terminate507.h | 6 +- .../orderman/ilink3/generated/ilinkbinary.xml | 299 +- 71 files changed, 15469 insertions(+), 229 deletions(-) create mode 100644 src/lib_spark/spark/orderman/ilink3/generated/CrossTypeEnum.h create mode 100644 src/lib_spark/spark/orderman/ilink3/generated/MassQuoteRequest567.h create mode 100644 src/lib_spark/spark/orderman/ilink3/generated/MassQuoteResponse571.h create mode 100644 src/lib_spark/spark/orderman/ilink3/generated/QuoteCancelByGroup569.h create mode 100644 src/lib_spark/spark/orderman/ilink3/generated/QuoteCancelByInstrument570.h create mode 100644 src/lib_spark/spark/orderman/ilink3/generated/QuoteCancelBySet568.h create mode 100644 src/lib_spark/spark/orderman/ilink3/generated/RequestForCross566.h create mode 100644 src/lib_spark/spark/orderman/ilink3/generated/Side.h diff --git a/src/lib_spark/spark/orderman/ilink3/generated/BusinessReject521.h b/src/lib_spark/spark/orderman/ilink3/generated/BusinessReject521.h index 5db006073..cec4635dd 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/BusinessReject521.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/BusinessReject521.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(330); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(521); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/CmtaGiveUpCD.h b/src/lib_spark/spark/orderman/ilink3/generated/CmtaGiveUpCD.h index 3a96a4b98..c552a2f57 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/CmtaGiveUpCD.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/CmtaGiveUpCD.h @@ -32,7 +32,7 @@ public: { GiveUp = static_cast(71), SGXoffset = static_cast(83), - NULL_VALUE = static_cast(0x00) + NULL_VALUE = static_cast(48) }; static CmtaGiveUpCD::Value get(const char value) @@ -41,7 +41,7 @@ public: { case static_cast(71): return GiveUp; case static_cast(83): return SGXoffset; - case static_cast(0x00): return NULL_VALUE; + case static_cast(48): return NULL_VALUE; } throw std::runtime_error("unknown value for enum CmtaGiveUpCD [E103]"); diff --git a/src/lib_spark/spark/orderman/ilink3/generated/CrossTypeEnum.h b/src/lib_spark/spark/orderman/ilink3/generated/CrossTypeEnum.h new file mode 100644 index 000000000..430454eac --- /dev/null +++ b/src/lib_spark/spark/orderman/ilink3/generated/CrossTypeEnum.h @@ -0,0 +1,75 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_CROSSTYPEENUM_H_ +#define _ILINKBINARY_CROSSTYPEENUM_H_ + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + +namespace iLinkBinary { + +class CrossTypeEnum +{ +public: + enum Value + { + Cross = static_cast(3), + RCross = static_cast(20), + CCross = static_cast(21), + NULL_VALUE = static_cast(255) + }; + + static CrossTypeEnum::Value get(const std::uint8_t value) + { + switch (value) + { + case static_cast(3): return Cross; + case static_cast(20): return RCross; + case static_cast(21): return CCross; + case static_cast(255): return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum CrossTypeEnum [E103]"); + } + + static const char *c_str(const CrossTypeEnum::Value value) + { + switch (value) + { + case Cross: return "Cross"; + case RCross: return "RCross"; + case CCross: return "CCross"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum CrossTypeEnum [E103]:"); + } + + template + friend std::basic_ostream & operator << ( + std::basic_ostream &os, CrossTypeEnum::Value m) + { + return os << CrossTypeEnum::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib_spark/spark/orderman/ilink3/generated/DATA.h b/src/lib_spark/spark/orderman/ilink3/generated/DATA.h index 2fdbfdba7..539a4f7af 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/DATA.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/DATA.h @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static const char *lengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/Decimal32NULL.h b/src/lib_spark/spark/orderman/ilink3/generated/Decimal32NULL.h index f936295e2..436433864 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/Decimal32NULL.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/Decimal32NULL.h @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/Decimal64NULL.h b/src/lib_spark/spark/orderman/ilink3/generated/Decimal64NULL.h index ef20dc82e..1b2cf42de 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/Decimal64NULL.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/Decimal64NULL.h @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT @@ -213,7 +213,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT { - return 6; + return 9; } SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT @@ -255,7 +255,7 @@ public: SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT { - if (m_actingVersion < 6) + if (m_actingVersion < 9) { return INT64_C(9223372036854775807); } @@ -288,7 +288,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT { - return 6; + return 9; } SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT @@ -330,7 +330,7 @@ public: SBE_NODISCARD std::int8_t exponent() const SBE_NOEXCEPT { - if (m_actingVersion < 6) + if (m_actingVersion < 9) { return static_cast(127); } diff --git a/src/lib_spark/spark/orderman/ilink3/generated/Establish503.h b/src/lib_spark/spark/orderman/ilink3/generated/Establish503.h index 261b92fac..254fe00f3 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/Establish503.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/Establish503.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(132); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(503); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/EstablishmentAck504.h b/src/lib_spark/spark/orderman/ilink3/generated/EstablishmentAck504.h index 9e319239b..e2d6a7c50 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/EstablishmentAck504.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/EstablishmentAck504.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -165,10 +167,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(38); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(39); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(504); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -222,7 +224,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(38); + return static_cast(39); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -968,6 +970,82 @@ public: return *this; } + SBE_NODISCARD static const char *EnvironmentIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t environmentIndicatorId() SBE_NOEXCEPT + { + return 39032; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t environmentIndicatorSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool environmentIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= environmentIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t environmentIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 38; + } + + static SBE_CONSTEXPR std::uint8_t environmentIndicatorNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t environmentIndicatorMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t environmentIndicatorMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t environmentIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t environmentIndicator() const SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 38, sizeof(std::uint8_t)); + return (val); + } + + EstablishmentAck504 &environmentIndicator(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 38, &val, sizeof(std::uint8_t)); + return *this; + } + template friend std::basic_ostream & operator << ( std::basic_ostream &builder, EstablishmentAck504 _writer) @@ -1020,6 +1098,10 @@ friend std::basic_ostream & operator << ( builder << R"("SplitMsg": )"; builder << '"' << writer.splitMsg() << '"'; + builder << ", "; + builder << R"("EnvironmentIndicator": )"; + builder << +writer.environmentIndicator(); + builder << '}'; return builder; diff --git a/src/lib_spark/spark/orderman/ilink3/generated/EstablishmentReject505.h b/src/lib_spark/spark/orderman/ilink3/generated/EstablishmentReject505.h index 5b81b904f..91b6ab03e 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/EstablishmentReject505.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/EstablishmentReject505.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -165,10 +167,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(72); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(73); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(505); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -222,7 +224,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(72); + return static_cast(73); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -961,6 +963,82 @@ public: return *this; } + SBE_NODISCARD static const char *EnvironmentIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t environmentIndicatorId() SBE_NOEXCEPT + { + return 39032; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t environmentIndicatorSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool environmentIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= environmentIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t environmentIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR std::uint8_t environmentIndicatorNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t environmentIndicatorMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t environmentIndicatorMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t environmentIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t environmentIndicator() const SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 72, sizeof(std::uint8_t)); + return (val); + } + + EstablishmentReject505 &environmentIndicator(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 72, &val, sizeof(std::uint8_t)); + return *this; + } + template friend std::basic_ostream & operator << ( std::basic_ostream &builder, EstablishmentReject505 _writer) @@ -1006,6 +1084,10 @@ friend std::basic_ostream & operator << ( builder << R"("SplitMsg": )"; builder << '"' << writer.splitMsg() << '"'; + builder << ", "; + builder << R"("EnvironmentIndicator": )"; + builder << +writer.environmentIndicator(); + builder << '}'; return builder; diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ExecInst.h b/src/lib_spark/spark/orderman/ilink3/generated/ExecInst.h index e1595c161..1763426ba 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ExecInst.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/ExecInst.h @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } ExecInst &clear() diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ExecMode.h b/src/lib_spark/spark/orderman/ilink3/generated/ExecMode.h index bb894e61d..eef5d7a6e 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ExecMode.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/ExecMode.h @@ -32,7 +32,7 @@ public: { Aggressive = static_cast(65), Passive = static_cast(80), - NULL_VALUE = static_cast(0x00) + NULL_VALUE = static_cast(48) }; static ExecMode::Value get(const char value) @@ -41,7 +41,7 @@ public: { case static_cast(65): return Aggressive; case static_cast(80): return Passive; - case static_cast(0x00): return NULL_VALUE; + case static_cast(48): return NULL_VALUE; } throw std::runtime_error("unknown value for enum ExecMode [E103]"); diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionAck539.h b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionAck539.h index 1e5e6b802..90f789a9c 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionAck539.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionAck539.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(101); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(539); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportCancel534.h b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportCancel534.h index 1f6459986..0814ce5f1 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportCancel534.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportCancel534.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(247); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(534); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportElimination524.h b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportElimination524.h index bab8055c5..299892093 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportElimination524.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportElimination524.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(219); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(524); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportModify531.h b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportModify531.h index 69e2be133..fbe043361 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportModify531.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportModify531.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(226); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(531); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportNew522.h b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportNew522.h index 29cf6dad9..64eb7013c 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportNew522.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportNew522.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(226); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(522); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportPendingCancel564.h b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportPendingCancel564.h index d750eacdb..4f93905f7 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportPendingCancel564.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportPendingCancel564.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(219); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(564); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportPendingReplace565.h b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportPendingReplace565.h index 40cb541f7..2209c291b 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportPendingReplace565.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportPendingReplace565.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(196); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(565); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportReject523.h b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportReject523.h index 8c5393eda..4c3e8db52 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportReject523.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportReject523.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(483); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(523); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportStatus532.h b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportStatus532.h index 20c2a4399..0b87a6586 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportStatus532.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportStatus532.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(513); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(532); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeAddendumOutright548.h b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeAddendumOutright548.h index 1070778b1..4438882ed 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeAddendumOutright548.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeAddendumOutright548.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -165,10 +167,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(222); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(266); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(548); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -222,7 +224,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(222); + return static_cast(266); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -3110,7 +3112,7 @@ public: { switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; case MetaAttribute::PRESENCE: return "required"; default: return ""; } @@ -3157,7 +3159,7 @@ public: { switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; case MetaAttribute::PRESENCE: return "required"; default: return ""; } @@ -3247,6 +3249,313 @@ public: return m_benchmarkPrice; } + SBE_NODISCARD static const char *MDTradeEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDTradeEntryIDId() SBE_NOEXCEPT + { + return 37711; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDTradeEntryIDSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool mDTradeEntryIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mDTradeEntryIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDTradeEntryIDEncodingOffset() SBE_NOEXCEPT + { + return 222; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t mDTradeEntryIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t mDTradeEntryID() const SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return UINT32_C(0xffffffff); + } + + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 222, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumOutright548 &mDTradeEntryID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 222, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *ExecRefIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execRefIDId() SBE_NOEXCEPT + { + return 19; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execRefIDSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool execRefIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execRefIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execRefIDEncodingOffset() SBE_NOEXCEPT + { + return 226; + } + + static SBE_CONSTEXPR char execRefIDNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char execRefIDMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char execRefIDMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t execRefIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execRefIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execRefID() const SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return nullptr; + } + + return m_buffer + m_offset + 226; + } + + SBE_NODISCARD char *execRefID() SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return nullptr; + } + + return m_buffer + m_offset + 226; + } + + SBE_NODISCARD char execRefID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execRefID [E104]"); + } + + if (m_actingVersion < 9) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 226 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumOutright548 &execRefID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execRefID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 226 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecRefID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecRefID [E106]"); + } + + if (m_actingVersion < 9) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 226, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumOutright548 &putExecRefID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 226, src, sizeof(char) * 40); + return *this; + } + + SBE_NODISCARD std::string getExecRefIDAsString() const + { + const char *buffer = m_buffer + m_offset + 226; + std::size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecRefIDAsJsonEscapedString() + { + if (m_actingVersion < 9) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getExecRefIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExecRefIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 226; + std::size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumOutright548 &putExecRefID(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecRefID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 226, str.data(), srcLength); + for (std::size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 226 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumOutright548 &putExecRefID(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecRefID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 226, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 226 + start] = 0; + } + + return *this; + } + #endif + class NoFills { private: @@ -4639,7 +4948,7 @@ public: { switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; case MetaAttribute::PRESENCE: return "required"; default: return ""; } @@ -4686,7 +4995,7 @@ public: { switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; case MetaAttribute::PRESENCE: return "required"; default: return ""; } @@ -5043,6 +5352,15 @@ friend std::basic_ostream & operator << ( builder << "{}"; } + builder << ", "; + builder << R"("MDTradeEntryID": )"; + builder << +writer.mDTradeEntryID(); + + builder << ", "; + builder << R"("ExecRefID": )"; + builder << '"' << + writer.getExecRefIDAsJsonEscapedString().c_str() << '"'; + builder << ", "; { bool atLeastOne = false; diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeAddendumSpread549.h b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeAddendumSpread549.h index 821583834..d4130b07f 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeAddendumSpread549.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeAddendumSpread549.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -165,10 +167,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(187); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(227); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(549); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -222,7 +224,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(187); + return static_cast(227); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -2963,6 +2965,237 @@ public: return *this; } + SBE_NODISCARD static const char *ExecRefIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execRefIDId() SBE_NOEXCEPT + { + return 19; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execRefIDSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool execRefIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execRefIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execRefIDEncodingOffset() SBE_NOEXCEPT + { + return 187; + } + + static SBE_CONSTEXPR char execRefIDNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char execRefIDMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char execRefIDMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t execRefIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execRefIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execRefID() const SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return nullptr; + } + + return m_buffer + m_offset + 187; + } + + SBE_NODISCARD char *execRefID() SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return nullptr; + } + + return m_buffer + m_offset + 187; + } + + SBE_NODISCARD char execRefID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execRefID [E104]"); + } + + if (m_actingVersion < 9) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 187 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpread549 &execRefID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execRefID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 187 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecRefID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecRefID [E106]"); + } + + if (m_actingVersion < 9) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 187, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpread549 &putExecRefID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 187, src, sizeof(char) * 40); + return *this; + } + + SBE_NODISCARD std::string getExecRefIDAsString() const + { + const char *buffer = m_buffer + m_offset + 187; + std::size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecRefIDAsJsonEscapedString() + { + if (m_actingVersion < 9) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getExecRefIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExecRefIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 187; + std::size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpread549 &putExecRefID(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecRefID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 187, str.data(), srcLength); + for (std::size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 187 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpread549 &putExecRefID(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecRefID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 187, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 187 + start] = 0; + } + + return *this; + } + #endif + class NoFills { private: @@ -5378,6 +5611,11 @@ friend std::basic_ostream & operator << ( builder << R"("ShortSaleType": )"; builder << '"' << writer.shortSaleType() << '"'; + builder << ", "; + builder << R"("ExecRefID": )"; + builder << '"' << + writer.getExecRefIDAsJsonEscapedString().c_str() << '"'; + builder << ", "; { bool atLeastOne = false; diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeAddendumSpreadLeg550.h b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeAddendumSpreadLeg550.h index d5917c7f7..21e1b1974 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeAddendumSpreadLeg550.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeAddendumSpreadLeg550.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -165,10 +167,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(196); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(236); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(550); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -222,7 +224,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(196); + return static_cast(236); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -2544,7 +2546,7 @@ public: { switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; case MetaAttribute::PRESENCE: return "required"; default: return ""; } @@ -2591,7 +2593,7 @@ public: { switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; case MetaAttribute::PRESENCE: return "required"; default: return ""; } @@ -2634,6 +2636,237 @@ public: return m_grossTradeAmt; } + SBE_NODISCARD static const char *ExecRefIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t execRefIDId() SBE_NOEXCEPT + { + return 19; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execRefIDSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool execRefIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execRefIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execRefIDEncodingOffset() SBE_NOEXCEPT + { + return 196; + } + + static SBE_CONSTEXPR char execRefIDNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char execRefIDMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char execRefIDMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t execRefIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execRefIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execRefID() const SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return nullptr; + } + + return m_buffer + m_offset + 196; + } + + SBE_NODISCARD char *execRefID() SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return nullptr; + } + + return m_buffer + m_offset + 196; + } + + SBE_NODISCARD char execRefID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execRefID [E104]"); + } + + if (m_actingVersion < 9) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 196 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &execRefID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execRefID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 196 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecRefID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecRefID [E106]"); + } + + if (m_actingVersion < 9) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 196, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpreadLeg550 &putExecRefID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 196, src, sizeof(char) * 40); + return *this; + } + + SBE_NODISCARD std::string getExecRefIDAsString() const + { + const char *buffer = m_buffer + m_offset + 196; + std::size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecRefIDAsJsonEscapedString() + { + if (m_actingVersion < 9) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getExecRefIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getExecRefIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 196; + std::size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpreadLeg550 &putExecRefID(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecRefID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 196, str.data(), srcLength); + for (std::size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 196 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpreadLeg550 &putExecRefID(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecRefID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 196, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 196 + start] = 0; + } + + return *this; + } + #endif + class NoFills { private: @@ -3331,11 +3564,11 @@ public: m_buffer = buffer; m_bufferLength = bufferLength; GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength(static_cast(27)); + dimensions.blockLength(static_cast(45)); dimensions.numInGroup(static_cast(count)); m_index = 0; m_count = count; - m_blockLength = 27; + m_blockLength = 45; m_actingVersion = actingVersion; m_initialPosition = *pos; m_positionPtr = pos; @@ -3349,7 +3582,7 @@ public: static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 27; + return 45; } SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT @@ -4022,6 +4255,100 @@ public: return *this; } + SBE_NODISCARD static const char *ContraGrossTradeAmtMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t contraGrossTradeAmtId() SBE_NOEXCEPT + { + return 5542; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t contraGrossTradeAmtSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool contraGrossTradeAmtInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= contraGrossTradeAmtSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t contraGrossTradeAmtEncodingOffset() SBE_NOEXCEPT + { + return 27; + } + +private: + Decimal64NULL m_contraGrossTradeAmt; + +public: + SBE_NODISCARD Decimal64NULL &contraGrossTradeAmt() + { + m_contraGrossTradeAmt.wrap(m_buffer, m_offset + 27, m_actingVersion, m_bufferLength); + return m_contraGrossTradeAmt; + } + + SBE_NODISCARD static const char *ContraCalculatedCcyLastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t contraCalculatedCcyLastQtyId() SBE_NOEXCEPT + { + return 5971; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t contraCalculatedCcyLastQtySinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool contraCalculatedCcyLastQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= contraCalculatedCcyLastQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t contraCalculatedCcyLastQtyEncodingOffset() SBE_NOEXCEPT + { + return 36; + } + +private: + Decimal64NULL m_contraCalculatedCcyLastQty; + +public: + SBE_NODISCARD Decimal64NULL &contraCalculatedCcyLastQty() + { + m_contraCalculatedCcyLastQty.wrap(m_buffer, m_offset + 36, m_actingVersion, m_bufferLength); + return m_contraCalculatedCcyLastQty; + } + template friend std::basic_ostream & operator << ( std::basic_ostream &builder, NoOrderEvents writer) @@ -4055,6 +4382,28 @@ public: builder << R"("OriginalOrderEventExecID": )"; builder << +writer.originalOrderEventExecID(); + builder << ", "; + builder << R"("ContraGrossTradeAmt": )"; + if (writer.contraGrossTradeAmtInActingVersion()) + { + builder << writer.contraGrossTradeAmt(); + } + else + { + builder << "{}"; + } + + builder << ", "; + builder << R"("ContraCalculatedCcyLastQty": )"; + if (writer.contraCalculatedCcyLastQtyInActingVersion()) + { + builder << writer.contraCalculatedCcyLastQty(); + } + else + { + builder << "{}"; + } + builder << '}'; return builder; @@ -4260,6 +4609,11 @@ friend std::basic_ostream & operator << ( builder << "{}"; } + builder << ", "; + builder << R"("ExecRefID": )"; + builder << '"' << + writer.getExecRefIDAsJsonEscapedString().c_str() << '"'; + builder << ", "; { bool atLeastOne = false; diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeOutright525.h b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeOutright525.h index 367d42400..b30a98838 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeOutright525.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeOutright525.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(293); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(525); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -4094,7 +4096,7 @@ public: { switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; case MetaAttribute::PRESENCE: return "required"; default: return ""; } @@ -4141,7 +4143,7 @@ public: { switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; case MetaAttribute::PRESENCE: return "required"; default: return ""; } @@ -5717,7 +5719,7 @@ public: { switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; case MetaAttribute::PRESENCE: return "required"; default: return ""; } @@ -5764,7 +5766,7 @@ public: { switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; case MetaAttribute::PRESENCE: return "required"; default: return ""; } diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeSpread526.h b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeSpread526.h index 1784c260f..e5d954269 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeSpread526.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeSpread526.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(230); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(526); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeSpreadLeg527.h b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeSpreadLeg527.h index d7c1ede74..8293a6cbe 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeSpreadLeg527.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/ExecutionReportTradeSpreadLeg527.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(219); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(527); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -2760,7 +2762,7 @@ public: { switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; case MetaAttribute::PRESENCE: return "required"; default: return ""; } @@ -2807,7 +2809,7 @@ public: { switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; case MetaAttribute::PRESENCE: return "required"; default: return ""; } @@ -3547,11 +3549,11 @@ public: m_buffer = buffer; m_bufferLength = bufferLength; GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength(static_cast(23)); + dimensions.blockLength(static_cast(41)); dimensions.numInGroup(static_cast(count)); m_index = 0; m_count = count; - m_blockLength = 23; + m_blockLength = 41; m_actingVersion = actingVersion; m_initialPosition = *pos; m_positionPtr = pos; @@ -3565,7 +3567,7 @@ public: static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 23; + return 41; } SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT @@ -4162,6 +4164,100 @@ public: return *this; } + SBE_NODISCARD static const char *ContraGrossTradeAmtMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t contraGrossTradeAmtId() SBE_NOEXCEPT + { + return 5542; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t contraGrossTradeAmtSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool contraGrossTradeAmtInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= contraGrossTradeAmtSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t contraGrossTradeAmtEncodingOffset() SBE_NOEXCEPT + { + return 23; + } + +private: + Decimal64NULL m_contraGrossTradeAmt; + +public: + SBE_NODISCARD Decimal64NULL &contraGrossTradeAmt() + { + m_contraGrossTradeAmt.wrap(m_buffer, m_offset + 23, m_actingVersion, m_bufferLength); + return m_contraGrossTradeAmt; + } + + SBE_NODISCARD static const char *ContraCalculatedCcyLastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t contraCalculatedCcyLastQtyId() SBE_NOEXCEPT + { + return 5971; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t contraCalculatedCcyLastQtySinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool contraCalculatedCcyLastQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= contraCalculatedCcyLastQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t contraCalculatedCcyLastQtyEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + +private: + Decimal64NULL m_contraCalculatedCcyLastQty; + +public: + SBE_NODISCARD Decimal64NULL &contraCalculatedCcyLastQty() + { + m_contraCalculatedCcyLastQty.wrap(m_buffer, m_offset + 32, m_actingVersion, m_bufferLength); + return m_contraCalculatedCcyLastQty; + } + template friend std::basic_ostream & operator << ( std::basic_ostream &builder, NoOrderEvents writer) @@ -4191,6 +4287,28 @@ public: builder << R"("OrderEventReason": )"; builder << +writer.orderEventReason(); + builder << ", "; + builder << R"("ContraGrossTradeAmt": )"; + if (writer.contraGrossTradeAmtInActingVersion()) + { + builder << writer.contraGrossTradeAmt(); + } + else + { + builder << "{}"; + } + + builder << ", "; + builder << R"("ContraCalculatedCcyLastQty": )"; + if (writer.contraCalculatedCcyLastQtyInActingVersion()) + { + builder << writer.contraCalculatedCcyLastQty(); + } + else + { + builder << "{}"; + } + builder << '}'; return builder; diff --git a/src/lib_spark/spark/orderman/ilink3/generated/GroupSize.h b/src/lib_spark/spark/orderman/ilink3/generated/GroupSize.h index 194cf92d5..2e05558d8 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/GroupSize.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/GroupSize.h @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static const char *blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/MassQuote517.h b/src/lib_spark/spark/orderman/ilink3/generated/MassQuote517.h index fd63c882f..dc034ee8a 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/MassQuote517.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/MassQuote517.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(123); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(517); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/MassQuoteAck545.h b/src/lib_spark/spark/orderman/ilink3/generated/MassQuoteAck545.h index 9f1d810b1..195689eec 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/MassQuoteAck545.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/MassQuoteAck545.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -165,10 +167,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(351); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(352); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(545); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -222,7 +224,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(351); + return static_cast(352); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -2344,6 +2346,79 @@ public: return *this; } + SBE_NODISCARD static const char *QuoteEntryControlMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryControlId() SBE_NOEXCEPT + { + return 39034; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryControlSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool quoteEntryControlInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteEntryControlSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryControlEncodingOffset() SBE_NOEXCEPT + { + return 351; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryControlEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t quoteEntryControlRaw() const SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 351, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value quoteEntryControl() const + { + if (m_actingVersion < 9) + { + return BooleanNULL::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 351, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + MassQuoteAck545 "eEntryControl(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 351, &val, sizeof(std::uint8_t)); + return *this; + } + class NoQuoteEntries { private: @@ -2970,6 +3045,10 @@ friend std::basic_ostream & operator << ( builder << R"("QuoteEntryOpen": )"; builder << '"' << writer.quoteEntryOpen() << '"'; + builder << ", "; + builder << R"("QuoteEntryControl": )"; + builder << '"' << writer.quoteEntryControl() << '"'; + builder << ", "; { bool atLeastOne = false; diff --git a/src/lib_spark/spark/orderman/ilink3/generated/MassQuoteRequest567.h b/src/lib_spark/spark/orderman/ilink3/generated/MassQuoteRequest567.h new file mode 100644 index 000000000..9a9b5770d --- /dev/null +++ b/src/lib_spark/spark/orderman/ilink3/generated/MassQuoteRequest567.h @@ -0,0 +1,2577 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSQUOTEREQUEST567_H_ +#define _ILINKBINARY_MASSQUOTEREQUEST567_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "Side.h" +#include "OrderStatus.h" +#include "CrossTypeEnum.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class MassQuoteRequest567 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(124); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(567); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); + + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + using messageHeader = MessageHeader; + + MassQuoteRequest567() = default; + + MassQuoteRequest567( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), + m_actingVersion(actingVersion) + { + } + + MassQuoteRequest567(char *buffer, const std::uint64_t bufferLength) : + MassQuoteRequest567(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + MassQuoteRequest567( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MassQuoteRequest567(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(124); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(567); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(8); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } + + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "i"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + MassQuoteRequest567 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MassQuoteRequest567(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + MassQuoteRequest567 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = MassQuoteRequest567( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + MassQuoteRequest567 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MassQuoteRequest567(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + MassQuoteRequest567 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + MassQuoteRequest567 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuoteRequest567 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuoteRequest567 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t manualOrderIndicatorRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + MassQuoteRequest567 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + MassQuoteRequest567 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + MassQuoteRequest567 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + MassQuoteRequest567 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + std::size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + std::size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuoteRequest567 &putSenderID(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 21, str.data(), srcLength); + for (std::size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + MassQuoteRequest567 &putSenderID(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 21, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *QuoteReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteReqIDId() SBE_NOEXCEPT + { + return 131; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteReqIDEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDNullValue() SBE_NOEXCEPT + { + return UINT64_C(0xffffffffffffffff); + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t quoteReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t quoteReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 41, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuoteRequest567 "eReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 41, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 49; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 49; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 49; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 49 + (index * 1), sizeof(char)); + return (val); + } + + MassQuoteRequest567 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 49 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 49, sizeof(char) * static_cast(length)); + return length; + } + + MassQuoteRequest567 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 49, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 49; + std::size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 49; + std::size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuoteRequest567 &putLocation(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 49, str.data(), srcLength); + for (std::size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #else + MassQuoteRequest567 &putLocation(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 49, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *QuoteIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteIDId() SBE_NOEXCEPT + { + return 117; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteIDEncodingOffset() SBE_NOEXCEPT + { + return 54; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t quoteIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t quoteID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 54, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + MassQuoteRequest567 "eID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 54, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *TotNoQuoteEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t totNoQuoteEntriesId() SBE_NOEXCEPT + { + return 304; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNoQuoteEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool totNoQuoteEntriesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= totNoQuoteEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNoQuoteEntriesEncodingOffset() SBE_NOEXCEPT + { + return 58; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t totNoQuoteEntriesEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t totNoQuoteEntries() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 58, sizeof(std::uint8_t)); + return (val); + } + + MassQuoteRequest567 &totNoQuoteEntries(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 58, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MMProtectionResetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mMProtectionResetId() SBE_NOEXCEPT + { + return 9773; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mMProtectionResetSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mMProtectionResetInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mMProtectionResetSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mMProtectionResetEncodingOffset() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mMProtectionResetEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t mMProtectionResetRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 59, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanFlag::Value mMProtectionReset() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 59, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + MassQuoteRequest567 &mMProtectionReset(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 59, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t liquidityFlagRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 60, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 60, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + MassQuoteRequest567 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 60, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t shortSaleTypeId() SBE_NOEXCEPT + { + return 5409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t shortSaleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool shortSaleTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= shortSaleTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingOffset() SBE_NOEXCEPT + { + return 61; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t shortSaleTypeRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 61, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 61, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + MassQuoteRequest567 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 61, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteEntryOpenMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryOpenId() SBE_NOEXCEPT + { + return 9182; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryOpenSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteEntryOpenInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteEntryOpenSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryOpenEncodingOffset() SBE_NOEXCEPT + { + return 62; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryOpenEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t quoteEntryOpenRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 62, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value quoteEntryOpen() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 62, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + MassQuoteRequest567 "eEntryOpen(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 62, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteEntryControlMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryControlId() SBE_NOEXCEPT + { + return 39034; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryControlSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteEntryControlInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteEntryControlSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryControlEncodingOffset() SBE_NOEXCEPT + { + return 63; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryControlEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t quoteEntryControlRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 63, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value quoteEntryControl() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 63, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + MassQuoteRequest567 "eEntryControl(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 63, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *ReservedMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t reservedId() SBE_NOEXCEPT + { + return 5187; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservedSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool reservedInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reservedSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservedEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + static SBE_CONSTEXPR char reservedNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char reservedMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char reservedMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t reservedEncodingLength() SBE_NOEXCEPT + { + return 60; + } + + static SBE_CONSTEXPR std::uint64_t reservedLength() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD const char *reserved() const SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return nullptr; + } + + return m_buffer + m_offset + 64; + } + + SBE_NODISCARD char *reserved() SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return nullptr; + } + + return m_buffer + m_offset + 64; + } + + SBE_NODISCARD char reserved(const std::uint64_t index) const + { + if (index >= 60) + { + throw std::runtime_error("index out of range for reserved [E104]"); + } + + if (m_actingVersion < 9) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 64 + (index * 1), sizeof(char)); + return (val); + } + + MassQuoteRequest567 &reserved(const std::uint64_t index, const char value) + { + if (index >= 60) + { + throw std::runtime_error("index out of range for reserved [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 64 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getReserved(char *const dst, const std::uint64_t length) const + { + if (length > 60) + { + throw std::runtime_error("length too large for getReserved [E106]"); + } + + if (m_actingVersion < 9) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 64, sizeof(char) * static_cast(length)); + return length; + } + + MassQuoteRequest567 &putReserved(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 64, src, sizeof(char) * 60); + return *this; + } + + SBE_NODISCARD std::string getReservedAsString() const + { + const char *buffer = m_buffer + m_offset + 64; + std::size_t length = 0; + + for (; length < 60 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getReservedAsJsonEscapedString() + { + if (m_actingVersion < 9) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getReservedAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getReservedAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 64; + std::size_t length = 0; + + for (; length < 60 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuoteRequest567 &putReserved(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 60) + { + throw std::runtime_error("string too large for putReserved [E106]"); + } + + std::memcpy(m_buffer + m_offset + 64, str.data(), srcLength); + for (std::size_t start = srcLength; start < 60; ++start) + { + m_buffer[m_offset + 64 + start] = 0; + } + + return *this; + } + #else + MassQuoteRequest567 &putReserved(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 60) + { + throw std::runtime_error("string too large for putReserved [E106]"); + } + + std::memcpy(m_buffer + m_offset + 64, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 60; ++start) + { + m_buffer[m_offset + 64 + start] = 0; + } + + return *this; + } + #endif + + class NoQuoteEntries + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength(static_cast(23)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 23; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 23; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoQuoteEntries &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + template inline void forEach(Func &&func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *PriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t priceId() SBE_NOEXCEPT + { + return 44; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool priceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= priceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + +private: + PRICE9 m_price; + +public: + SBE_NODISCARD PRICE9 &price() + { + m_price.wrap(m_buffer, m_offset + 4, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char *OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderQtyId() SBE_NOEXCEPT + { + return 38; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderQtyEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= sideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t sideRaw() const SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD Side::Value side() const + { + if (m_actingVersion < 9) + { + return Side::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return Side::get((val)); + } + + NoQuoteEntries &side(const Side::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryIDId() SBE_NOEXCEPT + { + return 299; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteEntryIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteEntryIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryIDEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t quoteEntryIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t quoteEntryID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries "eEntryID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteSetIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDId() SBE_NOEXCEPT + { + return 302; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteSetIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteSetIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteSetIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteSetIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } + + static SBE_CONSTEXPR std::size_t quoteSetIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t quoteSetID() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 21, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoQuoteEntries "eSetID(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 21, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoQuoteEntries writer) + { + builder << '{'; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("QuoteEntryID": )"; + builder << +writer.quoteEntryID(); + + builder << ", "; + builder << R"("QuoteSetID": )"; + builder << +writer.quoteSetID(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static std::size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoQuoteEntries m_noQuoteEntries; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoQuoteEntriesId() SBE_NOEXCEPT + { + return 295; + } + + SBE_NODISCARD inline NoQuoteEntries &noQuoteEntries() + { + m_noQuoteEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + NoQuoteEntries &noQuoteEntriesCount(const std::uint8_t count) + { + m_noQuoteEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noQuoteEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noQuoteEntriesInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noQuoteEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, MassQuoteRequest567 _writer) +{ + MassQuoteRequest567 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + + builder << '{'; + builder << R"("Name": "MassQuoteRequest567", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteReqID": )"; + builder << +writer.quoteReqID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteID": )"; + builder << +writer.quoteID(); + + builder << ", "; + builder << R"("TotNoQuoteEntries": )"; + builder << +writer.totNoQuoteEntries(); + + builder << ", "; + builder << R"("MMProtectionReset": )"; + builder << '"' << writer.mMProtectionReset() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << ", "; + builder << R"("QuoteEntryOpen": )"; + builder << '"' << writer.quoteEntryOpen() << '"'; + + builder << ", "; + builder << R"("QuoteEntryControl": )"; + builder << '"' << writer.quoteEntryControl() << '"'; + + builder << ", "; + builder << R"("Reserved": )"; + builder << '"' << + writer.getReservedAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteEntries": [)"; + writer.noQuoteEntries().forEach( + [&](NoQuoteEntries &noQuoteEntries) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteEntries; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + auto &noQuoteEntriesGroup { noQuoteEntries() }; + while (noQuoteEntriesGroup.hasNext()) + { + noQuoteEntriesGroup.next().skip(); + } +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noQuoteEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoQuoteEntries::sbeHeaderSize(); + if (noQuoteEntriesLength > 254LL) + { + throw std::runtime_error("noQuoteEntriesLength outside of allowed range [E110]"); + } + length += noQuoteEntriesLength *NoQuoteEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib_spark/spark/orderman/ilink3/generated/MassQuoteResponse571.h b/src/lib_spark/spark/orderman/ilink3/generated/MassQuoteResponse571.h new file mode 100644 index 000000000..4cfd32f3d --- /dev/null +++ b/src/lib_spark/spark/orderman/ilink3/generated/MassQuoteResponse571.h @@ -0,0 +1,3152 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSQUOTERESPONSE571_H_ +#define _ILINKBINARY_MASSQUOTERESPONSE571_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "Side.h" +#include "OrderStatus.h" +#include "CrossTypeEnum.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class MassQuoteResponse571 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(350); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(571); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); + + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + using messageHeader = MessageHeader; + + MassQuoteResponse571() = default; + + MassQuoteResponse571( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), + m_actingVersion(actingVersion) + { + } + + MassQuoteResponse571(char *buffer, const std::uint64_t bufferLength) : + MassQuoteResponse571(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + MassQuoteResponse571( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MassQuoteResponse571(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(350); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(571); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(8); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } + + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "b"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + MassQuoteResponse571 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MassQuoteResponse571(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + MassQuoteResponse571 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = MassQuoteResponse571( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + MassQuoteResponse571 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MassQuoteResponse571(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + MassQuoteResponse571 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + MassQuoteResponse571 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + MassQuoteResponse571 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT + { + return 39001; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= uUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuoteResponse571 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t textId() SBE_NOEXCEPT + { + return 58; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t textSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool textInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= textSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t textEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char textNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t textEncodingLength() SBE_NOEXCEPT + { + return 256; + } + + static SBE_CONSTEXPR std::uint64_t textLength() SBE_NOEXCEPT + { + return 256; + } + + SBE_NODISCARD const char *text() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *text() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char text(const std::uint64_t index) const + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + MassQuoteResponse571 &text(const std::uint64_t index, const char value) + { + if (index >= 256) + { + throw std::runtime_error("index out of range for text [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getText(char *const dst, const std::uint64_t length) const + { + if (length > 256) + { + throw std::runtime_error("length too large for getText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + MassQuoteResponse571 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + SBE_NODISCARD std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + std::size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + std::size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuoteResponse571 &putText(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 256) + { + throw std::runtime_error("string too large for putText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (std::size_t start = srcLength; start < 256; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + MassQuoteResponse571 &putText(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 256) + { + throw std::runtime_error("string too large for putText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 256; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 268; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 268 + (index * 1), sizeof(char)); + return (val); + } + + MassQuoteResponse571 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 268 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast(length)); + return length; + } + + MassQuoteResponse571 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + std::size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + std::size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuoteResponse571 &putSenderID(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 268, str.data(), srcLength); + for (std::size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + MassQuoteResponse571 &putSenderID(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 268, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 288; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 288, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuoteResponse571 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 288, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transactTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 296; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 296, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuoteResponse571 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 296, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 304; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 304, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuoteResponse571 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 304, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteReqIDId() SBE_NOEXCEPT + { + return 131; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteReqIDEncodingOffset() SBE_NOEXCEPT + { + return 312; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDNullValue() SBE_NOEXCEPT + { + return UINT64_C(0xffffffffffffffff); + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t quoteReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t quoteReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 312, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuoteResponse571 "eReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 312, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 320; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 320; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 320; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 320 + (index * 1), sizeof(char)); + return (val); + } + + MassQuoteResponse571 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 320 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 320, sizeof(char) * static_cast(length)); + return length; + } + + MassQuoteResponse571 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 320, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 320; + std::size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 320; + std::size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuoteResponse571 &putLocation(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 320, str.data(), srcLength); + for (std::size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 320 + start] = 0; + } + + return *this; + } + #else + MassQuoteResponse571 &putLocation(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 320, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 320 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *QuoteIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteIDId() SBE_NOEXCEPT + { + return 117; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteIDEncodingOffset() SBE_NOEXCEPT + { + return 325; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t quoteIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t quoteID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 325, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + MassQuoteResponse571 "eID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 325, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonId() SBE_NOEXCEPT + { + return 300; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteRejectReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteRejectReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteRejectReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteRejectReasonEncodingOffset() SBE_NOEXCEPT + { + return 329; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } + + static SBE_CONSTEXPR std::size_t quoteRejectReasonEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t quoteRejectReason() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 329, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + MassQuoteResponse571 "eRejectReason(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 329, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteStatusId() SBE_NOEXCEPT + { + return 297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteStatusEncodingOffset() SBE_NOEXCEPT + { + return 331; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t quoteStatusRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 331, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD QuoteAckStatus::Value quoteStatus() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 331, sizeof(std::uint8_t)); + return QuoteAckStatus::get((val)); + } + + MassQuoteResponse571 "eStatus(const QuoteAckStatus::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 331, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 332; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t manualOrderIndicatorRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 332, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 332, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + MassQuoteResponse571 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 332, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *NoProcessedEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t noProcessedEntriesId() SBE_NOEXCEPT + { + return 9772; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noProcessedEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noProcessedEntriesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noProcessedEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t noProcessedEntriesEncodingOffset() SBE_NOEXCEPT + { + return 333; + } + + static SBE_CONSTEXPR std::uint8_t noProcessedEntriesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t noProcessedEntriesMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t noProcessedEntriesMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t noProcessedEntriesEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t noProcessedEntries() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 333, sizeof(std::uint8_t)); + return (val); + } + + MassQuoteResponse571 &noProcessedEntries(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 333, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MMProtectionResetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mMProtectionResetId() SBE_NOEXCEPT + { + return 9773; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mMProtectionResetSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mMProtectionResetInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mMProtectionResetSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mMProtectionResetEncodingOffset() SBE_NOEXCEPT + { + return 334; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mMProtectionResetEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t mMProtectionResetRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 334, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanFlag::Value mMProtectionReset() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 334, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + MassQuoteResponse571 &mMProtectionReset(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 334, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT + { + return 9553; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= splitMsgSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT + { + return 335; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t splitMsgRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 335, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 335, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + MassQuoteResponse571 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 335, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t liquidityFlagId() SBE_NOEXCEPT + { + return 9373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t liquidityFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool liquidityFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= liquidityFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingOffset() SBE_NOEXCEPT + { + return 336; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t liquidityFlagRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 336, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 336, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + MassQuoteResponse571 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 336, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t shortSaleTypeId() SBE_NOEXCEPT + { + return 5409; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t shortSaleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool shortSaleTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= shortSaleTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingOffset() SBE_NOEXCEPT + { + return 337; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t shortSaleTypeRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 337, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 337, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + MassQuoteResponse571 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 337, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *TotNoQuoteEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t totNoQuoteEntriesId() SBE_NOEXCEPT + { + return 304; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNoQuoteEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool totNoQuoteEntriesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= totNoQuoteEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNoQuoteEntriesEncodingOffset() SBE_NOEXCEPT + { + return 338; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t totNoQuoteEntriesEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t totNoQuoteEntries() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 338, sizeof(std::uint8_t)); + return (val); + } + + MassQuoteResponse571 &totNoQuoteEntries(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 338, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool possRetransFlagInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= possRetransFlagSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingOffset() SBE_NOEXCEPT + { + return 339; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t possRetransFlagRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 339, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 339, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + MassQuoteResponse571 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 339, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *DelayToTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t delayToTimeId() SBE_NOEXCEPT + { + return 7552; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayToTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayToTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayToTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayToTimeEncodingOffset() SBE_NOEXCEPT + { + return 340; + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeNullValue() SBE_NOEXCEPT + { + return UINT64_C(0xffffffffffffffff); + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t delayToTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t delayToTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t delayToTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 340, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MassQuoteResponse571 &delayToTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 340, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteEntryOpenMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryOpenId() SBE_NOEXCEPT + { + return 9182; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryOpenSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteEntryOpenInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteEntryOpenSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryOpenEncodingOffset() SBE_NOEXCEPT + { + return 348; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryOpenEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t quoteEntryOpenRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 348, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value quoteEntryOpen() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 348, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + MassQuoteResponse571 "eEntryOpen(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 348, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteEntryControlMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryControlId() SBE_NOEXCEPT + { + return 39034; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryControlSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteEntryControlInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteEntryControlSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryControlEncodingOffset() SBE_NOEXCEPT + { + return 349; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryControlEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t quoteEntryControlRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 349, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value quoteEntryControl() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 349, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + MassQuoteResponse571 "eEntryControl(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 349, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoQuoteEntries + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength(static_cast(20)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 20; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoQuoteEntries &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + template inline void forEach(Func &&func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + + SBE_NODISCARD static const char *OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return UINT64_C(0xffffffffffffffff); + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoQuoteEntries &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryIDId() SBE_NOEXCEPT + { + return 299; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteEntryIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteEntryIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t quoteEntryIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t quoteEntryID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries "eEntryID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteSetIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDId() SBE_NOEXCEPT + { + return 302; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteSetIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteSetIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteSetIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteSetIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } + + static SBE_CONSTEXPR std::size_t quoteSetIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t quoteSetID() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoQuoteEntries "eSetID(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 14; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= sideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t sideRaw() const SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD Side::Value side() const + { + if (m_actingVersion < 9) + { + return Side::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); + return Side::get((val)); + } + + NoQuoteEntries &side(const Side::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteEntryRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryRejectReasonId() SBE_NOEXCEPT + { + return 368; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryRejectReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteEntryRejectReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteEntryRejectReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryRejectReasonEncodingOffset() SBE_NOEXCEPT + { + return 19; + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t quoteEntryRejectReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t quoteEntryRejectReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 19, sizeof(std::uint8_t)); + return (val); + } + + NoQuoteEntries "eEntryRejectReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 19, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoQuoteEntries writer) + { + builder << '{'; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("QuoteEntryID": )"; + builder << +writer.quoteEntryID(); + + builder << ", "; + builder << R"("QuoteSetID": )"; + builder << +writer.quoteSetID(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("QuoteEntryRejectReason": )"; + builder << +writer.quoteEntryRejectReason(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static std::size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoQuoteEntries m_noQuoteEntries; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoQuoteEntriesId() SBE_NOEXCEPT + { + return 295; + } + + SBE_NODISCARD inline NoQuoteEntries &noQuoteEntries() + { + m_noQuoteEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + NoQuoteEntries &noQuoteEntriesCount(const std::uint8_t count) + { + m_noQuoteEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noQuoteEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noQuoteEntriesInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noQuoteEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, MassQuoteResponse571 _writer) +{ + MassQuoteResponse571 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + + builder << '{'; + builder << R"("Name": "MassQuoteResponse571", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("Text": )"; + builder << '"' << + writer.getTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("QuoteReqID": )"; + builder << +writer.quoteReqID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteID": )"; + builder << +writer.quoteID(); + + builder << ", "; + builder << R"("QuoteRejectReason": )"; + builder << +writer.quoteRejectReason(); + + builder << ", "; + builder << R"("QuoteStatus": )"; + builder << '"' << writer.quoteStatus() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("NoProcessedEntries": )"; + builder << +writer.noProcessedEntries(); + + builder << ", "; + builder << R"("MMProtectionReset": )"; + builder << '"' << writer.mMProtectionReset() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << ", "; + builder << R"("TotNoQuoteEntries": )"; + builder << +writer.totNoQuoteEntries(); + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("DelayToTime": )"; + builder << +writer.delayToTime(); + + builder << ", "; + builder << R"("QuoteEntryOpen": )"; + builder << '"' << writer.quoteEntryOpen() << '"'; + + builder << ", "; + builder << R"("QuoteEntryControl": )"; + builder << '"' << writer.quoteEntryControl() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteEntries": [)"; + writer.noQuoteEntries().forEach( + [&](NoQuoteEntries &noQuoteEntries) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteEntries; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + auto &noQuoteEntriesGroup { noQuoteEntries() }; + while (noQuoteEntriesGroup.hasNext()) + { + noQuoteEntriesGroup.next().skip(); + } +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noQuoteEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoQuoteEntries::sbeHeaderSize(); + if (noQuoteEntriesLength > 254LL) + { + throw std::runtime_error("noQuoteEntriesLength outside of allowed range [E110]"); + } + length += noQuoteEntriesLength *NoQuoteEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib_spark/spark/orderman/ilink3/generated/MaturityMonthYear.h b/src/lib_spark/spark/orderman/ilink3/generated/MaturityMonthYear.h index 1b5875d8d..143ccde67 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/MaturityMonthYear.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/MaturityMonthYear.h @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static const char *yearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/MessageHeader.h b/src/lib_spark/spark/orderman/ilink3/generated/MessageHeader.h index 0fa76d344..4daf13b48 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/MessageHeader.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/MessageHeader.h @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static const char *blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/Negotiate500.h b/src/lib_spark/spark/orderman/ilink3/generated/Negotiate500.h index 8f7e3488b..e1513949e 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/Negotiate500.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/Negotiate500.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(76); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(500); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/NegotiationReject502.h b/src/lib_spark/spark/orderman/ilink3/generated/NegotiationReject502.h index 4415f3bfa..07bdf532e 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/NegotiationReject502.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/NegotiationReject502.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -165,10 +167,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(68); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(69); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(502); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -222,7 +224,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(68); + return static_cast(69); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -890,6 +892,82 @@ public: return *this; } + SBE_NODISCARD static const char *EnvironmentIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t environmentIndicatorId() SBE_NOEXCEPT + { + return 39032; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t environmentIndicatorSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool environmentIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= environmentIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t environmentIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 68; + } + + static SBE_CONSTEXPR std::uint8_t environmentIndicatorNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t environmentIndicatorMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t environmentIndicatorMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t environmentIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t environmentIndicator() const SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 68, sizeof(std::uint8_t)); + return (val); + } + + NegotiationReject502 &environmentIndicator(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 68, &val, sizeof(std::uint8_t)); + return *this; + } + template friend std::basic_ostream & operator << ( std::basic_ostream &builder, NegotiationReject502 _writer) @@ -931,6 +1009,10 @@ friend std::basic_ostream & operator << ( builder << R"("SplitMsg": )"; builder << '"' << writer.splitMsg() << '"'; + builder << ", "; + builder << R"("EnvironmentIndicator": )"; + builder << +writer.environmentIndicator(); + builder << '}'; return builder; diff --git a/src/lib_spark/spark/orderman/ilink3/generated/NegotiationResponse501.h b/src/lib_spark/spark/orderman/ilink3/generated/NegotiationResponse501.h index 5d78d93e3..74ef5e9d8 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/NegotiationResponse501.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/NegotiationResponse501.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -165,10 +167,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(32); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(33); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(501); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -222,7 +224,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(32); + return static_cast(33); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -951,6 +953,82 @@ public: return *this; } + SBE_NODISCARD static const char *EnvironmentIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t environmentIndicatorId() SBE_NOEXCEPT + { + return 39032; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t environmentIndicatorSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool environmentIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= environmentIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t environmentIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR std::uint8_t environmentIndicatorNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t environmentIndicatorMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t environmentIndicatorMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t environmentIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t environmentIndicator() const SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint8_t)); + return (val); + } + + NegotiationResponse501 &environmentIndicator(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint8_t)); + return *this; + } + SBE_NODISCARD static const char *CredentialsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { switch (metaAttribute) @@ -1178,6 +1256,10 @@ friend std::basic_ostream & operator << ( builder << R"("PreviousUUID": )"; builder << +writer.previousUUID(); + builder << ", "; + builder << R"("EnvironmentIndicator": )"; + builder << +writer.environmentIndicator(); + builder << ", "; builder << R"("Credentials": )"; builder << '"' << diff --git a/src/lib_spark/spark/orderman/ilink3/generated/NewOrderCross544.h b/src/lib_spark/spark/orderman/ilink3/generated/NewOrderCross544.h index 26f3b9f44..d2ded57f6 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/NewOrderCross544.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/NewOrderCross544.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(74); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(544); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/NewOrderSingle514.h b/src/lib_spark/spark/orderman/ilink3/generated/NewOrderSingle514.h index d59dc3055..3233c0d39 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/NewOrderSingle514.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/NewOrderSingle514.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(132); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(514); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/NotApplied513.h b/src/lib_spark/spark/orderman/ilink3/generated/NotApplied513.h index d03b5de22..6b1cb13cf 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/NotApplied513.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/NotApplied513.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(17); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(513); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/OrderCancelReject535.h b/src/lib_spark/spark/orderman/ilink3/generated/OrderCancelReject535.h index 1f1d6411c..940e2d11d 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/OrderCancelReject535.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/OrderCancelReject535.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(409); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(535); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/OrderCancelReplaceReject536.h b/src/lib_spark/spark/orderman/ilink3/generated/OrderCancelReplaceReject536.h index 0099f7157..9d9bcaec3 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/OrderCancelReplaceReject536.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/OrderCancelReplaceReject536.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(409); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(536); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/OrderCancelReplaceRequest515.h b/src/lib_spark/spark/orderman/ilink3/generated/OrderCancelReplaceRequest515.h index e5b252850..dfecd06d5 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/OrderCancelReplaceRequest515.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/OrderCancelReplaceRequest515.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(133); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(515); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/OrderCancelRequest516.h b/src/lib_spark/spark/orderman/ilink3/generated/OrderCancelRequest516.h index 9d0f356e4..8db9e8a82 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/OrderCancelRequest516.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/OrderCancelRequest516.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(96); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(516); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/OrderMassActionReport562.h b/src/lib_spark/spark/orderman/ilink3/generated/OrderMassActionReport562.h index 1e96482cd..9d55da12e 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/OrderMassActionReport562.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/OrderMassActionReport562.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(130); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(562); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/OrderMassActionRequest529.h b/src/lib_spark/spark/orderman/ilink3/generated/OrderMassActionRequest529.h index d2dd9f737..d0501da0b 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/OrderMassActionRequest529.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/OrderMassActionRequest529.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(79); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(529); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/OrderMassStatusRequest530.h b/src/lib_spark/spark/orderman/ilink3/generated/OrderMassStatusRequest530.h index ce1723e39..af333b637 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/OrderMassStatusRequest530.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/OrderMassStatusRequest530.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(68); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(530); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/OrderStatusRequest533.h b/src/lib_spark/spark/orderman/ilink3/generated/OrderStatusRequest533.h index ce0fa4776..4c4d0a478 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/OrderStatusRequest533.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/OrderStatusRequest533.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(62); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(533); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/PRICE9.h b/src/lib_spark/spark/orderman/ilink3/generated/PRICE9.h index 8793e1ae2..8b6fbcbc1 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/PRICE9.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/PRICE9.h @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/PRICENULL9.h b/src/lib_spark/spark/orderman/ilink3/generated/PRICENULL9.h index c3b21389e..70079b43f 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/PRICENULL9.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/PRICENULL9.h @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/PartyDetailsDefinitionRequest518.h b/src/lib_spark/spark/orderman/ilink3/generated/PartyDetailsDefinitionRequest518.h index 005a90491..d2ab02496 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/PartyDetailsDefinitionRequest518.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/PartyDetailsDefinitionRequest518.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(147); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(518); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/PartyDetailsDefinitionRequestAck519.h b/src/lib_spark/spark/orderman/ilink3/generated/PartyDetailsDefinitionRequestAck519.h index 04ce72a30..4c3949f89 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/PartyDetailsDefinitionRequestAck519.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/PartyDetailsDefinitionRequestAck519.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(159); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(519); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/PartyDetailsListReport538.h b/src/lib_spark/spark/orderman/ilink3/generated/PartyDetailsListReport538.h index 29b21aa36..0f40c7b10 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/PartyDetailsListReport538.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/PartyDetailsListReport538.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(93); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(538); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/PartyDetailsListRequest537.h b/src/lib_spark/spark/orderman/ilink3/generated/PartyDetailsListRequest537.h index 7b27ca5c2..4d5309f97 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/PartyDetailsListRequest537.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/PartyDetailsListRequest537.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(20); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(537); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/QuoteCancel528.h b/src/lib_spark/spark/orderman/ilink3/generated/QuoteCancel528.h index e7acd6559..117e087d4 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/QuoteCancel528.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/QuoteCancel528.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(61); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(528); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/QuoteCancelAck563.h b/src/lib_spark/spark/orderman/ilink3/generated/QuoteCancelAck563.h index 9cb07698e..260c5c954 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/QuoteCancelAck563.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/QuoteCancelAck563.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -165,10 +167,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(368); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(370); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(563); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -222,7 +224,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(368); + return static_cast(370); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -2934,6 +2936,152 @@ public: return *this; } + SBE_NODISCARD static const char *CxlLinkedSessionsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cxlLinkedSessionsId() SBE_NOEXCEPT + { + return 39033; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cxlLinkedSessionsSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool cxlLinkedSessionsInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cxlLinkedSessionsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlLinkedSessionsEncodingOffset() SBE_NOEXCEPT + { + return 368; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlLinkedSessionsEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t cxlLinkedSessionsRaw() const SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 368, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value cxlLinkedSessions() const + { + if (m_actingVersion < 9) + { + return BooleanNULL::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 368, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + QuoteCancelAck563 &cxlLinkedSessions(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 368, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteEntryControlMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryControlId() SBE_NOEXCEPT + { + return 39034; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryControlSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool quoteEntryControlInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteEntryControlSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryControlEncodingOffset() SBE_NOEXCEPT + { + return 369; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryControlEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t quoteEntryControlRaw() const SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 369, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value quoteEntryControl() const + { + if (m_actingVersion < 9) + { + return BooleanNULL::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 369, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + QuoteCancelAck563 "eEntryControl(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 369, &val, sizeof(std::uint8_t)); + return *this; + } + class NoQuoteEntries { private: @@ -3868,6 +4016,14 @@ friend std::basic_ostream & operator << ( builder << R"("QuoteEntryOpen": )"; builder << '"' << writer.quoteEntryOpen() << '"'; + builder << ", "; + builder << R"("CxlLinkedSessions": )"; + builder << '"' << writer.cxlLinkedSessions() << '"'; + + builder << ", "; + builder << R"("QuoteEntryControl": )"; + builder << '"' << writer.quoteEntryControl() << '"'; + builder << ", "; { bool atLeastOne = false; diff --git a/src/lib_spark/spark/orderman/ilink3/generated/QuoteCancelByGroup569.h b/src/lib_spark/spark/orderman/ilink3/generated/QuoteCancelByGroup569.h new file mode 100644 index 000000000..1e28147e0 --- /dev/null +++ b/src/lib_spark/spark/orderman/ilink3/generated/QuoteCancelByGroup569.h @@ -0,0 +1,1835 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_QUOTECANCELBYGROUP569_H_ +#define _ILINKBINARY_QUOTECANCELBYGROUP569_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "Side.h" +#include "OrderStatus.h" +#include "CrossTypeEnum.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class QuoteCancelByGroup569 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(52); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(569); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); + + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + using messageHeader = MessageHeader; + + QuoteCancelByGroup569() = default; + + QuoteCancelByGroup569( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), + m_actingVersion(actingVersion) + { + } + + QuoteCancelByGroup569(char *buffer, const std::uint64_t bufferLength) : + QuoteCancelByGroup569(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + QuoteCancelByGroup569( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + QuoteCancelByGroup569(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(52); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(569); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(8); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } + + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "Z"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + QuoteCancelByGroup569 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = QuoteCancelByGroup569(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + QuoteCancelByGroup569 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = QuoteCancelByGroup569( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + QuoteCancelByGroup569 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = QuoteCancelByGroup569(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + QuoteCancelByGroup569 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + QuoteCancelByGroup569 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + QuoteCancelByGroup569 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + QuoteCancelByGroup569 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t manualOrderIndicatorRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + QuoteCancelByGroup569 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + QuoteCancelByGroup569 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelByGroup569 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelByGroup569 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + std::size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + std::size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelByGroup569 &putSenderID(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 21, str.data(), srcLength); + for (std::size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + QuoteCancelByGroup569 &putSenderID(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 21, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 41; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 41; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 41 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelByGroup569 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 41 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 41, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelByGroup569 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 41, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 41; + std::size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 41; + std::size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelByGroup569 &putLocation(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 41, str.data(), srcLength); + for (std::size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #else + QuoteCancelByGroup569 &putLocation(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 41, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *QuoteIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteIDId() SBE_NOEXCEPT + { + return 117; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteIDEncodingOffset() SBE_NOEXCEPT + { + return 46; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t quoteIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t quoteID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 46, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + QuoteCancelByGroup569 "eID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 46, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteCancelTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteCancelTypeId() SBE_NOEXCEPT + { + return 298; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteCancelTypeSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool quoteCancelTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteCancelTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteCancelTypeEncodingOffset() SBE_NOEXCEPT + { + return 50; + } + + static SBE_CONSTEXPR std::uint8_t quoteCancelTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t quoteCancelTypeMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t quoteCancelTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t quoteCancelTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint8_t quoteCancelType() SBE_NOEXCEPT + { + return static_cast(3); + } + + SBE_NODISCARD static const char *CxlLinkedSessionsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cxlLinkedSessionsId() SBE_NOEXCEPT + { + return 39033; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cxlLinkedSessionsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cxlLinkedSessionsInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cxlLinkedSessionsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlLinkedSessionsEncodingOffset() SBE_NOEXCEPT + { + return 50; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlLinkedSessionsEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t cxlLinkedSessionsRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 50, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value cxlLinkedSessions() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 50, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + QuoteCancelByGroup569 &cxlLinkedSessions(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 50, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteEntryControlMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryControlId() SBE_NOEXCEPT + { + return 39034; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryControlSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteEntryControlInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteEntryControlSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryControlEncodingOffset() SBE_NOEXCEPT + { + return 51; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryControlEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t quoteEntryControlRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 51, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value quoteEntryControl() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 51, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + QuoteCancelByGroup569 "eEntryControl(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 51, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoQuoteEntries + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength(static_cast(6)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 6; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 6; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoQuoteEntries &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + template inline void forEach(Func &&func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + + SBE_NODISCARD static const char *SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT + { + return 1151; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityGroupSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityGroupEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT + { + return 6; + } + + static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT + { + return 6; + } + + SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char securityGroup(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoQuoteEntries &securityGroup(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSecurityGroup(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityGroup [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoQuoteEntries &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 6); + return *this; + } + + SBE_NODISCARD std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + std::size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSecurityGroupAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityGroupAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + std::size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoQuoteEntries &putSecurityGroup(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (std::size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoQuoteEntries &putSecurityGroup(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + template + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoQuoteEntries writer) + { + builder << '{'; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static std::size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoQuoteEntries m_noQuoteEntries; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoQuoteEntriesId() SBE_NOEXCEPT + { + return 295; + } + + SBE_NODISCARD inline NoQuoteEntries &noQuoteEntries() + { + m_noQuoteEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + NoQuoteEntries &noQuoteEntriesCount(const std::uint8_t count) + { + m_noQuoteEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noQuoteEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noQuoteEntriesInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noQuoteEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, QuoteCancelByGroup569 _writer) +{ + QuoteCancelByGroup569 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + + builder << '{'; + builder << R"("Name": "QuoteCancelByGroup569", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteID": )"; + builder << +writer.quoteID(); + + builder << ", "; + builder << R"("CxlLinkedSessions": )"; + builder << '"' << writer.cxlLinkedSessions() << '"'; + + builder << ", "; + builder << R"("QuoteEntryControl": )"; + builder << '"' << writer.quoteEntryControl() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteEntries": [)"; + writer.noQuoteEntries().forEach( + [&](NoQuoteEntries &noQuoteEntries) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteEntries; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + auto &noQuoteEntriesGroup { noQuoteEntries() }; + while (noQuoteEntriesGroup.hasNext()) + { + noQuoteEntriesGroup.next().skip(); + } +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noQuoteEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoQuoteEntries::sbeHeaderSize(); + if (noQuoteEntriesLength > 254LL) + { + throw std::runtime_error("noQuoteEntriesLength outside of allowed range [E110]"); + } + length += noQuoteEntriesLength *NoQuoteEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib_spark/spark/orderman/ilink3/generated/QuoteCancelByInstrument570.h b/src/lib_spark/spark/orderman/ilink3/generated/QuoteCancelByInstrument570.h new file mode 100644 index 000000000..b11ea7e7b --- /dev/null +++ b/src/lib_spark/spark/orderman/ilink3/generated/QuoteCancelByInstrument570.h @@ -0,0 +1,1632 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_QUOTECANCELBYINSTRUMENT570_H_ +#define _ILINKBINARY_QUOTECANCELBYINSTRUMENT570_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "Side.h" +#include "OrderStatus.h" +#include "CrossTypeEnum.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class QuoteCancelByInstrument570 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(51); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(570); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); + + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + using messageHeader = MessageHeader; + + QuoteCancelByInstrument570() = default; + + QuoteCancelByInstrument570( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), + m_actingVersion(actingVersion) + { + } + + QuoteCancelByInstrument570(char *buffer, const std::uint64_t bufferLength) : + QuoteCancelByInstrument570(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + QuoteCancelByInstrument570( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + QuoteCancelByInstrument570(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(51); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(570); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(8); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } + + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "Z"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + QuoteCancelByInstrument570 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = QuoteCancelByInstrument570(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + QuoteCancelByInstrument570 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = QuoteCancelByInstrument570( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + QuoteCancelByInstrument570 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = QuoteCancelByInstrument570(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + QuoteCancelByInstrument570 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + QuoteCancelByInstrument570 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + QuoteCancelByInstrument570 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + QuoteCancelByInstrument570 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t manualOrderIndicatorRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + QuoteCancelByInstrument570 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + QuoteCancelByInstrument570 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelByInstrument570 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelByInstrument570 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + std::size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + std::size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelByInstrument570 &putSenderID(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 21, str.data(), srcLength); + for (std::size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + QuoteCancelByInstrument570 &putSenderID(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 21, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 41; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 41; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 41 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelByInstrument570 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 41 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 41, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelByInstrument570 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 41, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 41; + std::size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 41; + std::size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelByInstrument570 &putLocation(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 41, str.data(), srcLength); + for (std::size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #else + QuoteCancelByInstrument570 &putLocation(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 41, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *QuoteIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteIDId() SBE_NOEXCEPT + { + return 117; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteIDEncodingOffset() SBE_NOEXCEPT + { + return 46; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t quoteIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t quoteID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 46, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + QuoteCancelByInstrument570 "eID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 46, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteCancelTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteCancelTypeId() SBE_NOEXCEPT + { + return 298; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteCancelTypeSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool quoteCancelTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteCancelTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteCancelTypeEncodingOffset() SBE_NOEXCEPT + { + return 50; + } + + static SBE_CONSTEXPR std::uint8_t quoteCancelTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t quoteCancelTypeMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t quoteCancelTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t quoteCancelTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint8_t quoteCancelType() SBE_NOEXCEPT + { + return static_cast(1); + } + + SBE_NODISCARD static const char *CxlLinkedSessionsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cxlLinkedSessionsId() SBE_NOEXCEPT + { + return 39033; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cxlLinkedSessionsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cxlLinkedSessionsInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cxlLinkedSessionsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlLinkedSessionsEncodingOffset() SBE_NOEXCEPT + { + return 50; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlLinkedSessionsEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t cxlLinkedSessionsRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 50, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value cxlLinkedSessions() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 50, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + QuoteCancelByInstrument570 &cxlLinkedSessions(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 50, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoQuoteEntries + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength(static_cast(4)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 4; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoQuoteEntries &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + template inline void forEach(Func &&func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); + return *this; + } + + template + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoQuoteEntries writer) + { + builder << '{'; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static std::size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoQuoteEntries m_noQuoteEntries; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoQuoteEntriesId() SBE_NOEXCEPT + { + return 295; + } + + SBE_NODISCARD inline NoQuoteEntries &noQuoteEntries() + { + m_noQuoteEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + NoQuoteEntries &noQuoteEntriesCount(const std::uint8_t count) + { + m_noQuoteEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteEntries; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noQuoteEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noQuoteEntriesInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noQuoteEntriesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, QuoteCancelByInstrument570 _writer) +{ + QuoteCancelByInstrument570 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + + builder << '{'; + builder << R"("Name": "QuoteCancelByInstrument570", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteID": )"; + builder << +writer.quoteID(); + + builder << ", "; + builder << R"("CxlLinkedSessions": )"; + builder << '"' << writer.cxlLinkedSessions() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteEntries": [)"; + writer.noQuoteEntries().forEach( + [&](NoQuoteEntries &noQuoteEntries) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteEntries; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + auto &noQuoteEntriesGroup { noQuoteEntries() }; + while (noQuoteEntriesGroup.hasNext()) + { + noQuoteEntriesGroup.next().skip(); + } +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noQuoteEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoQuoteEntries::sbeHeaderSize(); + if (noQuoteEntriesLength > 254LL) + { + throw std::runtime_error("noQuoteEntriesLength outside of allowed range [E110]"); + } + length += noQuoteEntriesLength *NoQuoteEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib_spark/spark/orderman/ilink3/generated/QuoteCancelBySet568.h b/src/lib_spark/spark/orderman/ilink3/generated/QuoteCancelBySet568.h new file mode 100644 index 000000000..abc41d3b8 --- /dev/null +++ b/src/lib_spark/spark/orderman/ilink3/generated/QuoteCancelBySet568.h @@ -0,0 +1,1699 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_QUOTECANCELBYSET568_H_ +#define _ILINKBINARY_QUOTECANCELBYSET568_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "Side.h" +#include "OrderStatus.h" +#include "CrossTypeEnum.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class QuoteCancelBySet568 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(52); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(568); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); + + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + using messageHeader = MessageHeader; + + QuoteCancelBySet568() = default; + + QuoteCancelBySet568( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), + m_actingVersion(actingVersion) + { + } + + QuoteCancelBySet568(char *buffer, const std::uint64_t bufferLength) : + QuoteCancelBySet568(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + QuoteCancelBySet568( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + QuoteCancelBySet568(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(52); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(568); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(8); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } + + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "Z"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + QuoteCancelBySet568 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = QuoteCancelBySet568(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + QuoteCancelBySet568 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = QuoteCancelBySet568( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + QuoteCancelBySet568 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = QuoteCancelBySet568(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + QuoteCancelBySet568 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + QuoteCancelBySet568 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + QuoteCancelBySet568 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + QuoteCancelBySet568 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t manualOrderIndicatorRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + QuoteCancelBySet568 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + QuoteCancelBySet568 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelBySet568 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelBySet568 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + std::size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + std::size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelBySet568 &putSenderID(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 21, str.data(), srcLength); + for (std::size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + QuoteCancelBySet568 &putSenderID(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 21, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 41; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 41; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 41 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelBySet568 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 41 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 41, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelBySet568 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 41, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 41; + std::size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 41; + std::size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelBySet568 &putLocation(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 41, str.data(), srcLength); + for (std::size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #else + QuoteCancelBySet568 &putLocation(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 41, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *QuoteIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteIDId() SBE_NOEXCEPT + { + return 117; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteIDEncodingOffset() SBE_NOEXCEPT + { + return 46; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t quoteIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t quoteID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 46, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + QuoteCancelBySet568 "eID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 46, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteCancelTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteCancelTypeId() SBE_NOEXCEPT + { + return 298; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteCancelTypeSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool quoteCancelTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteCancelTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteCancelTypeEncodingOffset() SBE_NOEXCEPT + { + return 50; + } + + static SBE_CONSTEXPR std::uint8_t quoteCancelTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t quoteCancelTypeMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t quoteCancelTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t quoteCancelTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint8_t quoteCancelType() SBE_NOEXCEPT + { + return static_cast(100); + } + + SBE_NODISCARD static const char *CxlLinkedSessionsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cxlLinkedSessionsId() SBE_NOEXCEPT + { + return 39033; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cxlLinkedSessionsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cxlLinkedSessionsInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cxlLinkedSessionsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlLinkedSessionsEncodingOffset() SBE_NOEXCEPT + { + return 50; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlLinkedSessionsEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t cxlLinkedSessionsRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 50, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value cxlLinkedSessions() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 50, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + QuoteCancelBySet568 &cxlLinkedSessions(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 50, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteEntryControlMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryControlId() SBE_NOEXCEPT + { + return 39034; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryControlSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteEntryControlInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteEntryControlSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryControlEncodingOffset() SBE_NOEXCEPT + { + return 51; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryControlEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t quoteEntryControlRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 51, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value quoteEntryControl() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 51, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + QuoteCancelBySet568 "eEntryControl(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 51, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoQuoteSets + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength(static_cast(2)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 2; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoQuoteSets &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + template inline void forEach(Func &&func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + + SBE_NODISCARD static const char *QuoteSetIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDId() SBE_NOEXCEPT + { + return 302; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteSetIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteSetIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteSetIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteSetIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } + + static SBE_CONSTEXPR std::size_t quoteSetIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t quoteSetID() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoQuoteSets "eSetID(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoQuoteSets writer) + { + builder << '{'; + builder << R"("QuoteSetID": )"; + builder << +writer.quoteSetID(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static std::size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoQuoteSets m_noQuoteSets; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoQuoteSetsId() SBE_NOEXCEPT + { + return 296; + } + + SBE_NODISCARD inline NoQuoteSets &noQuoteSets() + { + m_noQuoteSets.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteSets; + } + + NoQuoteSets &noQuoteSetsCount(const std::uint8_t count) + { + m_noQuoteSets.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noQuoteSets; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noQuoteSetsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noQuoteSetsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noQuoteSetsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, QuoteCancelBySet568 _writer) +{ + QuoteCancelBySet568 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + + builder << '{'; + builder << R"("Name": "QuoteCancelBySet568", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteID": )"; + builder << +writer.quoteID(); + + builder << ", "; + builder << R"("CxlLinkedSessions": )"; + builder << '"' << writer.cxlLinkedSessions() << '"'; + + builder << ", "; + builder << R"("QuoteEntryControl": )"; + builder << '"' << writer.quoteEntryControl() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteSets": [)"; + writer.noQuoteSets().forEach( + [&](NoQuoteSets &noQuoteSets) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteSets; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + auto &noQuoteSetsGroup { noQuoteSets() }; + while (noQuoteSetsGroup.hasNext()) + { + noQuoteSetsGroup.next().skip(); + } +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noQuoteSetsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoQuoteSets::sbeHeaderSize(); + if (noQuoteSetsLength > 254LL) + { + throw std::runtime_error("noQuoteSetsLength outside of allowed range [E110]"); + } + length += noQuoteSetsLength *NoQuoteSets::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib_spark/spark/orderman/ilink3/generated/RequestForCross566.h b/src/lib_spark/spark/orderman/ilink3/generated/RequestForCross566.h new file mode 100644 index 000000000..8126df06c --- /dev/null +++ b/src/lib_spark/spark/orderman/ilink3/generated/RequestForCross566.h @@ -0,0 +1,2376 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_REQUESTFORCROSS566_H_ +#define _ILINKBINARY_REQUESTFORCROSS566_H_ + +#if defined(SBE_HAVE_CMATH) +/* cmath needed for std::numeric_limits::quiet_NaN() */ +# include +# define SBE_FLOAT_NAN std::numeric_limits::quiet_NaN() +# define SBE_DOUBLE_NAN std::numeric_limits::quiet_NaN() +#else +/* math.h needed for NAN */ +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# include +# define SBE_NODISCARD [[nodiscard]] +#else +# define SBE_NODISCARD +#endif + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(_WIN32) +# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) +# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) +# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) +# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) +# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) +#else +# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." +#endif + +#if defined(SBE_NO_BOUNDS_CHECK) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) +#elif defined(_MSC_VER) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) +#else +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) +#endif + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + + +#include "MaturityMonthYear.h" +#include "Decimal64NULL.h" +#include "OrderTypeReq.h" +#include "BooleanNULL.h" +#include "AvgPxInd.h" +#include "OrderEventType.h" +#include "CmtaGiveUpCD.h" +#include "PRICENULL9.h" +#include "BooleanFlag.h" +#include "OrderType.h" +#include "QuoteCxlStatus.h" +#include "TimeInForce.h" +#include "PRICE9.h" +#include "MassStatusOrdTyp.h" +#include "ExecInst.h" +#include "Decimal32NULL.h" +#include "SplitMsg.h" +#include "SideReq.h" +#include "MassActionResponse.h" +#include "CustOrderCapacity.h" +#include "SideTimeInForce.h" +#include "SLEDS.h" +#include "ReqResult.h" +#include "ClearingAcctType.h" +#include "KeepAliveLapsed.h" +#include "ExecAckStatus.h" +#include "DATA.h" +#include "OFMOverrideReq.h" +#include "SideNULL.h" +#include "GroupSize.h" +#include "ListUpdAct.h" +#include "FTI.h" +#include "ExecReason.h" +#include "MassStatusReqTyp.h" +#include "DKReason.h" +#include "SecRspTyp.h" +#include "MassActionOrdTyp.h" +#include "QuoteAckStatus.h" +#include "ExpCycle.h" +#include "MassCancelTIF.h" +#include "Side.h" +#include "OrderStatus.h" +#include "CrossTypeEnum.h" +#include "ShortSaleType.h" +#include "PartyDetailRole.h" +#include "MassActionScope.h" +#include "RFQSide.h" +#include "OrdStatusTrdCxl.h" +#include "TradeAddendum.h" +#include "MessageHeader.h" +#include "ManualOrdInd.h" +#include "QuoteCxlTyp.h" +#include "MassCxlReqTyp.h" +#include "ExecTypTrdCxl.h" +#include "ManualOrdIndReq.h" +#include "CustOrdHandlInst.h" +#include "OrdStatusTrd.h" +#include "MassStatusTIF.h" +#include "SMPI.h" +#include "ExecMode.h" +#include "QuoteTyp.h" + +namespace iLinkBinary { + +class RequestForCross566 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; + std::uint64_t m_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(67); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(566); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); + + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + using messageHeader = MessageHeader; + + RequestForCross566() = default; + + RequestForCross566( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), + m_actingVersion(actingVersion) + { + } + + RequestForCross566(char *buffer, const std::uint64_t bufferLength) : + RequestForCross566(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + RequestForCross566( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + RequestForCross566(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(67); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(566); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(8); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } + + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "s"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + RequestForCross566 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = RequestForCross566(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + RequestForCross566 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); + + return *this = RequestForCross566( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + RequestForCross566 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = RequestForCross566(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + RequestForCross566 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } + + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } + + SBE_NODISCARD std::uint64_t decodeLength() const + { + RequestForCross566 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } + + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossIDId() SBE_NOEXCEPT + { + return 548; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t crossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t crossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForCross566 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderRequestIDId() SBE_NOEXCEPT + { + return 2422; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderRequestIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderRequestIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= orderRequestIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderRequestIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t orderRequestIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderRequestID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForCross566 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t manualOrderIndicatorId() SBE_NOEXCEPT + { + return 1028; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t manualOrderIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool manualOrderIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= manualOrderIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t manualOrderIndicatorRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + RequestForCross566 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t seqNumId() SBE_NOEXCEPT + { + return 9726; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t seqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool seqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= seqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t seqNumEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t seqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t seqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + RequestForCross566 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t senderIDId() SBE_NOEXCEPT + { + return 5392; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t senderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool senderIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= senderIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t senderIDEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t senderIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t senderIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *senderID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char senderID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + RequestForCross566 &senderID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for senderID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSenderID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSenderID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + RequestForCross566 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + std::size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSenderIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSenderIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + std::size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + RequestForCross566 &putSenderID(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 21, str.data(), srcLength); + for (std::size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + RequestForCross566 &putSenderID(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 21, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t ordTypeId() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR char ordTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char ordTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char ordTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t ordTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *ordType() const + { + static const std::uint8_t ordTypeValues[] = { 50, 0 }; + + return (const char *)ordTypeValues; + } + + SBE_NODISCARD char ordType(const std::uint64_t index) const + { + static const std::uint8_t ordTypeValues[] = { 50, 0 }; + + return (char)ordTypeValues[index]; + } + + std::uint64_t getOrdType(char *dst, const std::uint64_t length) const + { + static std::uint8_t ordTypeValues[] = { 50 }; + std::uint64_t bytesToCopy = length < sizeof(ordTypeValues) ? length : sizeof(ordTypeValues); + + std::memcpy(dst, ordTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getOrdTypeAsString() const + { + static const std::uint8_t OrdTypeValues[] = { 50 }; + + return std::string((const char *)OrdTypeValues, 1); + } + + std::string getOrdTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrdTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char *CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool crossTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossTypeEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t crossTypeRaw() const SBE_NOEXCEPT + { + if (m_actingVersion < 9) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 41, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD CrossTypeEnum::Value crossType() const + { + if (m_actingVersion < 9) + { + return CrossTypeEnum::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 41, sizeof(std::uint8_t)); + return CrossTypeEnum::get((val)); + } + + RequestForCross566 &crossType(const CrossTypeEnum::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 41, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *CrossPrioritizationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t crossPrioritizationId() SBE_NOEXCEPT + { + return 550; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossPrioritizationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool crossPrioritizationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= crossPrioritizationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t crossPrioritizationEncodingOffset() SBE_NOEXCEPT + { + return 42; + } + + static SBE_CONSTEXPR char crossPrioritizationNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char crossPrioritizationMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char crossPrioritizationMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t crossPrioritizationEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t crossPrioritizationLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *crossPrioritization() const + { + static const std::uint8_t crossPrioritizationValues[] = { 48, 0 }; + + return (const char *)crossPrioritizationValues; + } + + SBE_NODISCARD char crossPrioritization(const std::uint64_t index) const + { + static const std::uint8_t crossPrioritizationValues[] = { 48, 0 }; + + return (char)crossPrioritizationValues[index]; + } + + std::uint64_t getCrossPrioritization(char *dst, const std::uint64_t length) const + { + static std::uint8_t crossPrioritizationValues[] = { 48 }; + std::uint64_t bytesToCopy = length < sizeof(crossPrioritizationValues) ? length : sizeof(crossPrioritizationValues); + + std::memcpy(dst, crossPrioritizationValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getCrossPrioritizationAsString() const + { + static const std::uint8_t CrossPrioritizationValues[] = { 48 }; + + return std::string((const char *)CrossPrioritizationValues, 1); + } + + std::string getCrossPrioritizationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCrossPrioritizationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char *PriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t priceId() SBE_NOEXCEPT + { + return 44; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool priceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceEncodingOffset() SBE_NOEXCEPT + { + return 42; + } + +private: + PRICE9 m_price; + +public: + SBE_NODISCARD PRICE9 &price() + { + m_price.wrap(m_buffer, m_offset + 42, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char *SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sendingTimeEpochId() SBE_NOEXCEPT + { + return 5297; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sendingTimeEpochSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sendingTimeEpochInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sendingTimeEpochSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingOffset() SBE_NOEXCEPT + { + return 50; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t sendingTimeEpochEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t sendingTimeEpoch() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 50, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForCross566 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 50, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t locationId() SBE_NOEXCEPT + { + return 9537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t locationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool locationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= locationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t locationEncodingOffset() SBE_NOEXCEPT + { + return 58; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t locationEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t locationLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *location() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 58; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 58; + } + + SBE_NODISCARD char location(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 58 + (index * 1), sizeof(char)); + return (val); + } + + RequestForCross566 &location(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for location [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 58 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getLocation(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getLocation [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 58, sizeof(char) * static_cast(length)); + return length; + } + + RequestForCross566 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 58, src, sizeof(char) * 5); + return *this; + } + + SBE_NODISCARD std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 58; + std::size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getLocationAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLocationAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 58; + std::size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + RequestForCross566 &putLocation(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 58, str.data(), srcLength); + for (std::size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 58 + start] = 0; + } + + return *this; + } + #else + RequestForCross566 &putLocation(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 58, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 58 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 63; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 63, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + RequestForCross566 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 63, &val, sizeof(std::int32_t)); + return *this; + } + + class NoSides + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength(static_cast(34)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 34; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 34; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoSides &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + template inline void forEach(Func &&func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + + SBE_NODISCARD static const char *ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t clOrdIDId() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clOrdIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= clOrdIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t clOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t clOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *clOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char clOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoSides &clOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for clOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getClOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getClOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoSides &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + std::size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getClOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getClOrdIDAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + std::size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoSides &putClOrdID(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (std::size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoSides &putClOrdID(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReqIDId() SBE_NOEXCEPT + { + return 1505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReqIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailsListReqIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoSides &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderQtyId() SBE_NOEXCEPT + { + return 38; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderQtyEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoSides &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= sideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t sideRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD SideReq::Value side() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + NoSides &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *SideTimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideTimeInForceId() SBE_NOEXCEPT + { + return 962; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideTimeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideTimeInForceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= sideTimeInForceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideTimeInForceEncodingOffset() SBE_NOEXCEPT + { + return 33; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideTimeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t sideTimeInForceRaw() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 33, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD SideTimeInForce::Value sideTimeInForce() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 33, sizeof(std::uint8_t)); + return SideTimeInForce::get((val)); + } + + NoSides &sideTimeInForce(const SideTimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 33, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoSides writer) + { + builder << '{'; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("SideTimeInForce": )"; + builder << '"' << writer.sideTimeInForce() << '"'; + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static std::size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoSides m_noSides; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoSidesId() SBE_NOEXCEPT + { + return 552; + } + + SBE_NODISCARD inline NoSides &noSides() + { + m_noSides.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noSides; + } + + NoSides &noSidesCount(const std::uint8_t count) + { + m_noSides.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noSides; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noSidesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noSidesInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noSidesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, RequestForCross566 _writer) +{ + RequestForCross566 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + + builder << '{'; + builder << R"("Name": "RequestForCross566", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("CrossType": )"; + builder << '"' << writer.crossType() << '"'; + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoSides": [)"; + writer.noSides().forEach( + [&](NoSides &noSides) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noSides; + }); + builder << ']'; + } + + builder << '}'; + + return builder; +} + +void skip() +{ + auto &noSidesGroup { noSides() }; + while (noSidesGroup.hasNext()) + { + noSidesGroup.next().skip(); + } +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noSidesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoSides::sbeHeaderSize(); + if (noSidesLength > 254LL) + { + throw std::runtime_error("noSidesLength outside of allowed range [E110]"); + } + length += noSidesLength *NoSides::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} +}; +} +#endif diff --git a/src/lib_spark/spark/orderman/ilink3/generated/RequestForQuote543.h b/src/lib_spark/spark/orderman/ilink3/generated/RequestForQuote543.h index 4f0f062bf..5f284e2d2 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/RequestForQuote543.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/RequestForQuote543.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(55); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(543); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/RequestForQuoteAck546.h b/src/lib_spark/spark/orderman/ilink3/generated/RequestForQuoteAck546.h index 0d7fa133f..8519a0497 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/RequestForQuoteAck546.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/RequestForQuoteAck546.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(358); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(546); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/Retransmission509.h b/src/lib_spark/spark/orderman/ilink3/generated/Retransmission509.h index aca45553b..6390203ea 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/Retransmission509.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/Retransmission509.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(31); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(509); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/RetransmitReject510.h b/src/lib_spark/spark/orderman/ilink3/generated/RetransmitReject510.h index 177a97d37..dcb569a78 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/RetransmitReject510.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/RetransmitReject510.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(75); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(510); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/RetransmitRequest508.h b/src/lib_spark/spark/orderman/ilink3/generated/RetransmitRequest508.h index 34b5fae83..22aec6b61 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/RetransmitRequest508.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/RetransmitRequest508.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(30); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(508); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/SMPI.h b/src/lib_spark/spark/orderman/ilink3/generated/SMPI.h index 2698520ef..b9606685c 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/SMPI.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/SMPI.h @@ -32,7 +32,7 @@ public: { CancelNewest = static_cast(78), CancelOldest = static_cast(79), - NULL_VALUE = static_cast(0x00) + NULL_VALUE = static_cast(48) }; static SMPI::Value get(const char value) @@ -41,7 +41,7 @@ public: { case static_cast(78): return CancelNewest; case static_cast(79): return CancelOldest; - case static_cast(0x00): return NULL_VALUE; + case static_cast(48): return NULL_VALUE; } throw std::runtime_error("unknown value for enum SMPI [E103]"); diff --git a/src/lib_spark/spark/orderman/ilink3/generated/SecurityDefinitionRequest560.h b/src/lib_spark/spark/orderman/ilink3/generated/SecurityDefinitionRequest560.h index ea72679cf..31641ba5b 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/SecurityDefinitionRequest560.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/SecurityDefinitionRequest560.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(72); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(560); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/SecurityDefinitionResponse561.h b/src/lib_spark/spark/orderman/ilink3/generated/SecurityDefinitionResponse561.h index cd1dd372c..e772bf715 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/SecurityDefinitionResponse561.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/SecurityDefinitionResponse561.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(430); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(561); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/Sequence506.h b/src/lib_spark/spark/orderman/ilink3/generated/Sequence506.h index 3efcd7219..12821bc31 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/Sequence506.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/Sequence506.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(14); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(506); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/Side.h b/src/lib_spark/spark/orderman/ilink3/generated/Side.h new file mode 100644 index 000000000..380b6a374 --- /dev/null +++ b/src/lib_spark/spark/orderman/ilink3/generated/Side.h @@ -0,0 +1,72 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SIDE_H_ +#define _ILINKBINARY_SIDE_H_ + +#if !defined(__STDC_LIMIT_MACROS) +# define __STDC_LIMIT_MACROS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include + +#define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT32 (std::numeric_limits::min)() +#define SBE_NULLVALUE_INT64 (std::numeric_limits::min)() +#define SBE_NULLVALUE_UINT8 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT16 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() +#define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + +namespace iLinkBinary { + +class Side +{ +public: + enum Value + { + Buy = static_cast(1), + Sell = static_cast(2), + NULL_VALUE = static_cast(255) + }; + + static Side::Value get(const std::uint8_t value) + { + switch (value) + { + case static_cast(1): return Buy; + case static_cast(2): return Sell; + case static_cast(255): return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum Side [E103]"); + } + + static const char *c_str(const Side::Value value) + { + switch (value) + { + case Buy: return "Buy"; + case Sell: return "Sell"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum Side [E103]:"); + } + + template + friend std::basic_ostream & operator << ( + std::basic_ostream &os, Side::Value m) + { + return os << Side::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib_spark/spark/orderman/ilink3/generated/Terminate507.h b/src/lib_spark/spark/orderman/ilink3/generated/Terminate507.h index a2ea3b2ff..f83355148 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/Terminate507.h +++ b/src/lib_spark/spark/orderman/ilink3/generated/Terminate507.h @@ -127,7 +127,9 @@ #include "QuoteAckStatus.h" #include "ExpCycle.h" #include "MassCancelTIF.h" +#include "Side.h" #include "OrderStatus.h" +#include "CrossTypeEnum.h" #include "ShortSaleType.h" #include "PartyDetailRole.h" #include "MassActionScope.h" @@ -168,7 +170,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(67); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(507); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); enum MetaAttribute { @@ -242,7 +244,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(8); + return static_cast(9); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT diff --git a/src/lib_spark/spark/orderman/ilink3/generated/ilinkbinary.xml b/src/lib_spark/spark/orderman/ilink3/generated/ilinkbinary.xml index 0f4201335..54537d457 100644 --- a/src/lib_spark/spark/orderman/ilink3/generated/ilinkbinary.xml +++ b/src/lib_spark/spark/orderman/ilink3/generated/ilinkbinary.xml @@ -1,5 +1,5 @@ - + IDEMPOTENT @@ -35,6 +35,9 @@ 8 C E + 3 + 1 + 100 8 1 @@ -52,6 +55,7 @@ + @@ -129,6 +133,11 @@ G S + + 3 + 20 + 21 + C D @@ -341,6 +350,10 @@ 2 3 + + 1 + 2 + 1 2 @@ -395,7 +408,7 @@ - + @@ -404,15 +417,17 @@ + - + + @@ -429,7 +444,7 @@ - + @@ -439,8 +454,9 @@ + - + @@ -448,6 +464,7 @@ + @@ -556,7 +573,7 @@ - + @@ -570,7 +587,7 @@ - + @@ -591,7 +608,7 @@ - + @@ -607,11 +624,11 @@ - - - + + + - + @@ -623,7 +640,7 @@ - + @@ -633,18 +650,18 @@ - + - - - + + + - + @@ -836,16 +853,16 @@ - - + + - - - + + + @@ -855,8 +872,8 @@ - - + + @@ -901,9 +918,9 @@ - + - + @@ -952,21 +969,23 @@ - - + + - + - + - + + + @@ -999,15 +1018,15 @@ - + - + - - + + - + @@ -1018,13 +1037,13 @@ - + - + - - - + + + @@ -1220,14 +1239,14 @@ - - + + - - - + + + @@ -1253,11 +1272,11 @@ - - - + + + - + @@ -1316,7 +1335,7 @@ - + @@ -1332,14 +1351,15 @@ - + - + + @@ -1366,7 +1386,7 @@ - + @@ -1400,13 +1420,15 @@ - - + + + + - + - + @@ -1417,11 +1439,11 @@ - - + + - + @@ -1453,10 +1475,11 @@ + - + - + @@ -1479,7 +1502,7 @@ - + @@ -1504,15 +1527,16 @@ - - + + + - - - + + + - + @@ -1520,6 +1544,8 @@ + + @@ -1621,7 +1647,7 @@ - + @@ -1634,7 +1660,7 @@ - + @@ -1650,7 +1676,7 @@ - + @@ -1660,6 +1686,8 @@ + + @@ -1740,4 +1768,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +