From 4306ac0737639f728396617ef5f35a173ffec763 Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Tue, 24 Dec 2019 12:56:36 -0500 Subject: [PATCH 1/4] Fix build --- src/lib/orderman_v2/actors/gateway/Gateway.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/orderman_v2/actors/gateway/Gateway.cpp b/src/lib/orderman_v2/actors/gateway/Gateway.cpp index bba1ca242..14befb4ef 100644 --- a/src/lib/orderman_v2/actors/gateway/Gateway.cpp +++ b/src/lib/orderman_v2/actors/gateway/Gateway.cpp @@ -544,7 +544,8 @@ void Gateway::on_gw_op(OM_ID, const GW_OrderCancel &cancel) { } const char* Gateway::intern_string(std::string const&str) { - auto [it,there] = me->cold.interned_strings.insert(str); + auto [it,_] = me->cold.interned_strings.insert(str); + (void)_; return it->data(); } From 25866533ea7fed947c96a89804eb0c0596894ef7 Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Tue, 24 Dec 2019 13:09:43 -0500 Subject: [PATCH 2/4] Generated ilink message code --- .../gateway/ilink3/generated/AvgPxInd.h | 141 + .../gateway/ilink3/generated/BooleanFlag.h | 138 + .../gateway/ilink3/generated/BooleanNULL.h | 138 + .../ilink3/generated/BusinessReject521.h | 2021 ++++++ .../ilink3/generated/ClearingAcctType.h | 138 + .../gateway/ilink3/generated/CmtaGiveUpCD.h | 138 + .../ilink3/generated/CustOrdHandlInst.h | 150 + .../ilink3/generated/CustOrderCapacity.h | 144 + .../actors/gateway/ilink3/generated/DATA.h | 343 + .../gateway/ilink3/generated/DKReason.h | 156 + .../gateway/ilink3/generated/Decimal32NULL.h | 361 + .../gateway/ilink3/generated/Decimal64NULL.h | 361 + .../gateway/ilink3/generated/Establish503.h | 2478 +++++++ .../ilink3/generated/EstablishmentAck504.h | 1012 +++ .../ilink3/generated/EstablishmentReject505.h | 992 +++ .../gateway/ilink3/generated/ExecAckStatus.h | 138 + .../gateway/ilink3/generated/ExecInst.h | 515 ++ .../gateway/ilink3/generated/ExecMode.h | 138 + .../gateway/ilink3/generated/ExecReason.h | 159 + .../gateway/ilink3/generated/ExecTypTrdCxl.h | 138 + .../ilink3/generated/ExecutionAck539.h | 1265 ++++ .../generated/ExecutionReportCancel534.h | 3638 ++++++++++ .../generated/ExecutionReportElimination524.h | 3434 ++++++++++ .../generated/ExecutionReportModify531.h | 3653 ++++++++++ .../ilink3/generated/ExecutionReportNew522.h | 3497 ++++++++++ .../generated/ExecutionReportReject523.h | 3789 +++++++++++ .../generated/ExecutionReportStatus532.h | 3880 +++++++++++ .../ExecutionReportTradeAddendumOutright548.h | 4297 ++++++++++++ .../ExecutionReportTradeAddendumSpread549.h | 5304 +++++++++++++++ ...ExecutionReportTradeAddendumSpreadLeg550.h | 3923 +++++++++++ .../ExecutionReportTradeOutright525.h | 5361 +++++++++++++++ .../generated/ExecutionReportTradeSpread526.h | 5852 +++++++++++++++++ .../ExecutionReportTradeSpreadLeg527.h | 4243 ++++++++++++ .../gateway/ilink3/generated/ExpCycle.h | 138 + .../actors/gateway/ilink3/generated/FTI.h | 138 + .../gateway/ilink3/generated/GroupSize.h | 361 + .../ilink3/generated/KeepAliveLapsed.h | 138 + .../gateway/ilink3/generated/ListUpdAct.h | 138 + .../gateway/ilink3/generated/ManualOrdInd.h | 138 + .../ilink3/generated/ManualOrdIndReq.h | 138 + .../ilink3/generated/MassActionOrdTyp.h | 138 + .../ilink3/generated/MassActionResponse.h | 138 + .../ilink3/generated/MassActionScope.h | 147 + .../gateway/ilink3/generated/MassCancelTIF.h | 141 + .../gateway/ilink3/generated/MassCxlReqTyp.h | 138 + .../gateway/ilink3/generated/MassQuote517.h | 2267 +++++++ .../ilink3/generated/MassQuoteAck545.h | 2801 ++++++++ .../ilink3/generated/MassStatusOrdTyp.h | 138 + .../ilink3/generated/MassStatusReqTyp.h | 141 + .../gateway/ilink3/generated/MassStatusTIF.h | 141 + .../ilink3/generated/MaturityMonthYear.h | 507 ++ .../gateway/ilink3/generated/MessageHeader.h | 507 ++ .../gateway/ilink3/generated/Negotiate500.h | 1808 +++++ .../ilink3/generated/NegotiationReject502.h | 914 +++ .../ilink3/generated/NegotiationResponse501.h | 1169 ++++ .../ilink3/generated/NewOrderCross544.h | 2436 +++++++ .../ilink3/generated/NewOrderSingle514.h | 2355 +++++++ .../gateway/ilink3/generated/NotApplied513.h | 637 ++ .../gateway/ilink3/generated/OFMOverrideReq.h | 138 + .../gateway/ilink3/generated/OrdStatusTrd.h | 138 + .../ilink3/generated/OrdStatusTrdCxl.h | 138 + .../ilink3/generated/OrderCancelReject535.h | 2620 ++++++++ .../generated/OrderCancelReplaceReject536.h | 2620 ++++++++ .../generated/OrderCancelReplaceRequest515.h | 2496 +++++++ .../ilink3/generated/OrderCancelRequest516.h | 1639 +++++ .../gateway/ilink3/generated/OrderEventType.h | 138 + .../generated/OrderMassActionReport558.h | 3317 ++++++++++ .../generated/OrderMassActionRequest529.h | 2019 ++++++ .../generated/OrderMassStatusRequest530.h | 1702 +++++ .../gateway/ilink3/generated/OrderStatus.h | 156 + .../ilink3/generated/OrderStatusRequest533.h | 1221 ++++ .../gateway/ilink3/generated/OrderType.h | 144 + .../gateway/ilink3/generated/OrderTypeReq.h | 147 + .../actors/gateway/ilink3/generated/PRICE9.h | 348 + .../gateway/ilink3/generated/PRICENULL9.h | 348 + .../ilink3/generated/PartyDetailRole.h | 147 + .../PartyDetailsDefinitionRequest518.h | 2772 ++++++++ .../PartyDetailsDefinitionRequestAck519.h | 3132 +++++++++ .../generated/PartyDetailsListReport538.h | 2916 ++++++++ .../generated/PartyDetailsListRequest537.h | 1605 +++++ .../gateway/ilink3/generated/QuoteAckStatus.h | 138 + .../gateway/ilink3/generated/QuoteCancel528.h | 2201 +++++++ .../ilink3/generated/QuoteCancelAck547.h | 3240 +++++++++ .../gateway/ilink3/generated/QuoteCxlStatus.h | 147 + .../gateway/ilink3/generated/QuoteCxlTyp.h | 144 + .../gateway/ilink3/generated/QuoteTyp.h | 135 + .../gateway/ilink3/generated/README.txt | 5 + .../actors/gateway/ilink3/generated/RFQSide.h | 141 + .../gateway/ilink3/generated/ReqResult.h | 144 + .../ilink3/generated/RequestForQuote543.h | 1628 +++++ .../ilink3/generated/RequestForQuoteAck546.h | 2077 ++++++ .../ilink3/generated/Retransmission509.h | 793 +++ .../ilink3/generated/RetransmitReject510.h | 929 +++ .../ilink3/generated/RetransmitRequest508.h | 730 ++ .../actors/gateway/ilink3/generated/SLEDS.h | 138 + .../actors/gateway/ilink3/generated/SMPI.h | 138 + .../gateway/ilink3/generated/SecRspTyp.h | 141 + .../generated/SecurityDefinitionRequest560.h | 2455 +++++++ .../generated/SecurityDefinitionResponse561.h | 4563 +++++++++++++ .../gateway/ilink3/generated/Sequence506.h | 622 ++ .../gateway/ilink3/generated/ShortSaleType.h | 144 + .../gateway/ilink3/generated/SideNULL.h | 138 + .../actors/gateway/ilink3/generated/SideReq.h | 138 + .../ilink3/generated/SideTimeInForce.h | 138 + .../gateway/ilink3/generated/SplitMsg.h | 141 + .../gateway/ilink3/generated/Terminate507.h | 851 +++ .../gateway/ilink3/generated/TimeInForce.h | 147 + .../gateway/ilink3/generated/TradeAddendum.h | 144 + .../gateway/ilink3/generated/ilinkbinary.xml | 1564 +++++ 109 files changed, 133462 insertions(+) create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/AvgPxInd.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/BooleanFlag.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/BooleanNULL.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/BusinessReject521.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ClearingAcctType.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/CmtaGiveUpCD.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/CustOrdHandlInst.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/CustOrderCapacity.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/DATA.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/DKReason.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/Decimal32NULL.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/Decimal64NULL.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/Establish503.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/EstablishmentAck504.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/EstablishmentReject505.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecAckStatus.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecInst.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecMode.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecReason.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecTypTrdCxl.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionAck539.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportCancel534.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportElimination524.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportModify531.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportNew522.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportReject523.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportStatus532.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeAddendumOutright548.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeAddendumSpread549.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeAddendumSpreadLeg550.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeOutright525.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeSpread526.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeSpreadLeg527.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ExpCycle.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/FTI.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/GroupSize.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/KeepAliveLapsed.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ListUpdAct.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ManualOrdInd.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ManualOrdIndReq.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/MassActionOrdTyp.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/MassActionResponse.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/MassActionScope.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/MassCancelTIF.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/MassCxlReqTyp.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/MassQuote517.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/MassQuoteAck545.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/MassStatusOrdTyp.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/MassStatusReqTyp.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/MassStatusTIF.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/MaturityMonthYear.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/MessageHeader.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/Negotiate500.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/NegotiationReject502.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/NegotiationResponse501.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/NewOrderCross544.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/NewOrderSingle514.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/NotApplied513.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/OFMOverrideReq.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/OrdStatusTrd.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/OrdStatusTrdCxl.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderCancelReject535.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderCancelReplaceReject536.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderCancelReplaceRequest515.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderCancelRequest516.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderEventType.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderMassActionReport558.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderMassActionRequest529.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderMassStatusRequest530.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderStatus.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderStatusRequest533.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderType.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderTypeReq.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/PRICE9.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/PRICENULL9.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailRole.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailsDefinitionRequest518.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailsDefinitionRequestAck519.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailsListReport538.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailsListRequest537.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteAckStatus.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteCancel528.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteCancelAck547.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteCxlStatus.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteCxlTyp.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteTyp.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/README.txt create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/RFQSide.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ReqResult.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/RequestForQuote543.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/RequestForQuoteAck546.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/Retransmission509.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/RetransmitReject510.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/RetransmitRequest508.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/SLEDS.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/SMPI.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/SecRspTyp.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/SecurityDefinitionRequest560.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/SecurityDefinitionResponse561.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/Sequence506.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ShortSaleType.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/SideNULL.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/SideReq.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/SideTimeInForce.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/SplitMsg.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/Terminate507.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/TimeInForce.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/TradeAddendum.h create mode 100644 src/lib/orderman_v2/actors/gateway/ilink3/generated/ilinkbinary.xml diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/AvgPxInd.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/AvgPxInd.h new file mode 100644 index 000000000..798aee128 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/AvgPxInd.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_AVGPXIND_H_ +#define _ILINKBINARY_AVGPXIND_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class AvgPxInd +{ +public: + enum Value + { + NoAveragePricing = (std::uint8_t)0, + TradeispartofanAveragePriceGroupIdentifiedbytheAvgPxGrpID = (std::uint8_t)1, + TradeispartofaNotionalValueAveragePriceGroup = (std::uint8_t)3, + NULL_VALUE = (std::uint8_t)255 + }; + + static AvgPxInd::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return NoAveragePricing; + case 1: return TradeispartofanAveragePriceGroupIdentifiedbytheAvgPxGrpID; + case 3: return TradeispartofaNotionalValueAveragePriceGroup; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum AvgPxInd [E103]"); + } + + static const char* c_str(const AvgPxInd::Value value) + { + switch (value) + { + case NoAveragePricing: return "NoAveragePricing"; + case TradeispartofanAveragePriceGroupIdentifiedbytheAvgPxGrpID: return "TradeispartofanAveragePriceGroupIdentifiedbytheAvgPxGrpID"; + case TradeispartofaNotionalValueAveragePriceGroup: return "TradeispartofaNotionalValueAveragePriceGroup"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum AvgPxInd [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, AvgPxInd::Value m) + { + return os << AvgPxInd::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/BooleanFlag.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/BooleanFlag.h new file mode 100644 index 000000000..a41f571eb --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/BooleanFlag.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_BOOLEANFLAG_H_ +#define _ILINKBINARY_BOOLEANFLAG_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class BooleanFlag +{ +public: + enum Value + { + False = (std::uint8_t)0, + True = (std::uint8_t)1, + NULL_VALUE = (std::uint8_t)255 + }; + + static BooleanFlag::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return False; + case 1: return True; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum BooleanFlag [E103]"); + } + + static const char* c_str(const BooleanFlag::Value value) + { + switch (value) + { + case False: return "False"; + case True: return "True"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum BooleanFlag [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, BooleanFlag::Value m) + { + return os << BooleanFlag::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/BooleanNULL.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/BooleanNULL.h new file mode 100644 index 000000000..93ff7e959 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/BooleanNULL.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_BOOLEANNULL_H_ +#define _ILINKBINARY_BOOLEANNULL_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class BooleanNULL +{ +public: + enum Value + { + False = (std::uint8_t)0, + True = (std::uint8_t)1, + NULL_VALUE = (std::uint8_t)255 + }; + + static BooleanNULL::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return False; + case 1: return True; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum BooleanNULL [E103]"); + } + + static const char* c_str(const BooleanNULL::Value value) + { + switch (value) + { + case False: return "False"; + case True: return "True"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum BooleanNULL [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, BooleanNULL::Value m) + { + return os << BooleanNULL::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/BusinessReject521.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/BusinessReject521.h new file mode 100644 index 000000000..f28fce607 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/BusinessReject521.h @@ -0,0 +1,2021 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_BUSINESSREJECT521_H_ +#define _ILINKBINARY_BUSINESSREJECT521_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 BusinessReject521 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + BusinessReject521() = default; + + BusinessReject521( + 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_actingVersion(actingVersion) + { + } + + BusinessReject521(char *buffer, const std::uint64_t bufferLength) : + BusinessReject521(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + BusinessReject521( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + BusinessReject521(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)330; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)521; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "j"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + BusinessReject521 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = BusinessReject521(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + BusinessReject521 &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 = BusinessReject521( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + BusinessReject521 &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 = BusinessReject521(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + BusinessReject521 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + BusinessReject521 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + BusinessReject521 &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; + } + + BusinessReject521 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + BusinessReject521 &putText(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 256; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + BusinessReject521 &putText(const std::string& str) + { + const 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 (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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + BusinessReject521 &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; + } + + BusinessReject521 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + BusinessReject521 &putSenderID(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + BusinessReject521 &putSenderID(const std::string& str) + { + const 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 (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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + BusinessReject521 &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 * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 296; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 296, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + BusinessReject521 &sendingTimeEpoch(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 * BusinessRejectRefIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t businessRejectRefIDId() SBE_NOEXCEPT + { + return 379; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t businessRejectRefIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool businessRejectRefIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= businessRejectRefIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t businessRejectRefIDEncodingOffset() SBE_NOEXCEPT + { + return 304; + } + + static SBE_CONSTEXPR std::uint64_t businessRejectRefIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t businessRejectRefIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t businessRejectRefIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t businessRejectRefIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t businessRejectRefID() 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); + } + + BusinessReject521 &businessRejectRefID(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 * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 312; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 312; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 312; + } + + 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 + 312 + (index * 1), sizeof(char)); + return (val); + } + + BusinessReject521 &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 + 312 + (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 + 312, sizeof(char) * static_cast(length)); + return length; + } + + BusinessReject521 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 312, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 312; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 312; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + BusinessReject521 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 312, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 312 + start] = 0; + } + + return *this; + } + #else + BusinessReject521 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 312, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 312 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * RefSeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t refSeqNumId() SBE_NOEXCEPT + { + return 45; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t refSeqNumSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool refSeqNumInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= refSeqNumSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t refSeqNumEncodingOffset() SBE_NOEXCEPT + { + return 317; + } + + static SBE_CONSTEXPR std::uint32_t refSeqNumNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t refSeqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t refSeqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t refSeqNumEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t refSeqNum() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 317, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + BusinessReject521 &refSeqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 317, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * RefTagIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t refTagIDId() SBE_NOEXCEPT + { + return 371; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t refTagIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool refTagIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= refTagIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t refTagIDEncodingOffset() SBE_NOEXCEPT + { + return 321; + } + + static SBE_CONSTEXPR std::uint16_t refTagIDNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t refTagIDMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t refTagIDMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t refTagIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t refTagID() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 321, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + BusinessReject521 &refTagID(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 321, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * BusinessRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t businessRejectReasonId() SBE_NOEXCEPT + { + return 380; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t businessRejectReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool businessRejectReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= businessRejectReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t businessRejectReasonEncodingOffset() SBE_NOEXCEPT + { + return 323; + } + + static SBE_CONSTEXPR std::uint16_t businessRejectReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t businessRejectReasonMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t businessRejectReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t businessRejectReasonEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t businessRejectReason() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 323, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + BusinessReject521 &businessRejectReason(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 323, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * RefMsgTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t refMsgTypeId() SBE_NOEXCEPT + { + return 372; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t refMsgTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool refMsgTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= refMsgTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t refMsgTypeEncodingOffset() SBE_NOEXCEPT + { + return 325; + } + + static SBE_CONSTEXPR char refMsgTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char refMsgTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char refMsgTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t refMsgTypeEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint64_t refMsgTypeLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD const char *refMsgType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 325; + } + + SBE_NODISCARD char *refMsgType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 325; + } + + SBE_NODISCARD char refMsgType(const std::uint64_t index) const + { + if (index >= 2) + { + throw std::runtime_error("index out of range for refMsgType [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 325 + (index * 1), sizeof(char)); + return (val); + } + + BusinessReject521 &refMsgType(const std::uint64_t index, const char value) + { + if (index >= 2) + { + throw std::runtime_error("index out of range for refMsgType [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 325 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getRefMsgType(char *const dst, const std::uint64_t length) const + { + if (length > 2) + { + throw std::runtime_error("length too large for getRefMsgType [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 325, sizeof(char) * static_cast(length)); + return length; + } + + BusinessReject521 &putRefMsgType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 325, src, sizeof(char) * 2); + return *this; + } + + BusinessReject521 &putRefMsgType( + const char value0, + const char value1) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 325, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 326, &val1, sizeof(char)); + + return *this; + } + + std::string getRefMsgTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 325; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getRefMsgTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getRefMsgTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getRefMsgTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 325; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + BusinessReject521 &putRefMsgType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putRefMsgType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 325, str.data(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 325 + start] = 0; + } + + return *this; + } + #else + BusinessReject521 &putRefMsgType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putRefMsgType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 325, str.c_str(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 325 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 327; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 327, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + BusinessReject521 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 327, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 328; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdInd::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 328, sizeof(std::uint8_t)); + return ManualOrdInd::get((val)); + } + + BusinessReject521 &manualOrderIndicator(const ManualOrdInd::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 328, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 329; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 329, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + BusinessReject521 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 329, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, BusinessReject521 _writer) + { + BusinessReject521 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "BusinessReject521", )"; + 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"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("BusinessRejectRefID": )"; + builder << +writer.businessRejectRefID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("RefSeqNum": )"; + builder << +writer.refSeqNum(); + + builder << ", "; + builder << R"("RefTagID": )"; + builder << +writer.refTagID(); + + builder << ", "; + builder << R"("BusinessRejectReason": )"; + builder << +writer.businessRejectReason(); + + builder << ", "; + builder << R"("RefMsgType": )"; + builder << '"' << + writer.getRefMsgTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ClearingAcctType.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ClearingAcctType.h new file mode 100644 index 000000000..fa9e2217f --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ClearingAcctType.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_CLEARINGACCTTYPE_H_ +#define _ILINKBINARY_CLEARINGACCTTYPE_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class ClearingAcctType +{ +public: + enum Value + { + Customer = (std::uint8_t)0, + Firm = (std::uint8_t)1, + NULL_VALUE = (std::uint8_t)255 + }; + + static ClearingAcctType::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return Customer; + case 1: return Firm; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum ClearingAcctType [E103]"); + } + + static const char* c_str(const ClearingAcctType::Value value) + { + switch (value) + { + case Customer: return "Customer"; + case Firm: return "Firm"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ClearingAcctType [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, ClearingAcctType::Value m) + { + return os << ClearingAcctType::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/CmtaGiveUpCD.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/CmtaGiveUpCD.h new file mode 100644 index 000000000..28636a8a7 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/CmtaGiveUpCD.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_CMTAGIVEUPCD_H_ +#define _ILINKBINARY_CMTAGIVEUPCD_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class CmtaGiveUpCD +{ +public: + enum Value + { + GiveUp = (char)71, + SGXoffset = (char)83, + NULL_VALUE = (char)0 + }; + + static CmtaGiveUpCD::Value get(const char value) + { + switch (value) + { + case 71: return GiveUp; + case 83: return SGXoffset; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum CmtaGiveUpCD [E103]"); + } + + static const char* c_str(const CmtaGiveUpCD::Value value) + { + switch (value) + { + case GiveUp: return "GiveUp"; + case SGXoffset: return "SGXoffset"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum CmtaGiveUpCD [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, CmtaGiveUpCD::Value m) + { + return os << CmtaGiveUpCD::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/CustOrdHandlInst.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/CustOrdHandlInst.h new file mode 100644 index 000000000..b6862ef73 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/CustOrdHandlInst.h @@ -0,0 +1,150 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_CUSTORDHANDLINST_H_ +#define _ILINKBINARY_CUSTORDHANDLINST_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class CustOrdHandlInst +{ +public: + enum Value + { + FCMprovidedscreen = (char)67, + Otherprovidedscreen = (char)68, + FCMAPIorFIX = (char)71, + AlgoEngine = (char)72, + DeskElectronic = (char)87, + ClientElectronic = (char)89, + NULL_VALUE = (char)0 + }; + + static CustOrdHandlInst::Value get(const char value) + { + switch (value) + { + case 67: return FCMprovidedscreen; + case 68: return Otherprovidedscreen; + case 71: return FCMAPIorFIX; + case 72: return AlgoEngine; + case 87: return DeskElectronic; + case 89: return ClientElectronic; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum CustOrdHandlInst [E103]"); + } + + static const char* c_str(const CustOrdHandlInst::Value value) + { + switch (value) + { + case FCMprovidedscreen: return "FCMprovidedscreen"; + case Otherprovidedscreen: return "Otherprovidedscreen"; + case FCMAPIorFIX: return "FCMAPIorFIX"; + case AlgoEngine: return "AlgoEngine"; + case DeskElectronic: return "DeskElectronic"; + case ClientElectronic: return "ClientElectronic"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum CustOrdHandlInst [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, CustOrdHandlInst::Value m) + { + return os << CustOrdHandlInst::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/CustOrderCapacity.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/CustOrderCapacity.h new file mode 100644 index 000000000..5d8f3c5be --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/CustOrderCapacity.h @@ -0,0 +1,144 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_CUSTORDERCAPACITY_H_ +#define _ILINKBINARY_CUSTORDERCAPACITY_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class CustOrderCapacity +{ +public: + enum Value + { + Membertradingfortheirownaccount = (std::uint8_t)1, + Clearingfirmtradingforitsproprietaryaccount = (std::uint8_t)2, + Membertradingforanothermember = (std::uint8_t)3, + Allother = (std::uint8_t)4, + NULL_VALUE = (std::uint8_t)255 + }; + + static CustOrderCapacity::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return Membertradingfortheirownaccount; + case 2: return Clearingfirmtradingforitsproprietaryaccount; + case 3: return Membertradingforanothermember; + case 4: return Allother; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum CustOrderCapacity [E103]"); + } + + static const char* c_str(const CustOrderCapacity::Value value) + { + switch (value) + { + case Membertradingfortheirownaccount: return "Membertradingfortheirownaccount"; + case Clearingfirmtradingforitsproprietaryaccount: return "Clearingfirmtradingforitsproprietaryaccount"; + case Membertradingforanothermember: return "Membertradingforanothermember"; + case Allother: return "Allother"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum CustOrderCapacity [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, CustOrderCapacity::Value m) + { + return os << CustOrderCapacity::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/DATA.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/DATA.h new file mode 100644 index 000000000..34b161865 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/DATA.h @@ -0,0 +1,343 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_DATA_H_ +#define _ILINKBINARY_DATA_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class DATA +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + 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; + }; + + DATA() = default; + + DATA( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + -1) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + DATA( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + DATA(buffer, 0, bufferLength, actingVersion) + { + } + + DATA( + char *buffer, + const std::uint64_t bufferLength) : + DATA(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + DATA &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = DATA(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return -1; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + 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 SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static const char * lengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lengthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lengthInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lengthSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lengthEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint16_t lengthNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t lengthMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t lengthMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t lengthEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t length() 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); + } + + DATA &length(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; + } + + SBE_NODISCARD static const char * varDataMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t varDataSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool varDataInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= varDataSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t varDataEncodingOffset() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR char varDataNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char varDataMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char varDataMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t varDataEncodingLength() SBE_NOEXCEPT + { + return -1; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, DATA writer) + { + builder << '{'; + builder << R"("length": )"; + builder << +writer.length(); + + builder << '}'; + + return builder; + } + +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/DKReason.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/DKReason.h new file mode 100644 index 000000000..c18a71f4b --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/DKReason.h @@ -0,0 +1,156 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_DKREASON_H_ +#define _ILINKBINARY_DKREASON_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class DKReason +{ +public: + enum Value + { + UnknownSecurity = (char)65, + WrongSide = (char)66, + QuantityExceedsOrder = (char)67, + NoMatchingOrder = (char)68, + PriceExceedsLimit = (char)69, + CalculationDifference = (char)70, + NoMatchingExecutionReport = (char)71, + Other = (char)90, + NULL_VALUE = (char)0 + }; + + static DKReason::Value get(const char value) + { + switch (value) + { + case 65: return UnknownSecurity; + case 66: return WrongSide; + case 67: return QuantityExceedsOrder; + case 68: return NoMatchingOrder; + case 69: return PriceExceedsLimit; + case 70: return CalculationDifference; + case 71: return NoMatchingExecutionReport; + case 90: return Other; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum DKReason [E103]"); + } + + static const char* c_str(const DKReason::Value value) + { + switch (value) + { + case UnknownSecurity: return "UnknownSecurity"; + case WrongSide: return "WrongSide"; + case QuantityExceedsOrder: return "QuantityExceedsOrder"; + case NoMatchingOrder: return "NoMatchingOrder"; + case PriceExceedsLimit: return "PriceExceedsLimit"; + case CalculationDifference: return "CalculationDifference"; + case NoMatchingExecutionReport: return "NoMatchingExecutionReport"; + case Other: return "Other"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum DKReason [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, DKReason::Value m) + { + return os << DKReason::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/Decimal32NULL.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/Decimal32NULL.h new file mode 100644 index 000000000..d7a7c94a8 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/Decimal32NULL.h @@ -0,0 +1,361 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_DECIMAL32NULL_H_ +#define _ILINKBINARY_DECIMAL32NULL_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class Decimal32NULL +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + 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; + }; + + Decimal32NULL() = default; + + Decimal32NULL( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 5) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + Decimal32NULL( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + Decimal32NULL(buffer, 0, bufferLength, actingVersion) + { + } + + Decimal32NULL( + char *buffer, + const std::uint64_t bufferLength) : + Decimal32NULL(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + Decimal32NULL &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = Decimal32NULL(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + 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 SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static const char * mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mantissaSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mantissaEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int32_t mantissaNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t mantissaMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t mantissaMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t mantissa() 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); + } + + Decimal32NULL &mantissa(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 * exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= exponentSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exponentEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT + { + return (std::int8_t)127; + } + + static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT + { + return (std::int8_t)-127; + } + + static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT + { + return (std::int8_t)127; + } + + static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t exponent() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::int8_t)); + return (val); + } + + Decimal32NULL &exponent(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::int8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, Decimal32NULL writer) + { + builder << '{'; + builder << R"("mantissa": )"; + builder << +writer.mantissa(); + + builder << ", "; + builder << R"("exponent": )"; + builder << +writer.exponent(); + + builder << '}'; + + return builder; + } + +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/Decimal64NULL.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/Decimal64NULL.h new file mode 100644 index 000000000..f1d8054ba --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/Decimal64NULL.h @@ -0,0 +1,361 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_DECIMAL64NULL_H_ +#define _ILINKBINARY_DECIMAL64NULL_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class Decimal64NULL +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + 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; + }; + + Decimal64NULL() = default; + + Decimal64NULL( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 9) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + Decimal64NULL( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + Decimal64NULL(buffer, 0, bufferLength, actingVersion) + { + } + + Decimal64NULL( + char *buffer, + const std::uint64_t bufferLength) : + Decimal64NULL(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + Decimal64NULL &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = Decimal64NULL(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + 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 SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static const char * mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mantissaSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mantissaEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT + { + return 9223372036854775807L; + } + + static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT + { + return -9223372036854775807L; + } + + static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT + { + return 9223372036854775807L; + } + + static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT + { + std::int64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Decimal64NULL &mantissa(const std::int64_t value) SBE_NOEXCEPT + { + std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); + return *this; + } + + SBE_NODISCARD static const char * exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= exponentSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exponentEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT + { + return (std::int8_t)127; + } + + static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT + { + return (std::int8_t)-127; + } + + static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT + { + return (std::int8_t)127; + } + + static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t exponent() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::int8_t)); + return (val); + } + + Decimal64NULL &exponent(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::int8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, Decimal64NULL writer) + { + builder << '{'; + builder << R"("mantissa": )"; + builder << +writer.mantissa(); + + builder << ", "; + builder << R"("exponent": )"; + builder << +writer.exponent(); + + builder << '}'; + + return builder; + } + +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/Establish503.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/Establish503.h new file mode 100644 index 000000000..2c93e9e43 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/Establish503.h @@ -0,0 +1,2478 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ESTABLISH503_H_ +#define _ILINKBINARY_ESTABLISH503_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 Establish503 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + Establish503() = default; + + Establish503( + 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_actingVersion(actingVersion) + { + } + + Establish503(char *buffer, const std::uint64_t bufferLength) : + Establish503(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + Establish503( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + Establish503(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)132; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)503; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "Establish"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + Establish503 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = Establish503(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + Establish503 &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 = Establish503( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + Establish503 &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 = Establish503(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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 * HMACVersionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t hMACVersionId() SBE_NOEXCEPT + { + return 39003; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hMACVersionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hMACVersionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hMACVersionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hMACVersionEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char hMACVersionNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char hMACVersionMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char hMACVersionMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t hMACVersionEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t hMACVersionLength() SBE_NOEXCEPT + { + return 13; + } + + SBE_NODISCARD const char *hMACVersion() const + { + static const std::uint8_t hMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54 }; + + return (const char *)hMACVersionValues; + } + + SBE_NODISCARD char hMACVersion(const std::uint64_t index) const + { + static const std::uint8_t hMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54 }; + + return (char)hMACVersionValues[index]; + } + + std::uint64_t getHMACVersion(char *dst, const std::uint64_t length) const + { + static std::uint8_t hMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54 }; + std::uint64_t bytesToCopy = length < sizeof(hMACVersionValues) ? length : sizeof(hMACVersionValues); + + std::memcpy(dst, hMACVersionValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getHMACVersionAsString() const + { + static const std::uint8_t HMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54 }; + + return std::string((const char *)HMACVersionValues, 13); + } + + std::string getHMACVersionAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getHMACVersionAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * HMACSignatureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t hMACSignatureId() SBE_NOEXCEPT + { + return 39005; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hMACSignatureSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hMACSignatureInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hMACSignatureSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hMACSignatureEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char hMACSignatureNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char hMACSignatureMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char hMACSignatureMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t hMACSignatureEncodingLength() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR std::uint64_t hMACSignatureLength() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD const char *hMACSignature() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *hMACSignature() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char hMACSignature(const std::uint64_t index) const + { + if (index >= 32) + { + throw std::runtime_error("index out of range for hMACSignature [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + Establish503 &hMACSignature(const std::uint64_t index, const char value) + { + if (index >= 32) + { + throw std::runtime_error("index out of range for hMACSignature [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getHMACSignature(char *const dst, const std::uint64_t length) const + { + if (length > 32) + { + throw std::runtime_error("length too large for getHMACSignature [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + Establish503 &putHMACSignature(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 32); + return *this; + } + + std::string getHMACSignatureAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 32 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getHMACSignatureAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getHMACSignatureAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getHMACSignatureAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 32 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Establish503 &putHMACSignature(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 32) + { + throw std::runtime_error("string too large for putHMACSignature [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 32; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + Establish503 &putHMACSignature(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 32) + { + throw std::runtime_error("string too large for putHMACSignature [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 32; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * AccessKeyIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t accessKeyIDId() SBE_NOEXCEPT + { + return 39004; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t accessKeyIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool accessKeyIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= accessKeyIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t accessKeyIDEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR char accessKeyIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char accessKeyIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char accessKeyIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t accessKeyIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t accessKeyIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *accessKeyID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 32; + } + + SBE_NODISCARD char *accessKeyID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 32; + } + + SBE_NODISCARD char accessKeyID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for accessKeyID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 32 + (index * 1), sizeof(char)); + return (val); + } + + Establish503 &accessKeyID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for accessKeyID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 32 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getAccessKeyID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getAccessKeyID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 32, sizeof(char) * static_cast(length)); + return length; + } + + Establish503 &putAccessKeyID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 32, src, sizeof(char) * 20); + return *this; + } + + std::string getAccessKeyIDAsString() const + { + const char *buffer = m_buffer + m_offset + 32; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getAccessKeyIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getAccessKeyIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getAccessKeyIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 32; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Establish503 &putAccessKeyID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putAccessKeyID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 32, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 32 + start] = 0; + } + + return *this; + } + #else + Establish503 &putAccessKeyID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putAccessKeyID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 32, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 32 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * TradingSystemNameMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t tradingSystemNameId() SBE_NOEXCEPT + { + return 1603; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingSystemNameSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradingSystemNameInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradingSystemNameSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingSystemNameEncodingOffset() SBE_NOEXCEPT + { + return 52; + } + + static SBE_CONSTEXPR char tradingSystemNameNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char tradingSystemNameMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char tradingSystemNameMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t tradingSystemNameEncodingLength() SBE_NOEXCEPT + { + return 30; + } + + static SBE_CONSTEXPR std::uint64_t tradingSystemNameLength() SBE_NOEXCEPT + { + return 30; + } + + SBE_NODISCARD const char *tradingSystemName() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char *tradingSystemName() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char tradingSystemName(const std::uint64_t index) const + { + if (index >= 30) + { + throw std::runtime_error("index out of range for tradingSystemName [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 52 + (index * 1), sizeof(char)); + return (val); + } + + Establish503 &tradingSystemName(const std::uint64_t index, const char value) + { + if (index >= 30) + { + throw std::runtime_error("index out of range for tradingSystemName [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 52 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getTradingSystemName(char *const dst, const std::uint64_t length) const + { + if (length > 30) + { + throw std::runtime_error("length too large for getTradingSystemName [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 52, sizeof(char) * static_cast(length)); + return length; + } + + Establish503 &putTradingSystemName(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 30); + return *this; + } + + std::string getTradingSystemNameAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTradingSystemNameAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTradingSystemNameAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getTradingSystemNameAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Establish503 &putTradingSystemName(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 30) + { + throw std::runtime_error("string too large for putTradingSystemName [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 30; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + Establish503 &putTradingSystemName(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 30) + { + throw std::runtime_error("string too large for putTradingSystemName [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 30; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * TradingSystemVersionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t tradingSystemVersionId() SBE_NOEXCEPT + { + return 1604; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingSystemVersionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradingSystemVersionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradingSystemVersionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingSystemVersionEncodingOffset() SBE_NOEXCEPT + { + return 82; + } + + static SBE_CONSTEXPR char tradingSystemVersionNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char tradingSystemVersionMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char tradingSystemVersionMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t tradingSystemVersionEncodingLength() SBE_NOEXCEPT + { + return 10; + } + + static SBE_CONSTEXPR std::uint64_t tradingSystemVersionLength() SBE_NOEXCEPT + { + return 10; + } + + SBE_NODISCARD const char *tradingSystemVersion() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 82; + } + + SBE_NODISCARD char *tradingSystemVersion() SBE_NOEXCEPT + { + return m_buffer + m_offset + 82; + } + + SBE_NODISCARD char tradingSystemVersion(const std::uint64_t index) const + { + if (index >= 10) + { + throw std::runtime_error("index out of range for tradingSystemVersion [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 82 + (index * 1), sizeof(char)); + return (val); + } + + Establish503 &tradingSystemVersion(const std::uint64_t index, const char value) + { + if (index >= 10) + { + throw std::runtime_error("index out of range for tradingSystemVersion [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 82 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getTradingSystemVersion(char *const dst, const std::uint64_t length) const + { + if (length > 10) + { + throw std::runtime_error("length too large for getTradingSystemVersion [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 82, sizeof(char) * static_cast(length)); + return length; + } + + Establish503 &putTradingSystemVersion(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 82, src, sizeof(char) * 10); + return *this; + } + + std::string getTradingSystemVersionAsString() const + { + const char *buffer = m_buffer + m_offset + 82; + size_t length = 0; + + for (; length < 10 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTradingSystemVersionAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTradingSystemVersionAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getTradingSystemVersionAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 82; + size_t length = 0; + + for (; length < 10 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Establish503 &putTradingSystemVersion(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 10) + { + throw std::runtime_error("string too large for putTradingSystemVersion [E106]"); + } + + std::memcpy(m_buffer + m_offset + 82, str.data(), srcLength); + for (size_t start = srcLength; start < 10; ++start) + { + m_buffer[m_offset + 82 + start] = 0; + } + + return *this; + } + #else + Establish503 &putTradingSystemVersion(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 10) + { + throw std::runtime_error("string too large for putTradingSystemVersion [E106]"); + } + + std::memcpy(m_buffer + m_offset + 82, str.c_str(), srcLength); + for (size_t start = srcLength; start < 10; ++start) + { + m_buffer[m_offset + 82 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * TradingSystemVendorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t tradingSystemVendorId() SBE_NOEXCEPT + { + return 1605; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingSystemVendorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradingSystemVendorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradingSystemVendorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingSystemVendorEncodingOffset() SBE_NOEXCEPT + { + return 92; + } + + static SBE_CONSTEXPR char tradingSystemVendorNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char tradingSystemVendorMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char tradingSystemVendorMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t tradingSystemVendorEncodingLength() SBE_NOEXCEPT + { + return 10; + } + + static SBE_CONSTEXPR std::uint64_t tradingSystemVendorLength() SBE_NOEXCEPT + { + return 10; + } + + SBE_NODISCARD const char *tradingSystemVendor() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 92; + } + + SBE_NODISCARD char *tradingSystemVendor() SBE_NOEXCEPT + { + return m_buffer + m_offset + 92; + } + + SBE_NODISCARD char tradingSystemVendor(const std::uint64_t index) const + { + if (index >= 10) + { + throw std::runtime_error("index out of range for tradingSystemVendor [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 92 + (index * 1), sizeof(char)); + return (val); + } + + Establish503 &tradingSystemVendor(const std::uint64_t index, const char value) + { + if (index >= 10) + { + throw std::runtime_error("index out of range for tradingSystemVendor [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 92 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getTradingSystemVendor(char *const dst, const std::uint64_t length) const + { + if (length > 10) + { + throw std::runtime_error("length too large for getTradingSystemVendor [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 92, sizeof(char) * static_cast(length)); + return length; + } + + Establish503 &putTradingSystemVendor(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 92, src, sizeof(char) * 10); + return *this; + } + + std::string getTradingSystemVendorAsString() const + { + const char *buffer = m_buffer + m_offset + 92; + size_t length = 0; + + for (; length < 10 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTradingSystemVendorAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTradingSystemVendorAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getTradingSystemVendorAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 92; + size_t length = 0; + + for (; length < 10 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Establish503 &putTradingSystemVendor(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 10) + { + throw std::runtime_error("string too large for putTradingSystemVendor [E106]"); + } + + std::memcpy(m_buffer + m_offset + 92, str.data(), srcLength); + for (size_t start = srcLength; start < 10; ++start) + { + m_buffer[m_offset + 92 + start] = 0; + } + + return *this; + } + #else + Establish503 &putTradingSystemVendor(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 10) + { + throw std::runtime_error("string too large for putTradingSystemVendor [E106]"); + } + + std::memcpy(m_buffer + m_offset + 92, str.c_str(), srcLength); + for (size_t start = srcLength; start < 10; ++start) + { + m_buffer[m_offset + 92 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 102; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 102, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Establish503 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 102, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 110; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 110, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Establish503 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 110, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * NextSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t nextSeqNoId() SBE_NOEXCEPT + { + return 39013; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t nextSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool nextSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= nextSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t nextSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 118; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t nextSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t nextSeqNo() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 118, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + Establish503 &nextSeqNo(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 118, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SessionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t sessionId() SBE_NOEXCEPT + { + return 39006; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sessionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sessionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sessionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sessionEncodingOffset() SBE_NOEXCEPT + { + return 122; + } + + static SBE_CONSTEXPR char sessionNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char sessionMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char sessionMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t sessionEncodingLength() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sessionLength() SBE_NOEXCEPT + { + return 3; + } + + SBE_NODISCARD const char *session() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 122; + } + + SBE_NODISCARD char *session() SBE_NOEXCEPT + { + return m_buffer + m_offset + 122; + } + + SBE_NODISCARD char session(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for session [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 122 + (index * 1), sizeof(char)); + return (val); + } + + Establish503 &session(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for session [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 122 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSession(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getSession [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 122, sizeof(char) * static_cast(length)); + return length; + } + + Establish503 &putSession(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 122, src, sizeof(char) * 3); + return *this; + } + + Establish503 &putSession( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 122, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 123, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 124, &val2, sizeof(char)); + + return *this; + } + + std::string getSessionAsString() const + { + const char *buffer = m_buffer + m_offset + 122; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSessionAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSessionAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSessionAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 122; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Establish503 &putSession(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putSession [E106]"); + } + + std::memcpy(m_buffer + m_offset + 122, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 122 + start] = 0; + } + + return *this; + } + #else + Establish503 &putSession(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putSession [E106]"); + } + + std::memcpy(m_buffer + m_offset + 122, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 122 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FirmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t firmId() SBE_NOEXCEPT + { + return 39007; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t firmSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool firmInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= firmSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t firmEncodingOffset() SBE_NOEXCEPT + { + return 125; + } + + static SBE_CONSTEXPR char firmNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char firmMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char firmMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t firmEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t firmLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *firm() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 125; + } + + SBE_NODISCARD char *firm() SBE_NOEXCEPT + { + return m_buffer + m_offset + 125; + } + + SBE_NODISCARD char firm(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for firm [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 125 + (index * 1), sizeof(char)); + return (val); + } + + Establish503 &firm(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for firm [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 125 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFirm(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getFirm [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 125, sizeof(char) * static_cast(length)); + return length; + } + + Establish503 &putFirm(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 125, src, sizeof(char) * 5); + return *this; + } + + std::string getFirmAsString() const + { + const char *buffer = m_buffer + m_offset + 125; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFirmAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFirmAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getFirmAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 125; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Establish503 &putFirm(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putFirm [E106]"); + } + + std::memcpy(m_buffer + m_offset + 125, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 125 + start] = 0; + } + + return *this; + } + #else + Establish503 &putFirm(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putFirm [E106]"); + } + + std::memcpy(m_buffer + m_offset + 125, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 125 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * KeepAliveIntervalMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalId() SBE_NOEXCEPT + { + return 39014; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t keepAliveIntervalSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool keepAliveIntervalInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= keepAliveIntervalSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t keepAliveIntervalEncodingOffset() SBE_NOEXCEPT + { + return 130; + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t keepAliveIntervalEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t keepAliveInterval() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 130, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + Establish503 &keepAliveInterval(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 130, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * CredentialsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return "unix"; + case MetaAttribute::TIME_UNIT: return "nanosecond"; + case MetaAttribute::SEMANTIC_TYPE: return "data"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static const char *credentialsCharacterEncoding() SBE_NOEXCEPT + { + return "US-ASCII"; + } + + static SBE_CONSTEXPR std::uint64_t credentialsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + bool credentialsInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= credentialsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + static SBE_CONSTEXPR std::uint16_t credentialsId() SBE_NOEXCEPT + { + return 39008; + } + + static SBE_CONSTEXPR std::uint64_t credentialsHeaderLength() SBE_NOEXCEPT + { + return 2; + } + + std::uint16_t credentialsLength() const + { + std::uint16_t length; + std::memcpy(&length, m_buffer + sbePosition(), sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(length); + } + + std::uint64_t skipCredentials() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + sbePosition(lengthPosition + lengthOfLengthField + dataLength); + return dataLength; + } + + SBE_NODISCARD const char *credentials() + { + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + sbePosition(), sizeof(std::uint16_t)); + const char *fieldPtr = m_buffer + sbePosition() + 2; + sbePosition(sbePosition() + 2 + SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue)); + return fieldPtr; + } + + std::uint64_t getCredentials(char *dst, const std::uint64_t length) + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t bytesToCopy = length < dataLength ? length : dataLength; + std::uint64_t pos = sbePosition(); + sbePosition(pos + dataLength); + std::memcpy(dst, m_buffer + pos, static_cast(bytesToCopy)); + return bytesToCopy; + } + + Establish503 &putCredentials(const char *src, const std::uint16_t length) + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + std::uint16_t lengthFieldValue = SBE_LITTLE_ENDIAN_ENCODE_16(length); + sbePosition(lengthPosition + lengthOfLengthField); + std::memcpy(m_buffer + lengthPosition, &lengthFieldValue, sizeof(std::uint16_t)); + std::uint64_t pos = sbePosition(); + sbePosition(pos + length); + std::memcpy(m_buffer + pos, src, length); + return *this; + } + + std::string getCredentialsAsString() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t pos = sbePosition(); + const std::string result(m_buffer + pos, dataLength); + sbePosition(pos + dataLength); + return result; + } + + std::string getCredentialsAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCredentialsAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getCredentialsAsStringView() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t pos = sbePosition(); + const std::string_view result(m_buffer + pos, dataLength); + sbePosition(pos + dataLength); + return result; + } + #endif + + Establish503 &putCredentials(const std::string& str) + { + if (str.length() > 65534) + { + throw std::runtime_error("std::string too long for length type [E109]"); + } + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + std::uint16_t lengthFieldValue = SBE_LITTLE_ENDIAN_ENCODE_16(static_cast(str.length())); + sbePosition(lengthPosition + lengthOfLengthField); + std::memcpy(m_buffer + lengthPosition, &lengthFieldValue, sizeof(std::uint16_t)); + std::uint64_t pos = sbePosition(); + sbePosition(pos + str.length()); + std::memcpy(m_buffer + pos, str.c_str(), str.length()); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, Establish503 _writer) + { + Establish503 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "Establish503", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("HMACSignature": )"; + builder << '"' << + writer.getHMACSignatureAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("AccessKeyID": )"; + builder << '"' << + writer.getAccessKeyIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("TradingSystemName": )"; + builder << '"' << + writer.getTradingSystemNameAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("TradingSystemVersion": )"; + builder << '"' << + writer.getTradingSystemVersionAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("TradingSystemVendor": )"; + builder << '"' << + writer.getTradingSystemVendorAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("NextSeqNo": )"; + builder << +writer.nextSeqNo(); + + builder << ", "; + builder << R"("Session": )"; + builder << '"' << + writer.getSessionAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Firm": )"; + builder << '"' << + writer.getFirmAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("KeepAliveInterval": )"; + builder << +writer.keepAliveInterval(); + + builder << ", "; + builder << R"("Credentials": )"; + builder << '"' << + writer.getCredentialsAsJsonEscapedString().c_str() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/EstablishmentAck504.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/EstablishmentAck504.h new file mode 100644 index 000000000..d83d1db2c --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/EstablishmentAck504.h @@ -0,0 +1,1012 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ESTABLISHMENTACK504_H_ +#define _ILINKBINARY_ESTABLISHMENTACK504_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 EstablishmentAck504 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + EstablishmentAck504() = default; + + EstablishmentAck504( + 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_actingVersion(actingVersion) + { + } + + EstablishmentAck504(char *buffer, const std::uint64_t bufferLength) : + EstablishmentAck504(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + EstablishmentAck504( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + EstablishmentAck504(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)38; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)504; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "EstablishmentAck"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + EstablishmentAck504 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = EstablishmentAck504(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + EstablishmentAck504 &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 = EstablishmentAck504( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + EstablishmentAck504 &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 = EstablishmentAck504(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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 * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + EstablishmentAck504 &uUID(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 * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() 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); + } + + EstablishmentAck504 &requestTimestamp(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 * NextSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t nextSeqNoId() SBE_NOEXCEPT + { + return 39013; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t nextSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool nextSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= nextSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t nextSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t nextSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t nextSeqNo() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + EstablishmentAck504 &nextSeqNo(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * PreviousSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t previousSeqNoId() SBE_NOEXCEPT + { + return 39021; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t previousSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool previousSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= previousSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t previousSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint32_t previousSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t previousSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t previousSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t previousSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t previousSeqNo() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + EstablishmentAck504 &previousSeqNo(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * PreviousUUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t previousUUIDId() SBE_NOEXCEPT + { + return 39015; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t previousUUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool previousUUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= previousUUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t previousUUIDEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::uint64_t previousUUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t previousUUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t previousUUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t previousUUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t previousUUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + EstablishmentAck504 &previousUUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * KeepAliveIntervalMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalId() SBE_NOEXCEPT + { + return 39014; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t keepAliveIntervalSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool keepAliveIntervalInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= keepAliveIntervalSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t keepAliveIntervalEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t keepAliveIntervalEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t keepAliveInterval() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + EstablishmentAck504 &keepAliveInterval(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * SecretKeySecureIDExpirationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationId() SBE_NOEXCEPT + { + return 39022; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secretKeySecureIDExpirationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secretKeySecureIDExpirationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secretKeySecureIDExpirationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secretKeySecureIDExpirationEncodingOffset() SBE_NOEXCEPT + { + return 34; + } + + static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t secretKeySecureIDExpirationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t secretKeySecureIDExpiration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 34, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + EstablishmentAck504 &secretKeySecureIDExpiration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 34, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t faultToleranceIndicatorId() SBE_NOEXCEPT + { + return 39010; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t faultToleranceIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool faultToleranceIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= faultToleranceIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 36; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD FTI::Value faultToleranceIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 36, sizeof(std::uint8_t)); + return FTI::get((val)); + } + + EstablishmentAck504 &faultToleranceIndicator(const FTI::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 36, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 37, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + EstablishmentAck504 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 37, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, EstablishmentAck504 _writer) + { + EstablishmentAck504 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "EstablishmentAck504", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("NextSeqNo": )"; + builder << +writer.nextSeqNo(); + + builder << ", "; + builder << R"("PreviousSeqNo": )"; + builder << +writer.previousSeqNo(); + + builder << ", "; + builder << R"("PreviousUUID": )"; + builder << +writer.previousUUID(); + + builder << ", "; + builder << R"("KeepAliveInterval": )"; + builder << +writer.keepAliveInterval(); + + builder << ", "; + builder << R"("SecretKeySecureIDExpiration": )"; + builder << +writer.secretKeySecureIDExpiration(); + + builder << ", "; + builder << R"("FaultToleranceIndicator": )"; + builder << '"' << writer.faultToleranceIndicator() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/EstablishmentReject505.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/EstablishmentReject505.h new file mode 100644 index 000000000..f3b6d1c7f --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/EstablishmentReject505.h @@ -0,0 +1,992 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ESTABLISHMENTREJECT505_H_ +#define _ILINKBINARY_ESTABLISHMENTREJECT505_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 EstablishmentReject505 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + EstablishmentReject505() = default; + + EstablishmentReject505( + 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_actingVersion(actingVersion) + { + } + + EstablishmentReject505(char *buffer, const std::uint64_t bufferLength) : + EstablishmentReject505(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + EstablishmentReject505( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + EstablishmentReject505(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)72; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)505; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "EstablishmentReject"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + EstablishmentReject505 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = EstablishmentReject505(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + EstablishmentReject505 &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 = EstablishmentReject505( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + EstablishmentReject505 &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 = EstablishmentReject505(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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 * ReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t reasonId() SBE_NOEXCEPT + { + return 39011; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool reasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reasonEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char reasonNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char reasonMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char reasonMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t reasonEncodingLength() SBE_NOEXCEPT + { + return 48; + } + + static SBE_CONSTEXPR std::uint64_t reasonLength() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD const char *reason() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *reason() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char reason(const std::uint64_t index) const + { + if (index >= 48) + { + throw std::runtime_error("index out of range for reason [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + EstablishmentReject505 &reason(const std::uint64_t index, const char value) + { + if (index >= 48) + { + throw std::runtime_error("index out of range for reason [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getReason(char *const dst, const std::uint64_t length) const + { + if (length > 48) + { + throw std::runtime_error("length too large for getReason [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + EstablishmentReject505 &putReason(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 48); + return *this; + } + + std::string getReasonAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 48 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getReasonAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getReasonAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getReasonAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 48 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + EstablishmentReject505 &putReason(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 48) + { + throw std::runtime_error("string too large for putReason [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 48; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + EstablishmentReject505 &putReason(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 48) + { + throw std::runtime_error("string too large for putReason [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 48; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 48; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 48, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + EstablishmentReject505 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 48, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 56; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 56, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + EstablishmentReject505 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 56, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * NextSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t nextSeqNoId() SBE_NOEXCEPT + { + return 39013; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t nextSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool nextSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= nextSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t nextSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t nextSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t nextSeqNo() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + EstablishmentReject505 &nextSeqNo(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * ErrorCodesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesId() SBE_NOEXCEPT + { + return 39012; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t errorCodesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool errorCodesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= errorCodesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t errorCodesEncodingOffset() SBE_NOEXCEPT + { + return 68; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t errorCodesEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t errorCodes() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 68, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + EstablishmentReject505 &errorCodes(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 68, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t faultToleranceIndicatorId() SBE_NOEXCEPT + { + return 39010; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t faultToleranceIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool faultToleranceIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= faultToleranceIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 70; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD FTI::Value faultToleranceIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 70, sizeof(std::uint8_t)); + return FTI::get((val)); + } + + EstablishmentReject505 &faultToleranceIndicator(const FTI::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 70, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 71; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 71, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + EstablishmentReject505 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 71, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, EstablishmentReject505 _writer) + { + EstablishmentReject505 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "EstablishmentReject505", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("Reason": )"; + builder << '"' << + writer.getReasonAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("NextSeqNo": )"; + builder << +writer.nextSeqNo(); + + builder << ", "; + builder << R"("ErrorCodes": )"; + builder << +writer.errorCodes(); + + builder << ", "; + builder << R"("FaultToleranceIndicator": )"; + builder << '"' << writer.faultToleranceIndicator() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecAckStatus.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecAckStatus.h new file mode 100644 index 000000000..b31a9dd84 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecAckStatus.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECACKSTATUS_H_ +#define _ILINKBINARY_EXECACKSTATUS_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class ExecAckStatus +{ +public: + enum Value + { + Accepted = (std::uint8_t)1, + Rejected = (std::uint8_t)2, + NULL_VALUE = (std::uint8_t)255 + }; + + static ExecAckStatus::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return Accepted; + case 2: return Rejected; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum ExecAckStatus [E103]"); + } + + static const char* c_str(const ExecAckStatus::Value value) + { + switch (value) + { + case Accepted: return "Accepted"; + case Rejected: return "Rejected"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ExecAckStatus [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, ExecAckStatus::Value m) + { + return os << ExecAckStatus::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecInst.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecInst.h new file mode 100644 index 000000000..3e8e8c99f --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecInst.h @@ -0,0 +1,515 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECINST_H_ +#define _ILINKBINARY_EXECINST_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class ExecInst +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + 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; + }; + + ExecInst() = default; + + ExecInst( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 1) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + ExecInst( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + ExecInst(buffer, 0, bufferLength, actingVersion) + { + } + + ExecInst( + char *buffer, + const std::uint64_t bufferLength) : + ExecInst(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + ExecInst &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = ExecInst(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + 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 SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + ExecInst &clear() + { + std::uint8_t zero = 0; + std::memcpy(m_buffer + m_offset, &zero, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD bool isEmpty() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return 0 == val; + } + + SBE_NODISCARD std::uint8_t rawValue() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return val; + } + + ExecInst &rawValue(std::uint8_t value) + { + std::memcpy(m_buffer + m_offset, &value, sizeof(std::uint8_t)); + return *this; + } + + static bool aON(const std::uint8_t bits) + { + return (bits & (1u << 0u)) != 0; + } + + static std::uint8_t aON(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (1u << 0u)) : static_cast(bits & ~(1u << 0u)); + } + + SBE_NODISCARD bool aON() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (1u << 0u)) != 0; + } + + ExecInst &aON(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (1u << 0u)) : static_cast((bits) & ~(1u << 0u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } + + static bool oB(const std::uint8_t bits) + { + return (bits & (1u << 1u)) != 0; + } + + static std::uint8_t oB(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (1u << 1u)) : static_cast(bits & ~(1u << 1u)); + } + + SBE_NODISCARD bool oB() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (1u << 1u)) != 0; + } + + ExecInst &oB(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (1u << 1u)) : static_cast((bits) & ~(1u << 1u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } + + static bool nH(const std::uint8_t bits) + { + return (bits & (1u << 2u)) != 0; + } + + static std::uint8_t nH(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (1u << 2u)) : static_cast(bits & ~(1u << 2u)); + } + + SBE_NODISCARD bool nH() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (1u << 2u)) != 0; + } + + ExecInst &nH(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (1u << 2u)) : static_cast((bits) & ~(1u << 2u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } + + static bool reserved1(const std::uint8_t bits) + { + return (bits & (1u << 3u)) != 0; + } + + static std::uint8_t reserved1(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (1u << 3u)) : static_cast(bits & ~(1u << 3u)); + } + + SBE_NODISCARD bool reserved1() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (1u << 3u)) != 0; + } + + ExecInst &reserved1(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (1u << 3u)) : static_cast((bits) & ~(1u << 3u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } + + static bool reserved2(const std::uint8_t bits) + { + return (bits & (1u << 4u)) != 0; + } + + static std::uint8_t reserved2(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (1u << 4u)) : static_cast(bits & ~(1u << 4u)); + } + + SBE_NODISCARD bool reserved2() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (1u << 4u)) != 0; + } + + ExecInst &reserved2(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (1u << 4u)) : static_cast((bits) & ~(1u << 4u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } + + static bool reserved3(const std::uint8_t bits) + { + return (bits & (1u << 5u)) != 0; + } + + static std::uint8_t reserved3(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (1u << 5u)) : static_cast(bits & ~(1u << 5u)); + } + + SBE_NODISCARD bool reserved3() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (1u << 5u)) != 0; + } + + ExecInst &reserved3(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (1u << 5u)) : static_cast((bits) & ~(1u << 5u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } + + static bool reserved4(const std::uint8_t bits) + { + return (bits & (1u << 6u)) != 0; + } + + static std::uint8_t reserved4(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (1u << 6u)) : static_cast(bits & ~(1u << 6u)); + } + + SBE_NODISCARD bool reserved4() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (1u << 6u)) != 0; + } + + ExecInst &reserved4(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (1u << 6u)) : static_cast((bits) & ~(1u << 6u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } + + static bool reserved5(const std::uint8_t bits) + { + return (bits & (1u << 7u)) != 0; + } + + static std::uint8_t reserved5(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (1u << 7u)) : static_cast(bits & ~(1u << 7u)); + } + + SBE_NODISCARD bool reserved5() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (1u << 7u)) != 0; + } + + ExecInst &reserved5(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (1u << 7u)) : static_cast((bits) & ~(1u << 7u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, ExecInst writer) + { + builder << '['; + bool atLeastOne = false; + if (writer.aON()) + { + builder << R"("aON")"; + atLeastOne = true; + } + if (writer.oB()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("oB")"; + atLeastOne = true; + } + if (writer.nH()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("nH")"; + atLeastOne = true; + } + if (writer.reserved1()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("reserved1")"; + atLeastOne = true; + } + if (writer.reserved2()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("reserved2")"; + atLeastOne = true; + } + if (writer.reserved3()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("reserved3")"; + atLeastOne = true; + } + if (writer.reserved4()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("reserved4")"; + atLeastOne = true; + } + if (writer.reserved5()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("reserved5")"; + } + builder << ']'; + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecMode.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecMode.h new file mode 100644 index 000000000..e2e24a7ea --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecMode.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECMODE_H_ +#define _ILINKBINARY_EXECMODE_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class ExecMode +{ +public: + enum Value + { + Aggressive = (char)65, + Passive = (char)80, + NULL_VALUE = (char)0 + }; + + static ExecMode::Value get(const char value) + { + switch (value) + { + case 65: return Aggressive; + case 80: return Passive; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum ExecMode [E103]"); + } + + static const char* c_str(const ExecMode::Value value) + { + switch (value) + { + case Aggressive: return "Aggressive"; + case Passive: return "Passive"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ExecMode [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, ExecMode::Value m) + { + return os << ExecMode::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecReason.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecReason.h new file mode 100644 index 000000000..4bdccc088 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecReason.h @@ -0,0 +1,159 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECREASON_H_ +#define _ILINKBINARY_EXECREASON_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class ExecReason +{ +public: + enum Value + { + MarketExchangeOption = (std::uint8_t)8, + CancelledNotBest = (std::uint8_t)9, + CancelOnDisconnect = (std::uint8_t)100, + SelfMatchPreventionOldestOrderCancelled = (std::uint8_t)103, + CancelOnGlobexCreditControlsViolation = (std::uint8_t)104, + CancelFromFirmsoft = (std::uint8_t)105, + CancelFromRiskManagementAPI = (std::uint8_t)106, + SelfMatchPreventionNewestOrderCancelled = (std::uint8_t)107, + Cancelduetovolquotedoptionorderrestedqtylessthanminordersize = (std::uint8_t)108, + NULL_VALUE = (std::uint8_t)255 + }; + + static ExecReason::Value get(const std::uint8_t value) + { + switch (value) + { + case 8: return MarketExchangeOption; + case 9: return CancelledNotBest; + case 100: return CancelOnDisconnect; + case 103: return SelfMatchPreventionOldestOrderCancelled; + case 104: return CancelOnGlobexCreditControlsViolation; + case 105: return CancelFromFirmsoft; + case 106: return CancelFromRiskManagementAPI; + case 107: return SelfMatchPreventionNewestOrderCancelled; + case 108: return Cancelduetovolquotedoptionorderrestedqtylessthanminordersize; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum ExecReason [E103]"); + } + + static const char* c_str(const ExecReason::Value value) + { + switch (value) + { + case MarketExchangeOption: return "MarketExchangeOption"; + case CancelledNotBest: return "CancelledNotBest"; + case CancelOnDisconnect: return "CancelOnDisconnect"; + case SelfMatchPreventionOldestOrderCancelled: return "SelfMatchPreventionOldestOrderCancelled"; + case CancelOnGlobexCreditControlsViolation: return "CancelOnGlobexCreditControlsViolation"; + case CancelFromFirmsoft: return "CancelFromFirmsoft"; + case CancelFromRiskManagementAPI: return "CancelFromRiskManagementAPI"; + case SelfMatchPreventionNewestOrderCancelled: return "SelfMatchPreventionNewestOrderCancelled"; + case Cancelduetovolquotedoptionorderrestedqtylessthanminordersize: return "Cancelduetovolquotedoptionorderrestedqtylessthanminordersize"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ExecReason [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, ExecReason::Value m) + { + return os << ExecReason::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecTypTrdCxl.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecTypTrdCxl.h new file mode 100644 index 000000000..0e932dc6f --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecTypTrdCxl.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECTYPTRDCXL_H_ +#define _ILINKBINARY_EXECTYPTRDCXL_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class ExecTypTrdCxl +{ +public: + enum Value + { + TradeCorrection = (char)71, + TradeCancel = (char)72, + NULL_VALUE = (char)0 + }; + + static ExecTypTrdCxl::Value get(const char value) + { + switch (value) + { + case 71: return TradeCorrection; + case 72: return TradeCancel; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum ExecTypTrdCxl [E103]"); + } + + static const char* c_str(const ExecTypTrdCxl::Value value) + { + switch (value) + { + case TradeCorrection: return "TradeCorrection"; + case TradeCancel: return "TradeCancel"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ExecTypTrdCxl [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, ExecTypTrdCxl::Value m) + { + return os << ExecTypTrdCxl::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionAck539.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionAck539.h new file mode 100644 index 000000000..3ad70ad16 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionAck539.h @@ -0,0 +1,1265 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONACK539_H_ +#define _ILINKBINARY_EXECUTIONACK539_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 ExecutionAck539 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + ExecutionAck539() = default; + + ExecutionAck539( + 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_actingVersion(actingVersion) + { + } + + ExecutionAck539(char *buffer, const std::uint64_t bufferLength) : + ExecutionAck539(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionAck539( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionAck539(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)67; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)539; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "BN"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionAck539 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionAck539(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionAck539 &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 = ExecutionAck539( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionAck539 &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 = ExecutionAck539(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + ExecutionAck539 &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 * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 8; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionAck539 &orderID(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 * ExecAckStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execAckStatusId() SBE_NOEXCEPT + { + return 1036; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execAckStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execAckStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execAckStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execAckStatusEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execAckStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecAckStatus::Value execAckStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ExecAckStatus::get((val)); + } + + ExecutionAck539 &execAckStatus(const ExecAckStatus::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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + ExecutionAck539 &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 * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 21; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 21; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + 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 + 21 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionAck539 &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 + 21 + (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 + 21, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionAck539 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionAck539 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 21, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + ExecutionAck539 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 21, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t secExecIDId() SBE_NOEXCEPT + { + return 527; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secExecIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secExecIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secExecIDEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t secExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t secExecID() 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); + } + + ExecutionAck539 &secExecID(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 * LastPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastPxId() SBE_NOEXCEPT + { + return 31; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastPxEncodingOffset() SBE_NOEXCEPT + { + return 49; + } + +private: + PRICE9 m_lastPx; + +public: + SBE_NODISCARD PRICE9 &lastPx() + { + m_lastPx.wrap(m_buffer, m_offset + 49, m_actingVersion, m_bufferLength); + return m_lastPx; + } + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 57; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 57, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionAck539 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 57, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastQtyEncodingOffset() SBE_NOEXCEPT + { + return 61; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t lastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 61, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionAck539 &lastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 61, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DKReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t dKReasonId() SBE_NOEXCEPT + { + return 127; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t dKReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool dKReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= dKReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t dKReasonEncodingOffset() SBE_NOEXCEPT + { + return 65; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t dKReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD DKReason::Value dKReason() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 65, sizeof(char)); + return DKReason::get((val)); + } + + ExecutionAck539 &dKReason(const DKReason::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 65, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 66; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionAck539 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 66, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, ExecutionAck539 _writer) + { + ExecutionAck539 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionAck539", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("ExecAckStatus": )"; + builder << '"' << writer.execAckStatus() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecExecID": )"; + builder << +writer.secExecID(); + + builder << ", "; + builder << R"("LastPx": )"; + builder << writer.lastPx(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("LastQty": )"; + builder << +writer.lastQty(); + + builder << ", "; + builder << R"("DKReason": )"; + builder << '"' << writer.dKReason() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportCancel534.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportCancel534.h new file mode 100644 index 000000000..26202985f --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportCancel534.h @@ -0,0 +1,3638 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTCANCEL534_H_ +#define _ILINKBINARY_EXECUTIONREPORTCANCEL534_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 ExecutionReportCancel534 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + ExecutionReportCancel534() = default; + + ExecutionReportCancel534( + 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_actingVersion(actingVersion) + { + } + + ExecutionReportCancel534(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportCancel534(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportCancel534( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportCancel534(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)206; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)534; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportCancel534 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportCancel534(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportCancel534 &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 = ExecutionReportCancel534( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportCancel534 &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 = ExecutionReportCancel534(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + ExecutionReportCancel534 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + ExecutionReportCancel534 &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 * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportCancel534 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportCancel534 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportCancel534 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportCancel534 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + 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 + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportCancel534 &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 + 52 + (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 + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportCancel534 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportCancel534 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportCancel534 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + 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 + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportCancel534 &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 + 72 + (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 + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportCancel534 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportCancel534 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportCancel534 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportCancel534 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 100; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 100, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportCancel534 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 100, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 108; + } + +private: + PRICE9 m_price; + +public: + SBE_NODISCARD PRICE9 &price() + { + m_price.wrap(m_buffer, m_offset + 108, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 116; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 116, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 124; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 124, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportCancel534 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 132; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportCancel534 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 140; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportCancel534 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 148; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 148, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportCancel534 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 148, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * HostCrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t hostCrossIDId() SBE_NOEXCEPT + { + return 961; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hostCrossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hostCrossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hostCrossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hostCrossIDEncodingOffset() SBE_NOEXCEPT + { + return 156; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t hostCrossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t hostCrossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 156, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportCancel534 &hostCrossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 156, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 164; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 164; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 164; + } + + 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 + 164 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportCancel534 &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 + 164 + (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 + 164, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportCancel534 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 164, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 164; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 164; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportCancel534 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 164, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 164 + start] = 0; + } + + return *this; + } + #else + ExecutionReportCancel534 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 164, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 164 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 169; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 169, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportCancel534 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 169, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 173; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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 + 173, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportCancel534 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 173, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * CumQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cumQtyId() SBE_NOEXCEPT + { + return 14; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cumQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cumQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cumQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cumQtyEncodingOffset() SBE_NOEXCEPT + { + return 177; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t cumQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t cumQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 177, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportCancel534 &cumQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 177, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t minQtyId() SBE_NOEXCEPT + { + return 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= minQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minQtyEncodingOffset() SBE_NOEXCEPT + { + return 181; + } + + static SBE_CONSTEXPR std::uint32_t minQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t minQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t minQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 181, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportCancel534 &minQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 181, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t displayQtyId() SBE_NOEXCEPT + { + return 1138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool displayQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= displayQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayQtyEncodingOffset() SBE_NOEXCEPT + { + return 185; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t displayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t displayQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 185, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportCancel534 &displayQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 185, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 189, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportCancel534 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 189, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 191; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 191, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportCancel534 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 191, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 193; + } + + static SBE_CONSTEXPR char ordStatusNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char ordStatusMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char ordStatusMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *ordStatus() const + { + static const std::uint8_t ordStatusValues[] = { 52 }; + + return (const char *)ordStatusValues; + } + + SBE_NODISCARD char ordStatus(const std::uint64_t index) const + { + static const std::uint8_t ordStatusValues[] = { 52 }; + + return (char)ordStatusValues[index]; + } + + std::uint64_t getOrdStatus(char *dst, const std::uint64_t length) const + { + static std::uint8_t ordStatusValues[] = { 52 }; + std::uint64_t bytesToCopy = length < sizeof(ordStatusValues) ? length : sizeof(ordStatusValues); + + std::memcpy(dst, ordStatusValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getOrdStatusAsString() const + { + static const std::uint8_t OrdStatusValues[] = { 52 }; + + return std::string((const char *)OrdStatusValues, 1); + } + + std::string getOrdStatusAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrdStatusAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 193; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 52 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 52 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 52 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 52 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 193; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportCancel534 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 194; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 194, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportCancel534 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 194, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 195; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 195, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + ExecutionReportCancel534 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 195, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 196; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 196, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportCancel534 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 196, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 197; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 197, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportCancel534 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 197, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 198; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 198, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + ExecutionReportCancel534 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 198, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecRestatementReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execRestatementReasonId() SBE_NOEXCEPT + { + return 378; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execRestatementReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execRestatementReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execRestatementReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execRestatementReasonEncodingOffset() SBE_NOEXCEPT + { + return 199; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execRestatementReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecReason::Value execRestatementReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 199, sizeof(std::uint8_t)); + return ExecReason::get((val)); + } + + ExecutionReportCancel534 &execRestatementReason(const ExecReason::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 199, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + 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 200; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t crossType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 200, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportCancel534 &crossType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 200, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 201; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 201, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 202; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 202, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportCancel534 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 202, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 203; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 203, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportCancel534 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 203, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 204; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 204, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportCancel534 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 204, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 205; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 205, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportCancel534 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 205, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, ExecutionReportCancel534 _writer) + { + ExecutionReportCancel534 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportCancel534", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("HostCrossID": )"; + builder << +writer.hostCrossID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("CumQty": )"; + builder << +writer.cumQty(); + + builder << ", "; + builder << R"("MinQty": )"; + builder << +writer.minQty(); + + builder << ", "; + builder << R"("DisplayQty": )"; + builder << +writer.displayQty(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("ExecRestatementReason": )"; + builder << '"' << writer.execRestatementReason() << '"'; + + builder << ", "; + builder << R"("CrossType": )"; + builder << +writer.crossType(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportElimination524.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportElimination524.h new file mode 100644 index 000000000..98bf14cb9 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportElimination524.h @@ -0,0 +1,3434 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTELIMINATION524_H_ +#define _ILINKBINARY_EXECUTIONREPORTELIMINATION524_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 ExecutionReportElimination524 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + ExecutionReportElimination524() = default; + + ExecutionReportElimination524( + 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_actingVersion(actingVersion) + { + } + + ExecutionReportElimination524(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportElimination524(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportElimination524( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportElimination524(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)202; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)524; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportElimination524 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportElimination524(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportElimination524 &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 = ExecutionReportElimination524( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportElimination524 &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 = ExecutionReportElimination524(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + ExecutionReportElimination524 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + ExecutionReportElimination524 &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 * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportElimination524 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportElimination524 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportElimination524 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportElimination524 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + 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 + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportElimination524 &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 + 52 + (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 + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportElimination524 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportElimination524 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportElimination524 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + 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 + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportElimination524 &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 + 72 + (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 + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportElimination524 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportElimination524 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportElimination524 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportElimination524 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 100; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 100, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportElimination524 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 100, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 108; + } + +private: + PRICE9 m_price; + +public: + SBE_NODISCARD PRICE9 &price() + { + m_price.wrap(m_buffer, m_offset + 108, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 116; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 116, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 124; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 124, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportElimination524 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 132; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportElimination524 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 140; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportElimination524 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 148; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 148, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportElimination524 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 148, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * HostCrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t hostCrossIDId() SBE_NOEXCEPT + { + return 961; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hostCrossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hostCrossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hostCrossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hostCrossIDEncodingOffset() SBE_NOEXCEPT + { + return 156; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t hostCrossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t hostCrossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 156, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportElimination524 &hostCrossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 156, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 164; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 164; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 164; + } + + 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 + 164 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportElimination524 &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 + 164 + (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 + 164, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportElimination524 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 164, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 164; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 164; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportElimination524 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 164, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 164 + start] = 0; + } + + return *this; + } + #else + ExecutionReportElimination524 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 164, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 164 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 169; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 169, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportElimination524 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 169, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * CumQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cumQtyId() SBE_NOEXCEPT + { + return 14; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cumQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cumQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cumQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cumQtyEncodingOffset() SBE_NOEXCEPT + { + return 173; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t cumQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t cumQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 173, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportElimination524 &cumQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 173, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 177; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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 + 177, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportElimination524 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 177, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t minQtyId() SBE_NOEXCEPT + { + return 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= minQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minQtyEncodingOffset() SBE_NOEXCEPT + { + return 181; + } + + static SBE_CONSTEXPR std::uint32_t minQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t minQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t minQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 181, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportElimination524 &minQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 181, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t displayQtyId() SBE_NOEXCEPT + { + return 1138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool displayQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= displayQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayQtyEncodingOffset() SBE_NOEXCEPT + { + return 185; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t displayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t displayQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 185, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportElimination524 &displayQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 185, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR char ordStatusNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char ordStatusMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char ordStatusMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *ordStatus() const + { + static const std::uint8_t ordStatusValues[] = { 67 }; + + return (const char *)ordStatusValues; + } + + SBE_NODISCARD char ordStatus(const std::uint64_t index) const + { + static const std::uint8_t ordStatusValues[] = { 67 }; + + return (char)ordStatusValues[index]; + } + + std::uint64_t getOrdStatus(char *dst, const std::uint64_t length) const + { + static std::uint8_t ordStatusValues[] = { 67 }; + std::uint64_t bytesToCopy = length < sizeof(ordStatusValues) ? length : sizeof(ordStatusValues); + + std::memcpy(dst, ordStatusValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getOrdStatusAsString() const + { + static const std::uint8_t OrdStatusValues[] = { 67 }; + + return std::string((const char *)OrdStatusValues, 1); + } + + std::string getOrdStatusAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrdStatusAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 67 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 67 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 67 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 67 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 189, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportElimination524 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 189, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 191; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 191, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportElimination524 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 191, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 192; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 192, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportElimination524 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 192, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 193; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + ExecutionReportElimination524 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 194; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 194, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportElimination524 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 194, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 195; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 195, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportElimination524 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 195, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + 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 196; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t crossType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 196, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportElimination524 &crossType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 196, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 197; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 197, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 198; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 198, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportElimination524 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 198, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 199; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 199, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportElimination524 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 199, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 200; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 200, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportElimination524 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 200, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 201; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 201, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportElimination524 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 201, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, ExecutionReportElimination524 _writer) + { + ExecutionReportElimination524 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportElimination524", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("HostCrossID": )"; + builder << +writer.hostCrossID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("CumQty": )"; + builder << +writer.cumQty(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("MinQty": )"; + builder << +writer.minQty(); + + builder << ", "; + builder << R"("DisplayQty": )"; + builder << +writer.displayQty(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("CrossType": )"; + builder << +writer.crossType(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportModify531.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportModify531.h new file mode 100644 index 000000000..1b6bb4901 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportModify531.h @@ -0,0 +1,3653 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTMODIFY531_H_ +#define _ILINKBINARY_EXECUTIONREPORTMODIFY531_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 ExecutionReportModify531 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + ExecutionReportModify531() = default; + + ExecutionReportModify531( + 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_actingVersion(actingVersion) + { + } + + ExecutionReportModify531(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportModify531(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportModify531( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportModify531(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)209; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)531; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportModify531 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportModify531(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportModify531 &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 = ExecutionReportModify531( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportModify531 &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 = ExecutionReportModify531(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + ExecutionReportModify531 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + ExecutionReportModify531 &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 * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportModify531 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportModify531 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportModify531 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportModify531 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + 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 + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportModify531 &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 + 52 + (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 + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportModify531 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportModify531 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportModify531 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + 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 + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportModify531 &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 + 72 + (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 + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportModify531 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportModify531 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportModify531 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportModify531 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 100; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 100, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportModify531 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 100, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 108; + } + +private: + PRICE9 m_price; + +public: + SBE_NODISCARD PRICE9 &price() + { + m_price.wrap(m_buffer, m_offset + 108, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 116; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 116, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 124; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 124, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportModify531 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 132; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportModify531 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 140; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportModify531 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 148; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 148, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportModify531 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 148, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * HostCrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t hostCrossIDId() SBE_NOEXCEPT + { + return 961; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hostCrossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hostCrossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hostCrossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hostCrossIDEncodingOffset() SBE_NOEXCEPT + { + return 156; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t hostCrossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t hostCrossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 156, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportModify531 &hostCrossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 156, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 164; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 164; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 164; + } + + 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 + 164 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportModify531 &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 + 164 + (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 + 164, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportModify531 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 164, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 164; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 164; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportModify531 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 164, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 164 + start] = 0; + } + + return *this; + } + #else + ExecutionReportModify531 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 164, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 164 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 169; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 169, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportModify531 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 169, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 173; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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 + 173, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportModify531 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 173, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * CumQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cumQtyId() SBE_NOEXCEPT + { + return 14; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cumQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cumQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cumQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cumQtyEncodingOffset() SBE_NOEXCEPT + { + return 177; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t cumQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t cumQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 177, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportModify531 &cumQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 177, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LeavesQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t leavesQtyId() SBE_NOEXCEPT + { + return 151; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t leavesQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool leavesQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= leavesQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t leavesQtyEncodingOffset() SBE_NOEXCEPT + { + return 181; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t leavesQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t leavesQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 181, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportModify531 &leavesQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 181, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t minQtyId() SBE_NOEXCEPT + { + return 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= minQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minQtyEncodingOffset() SBE_NOEXCEPT + { + return 185; + } + + static SBE_CONSTEXPR std::uint32_t minQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t minQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t minQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 185, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportModify531 &minQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 185, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t displayQtyId() SBE_NOEXCEPT + { + return 1138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool displayQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= displayQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayQtyEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t displayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t displayQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 189, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportModify531 &displayQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 189, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 193; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportModify531 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 195; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 195, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportModify531 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 195, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 197; + } + + static SBE_CONSTEXPR char ordStatusNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char ordStatusMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char ordStatusMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *ordStatus() const + { + static const std::uint8_t ordStatusValues[] = { 53 }; + + return (const char *)ordStatusValues; + } + + SBE_NODISCARD char ordStatus(const std::uint64_t index) const + { + static const std::uint8_t ordStatusValues[] = { 53 }; + + return (char)ordStatusValues[index]; + } + + std::uint64_t getOrdStatus(char *dst, const std::uint64_t length) const + { + static std::uint8_t ordStatusValues[] = { 53 }; + std::uint64_t bytesToCopy = length < sizeof(ordStatusValues) ? length : sizeof(ordStatusValues); + + std::memcpy(dst, ordStatusValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getOrdStatusAsString() const + { + static const std::uint8_t OrdStatusValues[] = { 53 }; + + return std::string((const char *)OrdStatusValues, 1); + } + + std::string getOrdStatusAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrdStatusAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 197; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 53 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 53 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 53 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 53 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 197; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 197, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportModify531 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 197, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 198; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 198, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportModify531 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 198, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 199; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 199, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + ExecutionReportModify531 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 199, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 200; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 200, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportModify531 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 200, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 201; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 201, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportModify531 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 201, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 202; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 202, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + ExecutionReportModify531 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 202, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + 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 203; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t crossType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 203, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportModify531 &crossType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 203, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 204; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 204, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 205; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 205, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportModify531 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 205, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 206; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 206, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportModify531 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 206, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 207; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 207, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportModify531 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 207, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 208; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 208, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportModify531 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 208, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, ExecutionReportModify531 _writer) + { + ExecutionReportModify531 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportModify531", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("HostCrossID": )"; + builder << +writer.hostCrossID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("CumQty": )"; + builder << +writer.cumQty(); + + builder << ", "; + builder << R"("LeavesQty": )"; + builder << +writer.leavesQty(); + + builder << ", "; + builder << R"("MinQty": )"; + builder << +writer.minQty(); + + builder << ", "; + builder << R"("DisplayQty": )"; + builder << +writer.displayQty(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("CrossType": )"; + builder << +writer.crossType(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportNew522.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportNew522.h new file mode 100644 index 000000000..5212a2597 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportNew522.h @@ -0,0 +1,3497 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTNEW522_H_ +#define _ILINKBINARY_EXECUTIONREPORTNEW522_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 ExecutionReportNew522 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + ExecutionReportNew522() = default; + + ExecutionReportNew522( + 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_actingVersion(actingVersion) + { + } + + ExecutionReportNew522(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportNew522(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportNew522( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportNew522(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)201; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)522; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportNew522 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportNew522(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportNew522 &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 = ExecutionReportNew522( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportNew522 &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 = ExecutionReportNew522(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + ExecutionReportNew522 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + ExecutionReportNew522 &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 * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportNew522 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportNew522 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportNew522 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportNew522 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + 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 + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportNew522 &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 + 52 + (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 + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportNew522 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportNew522 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportNew522 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + 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 + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportNew522 &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 + 72 + (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 + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportNew522 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportNew522 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportNew522 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportNew522 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 100; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 100, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportNew522 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 100, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 108; + } + +private: + PRICE9 m_price; + +public: + SBE_NODISCARD PRICE9 &price() + { + m_price.wrap(m_buffer, m_offset + 108, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 116; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 116, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 124; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 124, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportNew522 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 132; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportNew522 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 140; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportNew522 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 148; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 148, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportNew522 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 148, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * HostCrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t hostCrossIDId() SBE_NOEXCEPT + { + return 961; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hostCrossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hostCrossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hostCrossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hostCrossIDEncodingOffset() SBE_NOEXCEPT + { + return 156; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t hostCrossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t hostCrossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 156, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportNew522 &hostCrossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 156, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 164; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 164; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 164; + } + + 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 + 164 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportNew522 &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 + 164 + (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 + 164, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportNew522 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 164, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 164; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 164; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportNew522 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 164, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 164 + start] = 0; + } + + return *this; + } + #else + ExecutionReportNew522 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 164, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 164 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 169; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 169, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportNew522 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 169, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 173; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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 + 173, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportNew522 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 173, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t minQtyId() SBE_NOEXCEPT + { + return 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= minQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minQtyEncodingOffset() SBE_NOEXCEPT + { + return 177; + } + + static SBE_CONSTEXPR std::uint32_t minQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t minQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t minQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 177, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportNew522 &minQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 177, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t displayQtyId() SBE_NOEXCEPT + { + return 1138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool displayQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= displayQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayQtyEncodingOffset() SBE_NOEXCEPT + { + return 181; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t displayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t displayQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 181, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportNew522 &displayQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 181, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 185; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 185, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportNew522 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 185, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 187; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 187, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportNew522 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 187, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR char ordStatusNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char ordStatusMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char ordStatusMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *ordStatus() const + { + static const std::uint8_t ordStatusValues[] = { 48 }; + + return (const char *)ordStatusValues; + } + + SBE_NODISCARD char ordStatus(const std::uint64_t index) const + { + static const std::uint8_t ordStatusValues[] = { 48 }; + + return (char)ordStatusValues[index]; + } + + std::uint64_t getOrdStatus(char *dst, const std::uint64_t length) const + { + static std::uint8_t ordStatusValues[] = { 48 }; + std::uint64_t bytesToCopy = length < sizeof(ordStatusValues) ? length : sizeof(ordStatusValues); + + std::memcpy(dst, ordStatusValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getOrdStatusAsString() const + { + static const std::uint8_t OrdStatusValues[] = { 48 }; + + return std::string((const char *)OrdStatusValues, 1); + } + + std::string getOrdStatusAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrdStatusAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 48 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 48 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 48 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 48 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 189; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 189, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportNew522 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 189, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 190; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 190, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportNew522 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 190, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 191; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 191, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + ExecutionReportNew522 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 191, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 192; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 192, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportNew522 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 192, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 193; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportNew522 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 194; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 194, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + ExecutionReportNew522 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 194, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + 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 195; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t crossType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 195, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportNew522 &crossType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 195, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 196; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 196, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 197; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 197, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportNew522 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 197, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 198; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 198, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportNew522 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 198, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 199; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 199, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportNew522 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 199, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 200; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 200, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportNew522 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 200, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, ExecutionReportNew522 _writer) + { + ExecutionReportNew522 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportNew522", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("HostCrossID": )"; + builder << +writer.hostCrossID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("MinQty": )"; + builder << +writer.minQty(); + + builder << ", "; + builder << R"("DisplayQty": )"; + builder << +writer.displayQty(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("CrossType": )"; + builder << +writer.crossType(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportReject523.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportReject523.h new file mode 100644 index 000000000..dc3179d84 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportReject523.h @@ -0,0 +1,3789 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTREJECT523_H_ +#define _ILINKBINARY_EXECUTIONREPORTREJECT523_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 ExecutionReportReject523 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + ExecutionReportReject523() = default; + + ExecutionReportReject523( + 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_actingVersion(actingVersion) + { + } + + ExecutionReportReject523(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportReject523(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportReject523( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportReject523(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)459; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)523; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportReject523 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportReject523(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportReject523 &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 = ExecutionReportReject523( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportReject523 &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 = ExecutionReportReject523(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + ExecutionReportReject523 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + ExecutionReportReject523 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + ExecutionReportReject523 &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; + } + + ExecutionReportReject523 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportReject523 &putText(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 256; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportReject523 &putText(const std::string& str) + { + const 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 (size_t start = srcLength; start < 256; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 268; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 268 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportReject523 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 268 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportReject523 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 40); + return *this; + } + + std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportReject523 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 268, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + ExecutionReportReject523 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 268, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 308; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 308; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 308; + } + + 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 + 308 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportReject523 &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 + 308 + (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 + 308, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportReject523 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 308, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 308; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 308; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportReject523 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 308, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 308 + start] = 0; + } + + return *this; + } + #else + ExecutionReportReject523 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 308, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 308 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 328; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 328; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 328; + } + + 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 + 328 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportReject523 &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 + 328 + (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 + 328, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportReject523 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 328, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 328; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 328; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportReject523 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 328, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 328 + start] = 0; + } + + return *this; + } + #else + ExecutionReportReject523 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 328, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 328 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 348; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 348, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportReject523 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 348, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 356; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 356, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportReject523 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 356, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 364; + } + +private: + PRICENULL9 m_price; + +public: + SBE_NODISCARD PRICENULL9 &price() + { + m_price.wrap(m_buffer, m_offset + 364, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 372; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 372, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 380; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 380, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportReject523 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 380, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 388; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 388, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportReject523 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 388, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 396; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 396, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportReject523 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 396, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 404; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 404, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportReject523 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 404, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * HostCrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t hostCrossIDId() SBE_NOEXCEPT + { + return 961; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hostCrossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hostCrossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hostCrossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hostCrossIDEncodingOffset() SBE_NOEXCEPT + { + return 412; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t hostCrossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t hostCrossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 412, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportReject523 &hostCrossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 412, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 420; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 420; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 420; + } + + 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 + 420 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportReject523 &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 + 420 + (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 + 420, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportReject523 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 420, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 420; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 420; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportReject523 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 420, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 420 + start] = 0; + } + + return *this; + } + #else + ExecutionReportReject523 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 420, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 420 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 425; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 425, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportReject523 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 425, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 429; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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 + 429, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportReject523 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 429, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t minQtyId() SBE_NOEXCEPT + { + return 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= minQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minQtyEncodingOffset() SBE_NOEXCEPT + { + return 433; + } + + static SBE_CONSTEXPR std::uint32_t minQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t minQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t minQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 433, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportReject523 &minQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 433, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t displayQtyId() SBE_NOEXCEPT + { + return 1138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool displayQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= displayQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayQtyEncodingOffset() SBE_NOEXCEPT + { + return 437; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t displayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t displayQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 437, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportReject523 &displayQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 437, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdRejReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordRejReasonId() SBE_NOEXCEPT + { + return 103; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordRejReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordRejReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordRejReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordRejReasonEncodingOffset() SBE_NOEXCEPT + { + return 441; + } + + static SBE_CONSTEXPR std::uint16_t ordRejReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t ordRejReasonMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t ordRejReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t ordRejReasonEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t ordRejReason() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 441, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportReject523 &ordRejReason(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 441, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 443; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 443, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportReject523 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 443, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 445; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 445, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportReject523 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 445, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 447; + } + + static SBE_CONSTEXPR char ordStatusNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char ordStatusMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char ordStatusMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *ordStatus() const + { + static const std::uint8_t ordStatusValues[] = { 56 }; + + return (const char *)ordStatusValues; + } + + SBE_NODISCARD char ordStatus(const std::uint64_t index) const + { + static const std::uint8_t ordStatusValues[] = { 56 }; + + return (char)ordStatusValues[index]; + } + + std::uint64_t getOrdStatus(char *dst, const std::uint64_t length) const + { + static std::uint8_t ordStatusValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(ordStatusValues) ? length : sizeof(ordStatusValues); + + std::memcpy(dst, ordStatusValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getOrdStatusAsString() const + { + static const std::uint8_t OrdStatusValues[] = { 56 }; + + return std::string((const char *)OrdStatusValues, 1); + } + + std::string getOrdStatusAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrdStatusAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 447; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 56 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 56 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 56 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 447; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 447, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportReject523 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 447, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 448; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 448, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportReject523 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 448, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 449; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 449, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + ExecutionReportReject523 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 449, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 450; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 450, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportReject523 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 450, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 451; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 451, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportReject523 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 451, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 452; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 452, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + ExecutionReportReject523 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 452, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + 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 453; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t crossType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 453, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportReject523 &crossType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 453, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 454; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 454, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 455; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 455, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportReject523 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 455, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 456; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 456, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportReject523 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 456, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 457; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 457, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportReject523 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 457, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 458; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 458, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportReject523 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 458, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, ExecutionReportReject523 _writer) + { + ExecutionReportReject523 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportReject523", )"; + 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"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("HostCrossID": )"; + builder << +writer.hostCrossID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("MinQty": )"; + builder << +writer.minQty(); + + builder << ", "; + builder << R"("DisplayQty": )"; + builder << +writer.displayQty(); + + builder << ", "; + builder << R"("OrdRejReason": )"; + builder << +writer.ordRejReason(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("CrossType": )"; + builder << +writer.crossType(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportStatus532.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportStatus532.h new file mode 100644 index 000000000..fe51bff30 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportStatus532.h @@ -0,0 +1,3880 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTSTATUS532_H_ +#define _ILINKBINARY_EXECUTIONREPORTSTATUS532_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 ExecutionReportStatus532 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + ExecutionReportStatus532() = default; + + ExecutionReportStatus532( + 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_actingVersion(actingVersion) + { + } + + ExecutionReportStatus532(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportStatus532(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportStatus532( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportStatus532(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)480; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)532; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportStatus532 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportStatus532(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportStatus532 &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 = ExecutionReportStatus532( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportStatus532 &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 = ExecutionReportStatus532(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + ExecutionReportStatus532 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + ExecutionReportStatus532 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + ExecutionReportStatus532 &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; + } + + ExecutionReportStatus532 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportStatus532 &putText(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 256; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportStatus532 &putText(const std::string& str) + { + const 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 (size_t start = srcLength; start < 256; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 268; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 268 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportStatus532 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 268 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportStatus532 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 40); + return *this; + } + + std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportStatus532 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 268, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + ExecutionReportStatus532 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 268, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 308; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 308; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 308; + } + + 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 + 308 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportStatus532 &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 + 308 + (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 + 308, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportStatus532 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 308, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 308; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 308; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportStatus532 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 308, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 308 + start] = 0; + } + + return *this; + } + #else + ExecutionReportStatus532 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 308, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 308 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 328; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 328; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 328; + } + + 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 + 328 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportStatus532 &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 + 328 + (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 + 328, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportStatus532 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 328, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 328; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 328; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportStatus532 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 328, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 328 + start] = 0; + } + + return *this; + } + #else + ExecutionReportStatus532 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 328, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 328 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 348; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 348, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 348, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 356; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 356, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 356, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 364; + } + +private: + PRICENULL9 m_price; + +public: + SBE_NODISCARD PRICENULL9 &price() + { + m_price.wrap(m_buffer, m_offset + 364, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 372; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 372, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 380; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 380, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 380, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 388; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 388, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 388, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 396; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 396, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 396, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordStatusReqIDId() SBE_NOEXCEPT + { + return 790; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusReqIDEncodingOffset() SBE_NOEXCEPT + { + return 404; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusReqIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t ordStatusReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t ordStatusReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 404, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &ordStatusReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 404, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * MassStatusReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massStatusReqIDId() SBE_NOEXCEPT + { + return 584; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massStatusReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massStatusReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massStatusReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massStatusReqIDEncodingOffset() SBE_NOEXCEPT + { + return 412; + } + + static SBE_CONSTEXPR std::uint64_t massStatusReqIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t massStatusReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t massStatusReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t massStatusReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t massStatusReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 412, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &massStatusReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 412, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 420; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 420, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 420, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * HostCrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t hostCrossIDId() SBE_NOEXCEPT + { + return 961; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hostCrossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hostCrossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hostCrossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hostCrossIDEncodingOffset() SBE_NOEXCEPT + { + return 428; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t hostCrossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t hostCrossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 428, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportStatus532 &hostCrossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 428, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 436; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 436; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 436; + } + + 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 + 436 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportStatus532 &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 + 436 + (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 + 436, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportStatus532 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 436, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 436; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 436; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportStatus532 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 436, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 436 + start] = 0; + } + + return *this; + } + #else + ExecutionReportStatus532 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 436, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 436 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 441; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 441, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportStatus532 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 441, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 445; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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 + 445, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportStatus532 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 445, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * CumQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cumQtyId() SBE_NOEXCEPT + { + return 14; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cumQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cumQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cumQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cumQtyEncodingOffset() SBE_NOEXCEPT + { + return 449; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t cumQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t cumQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 449, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportStatus532 &cumQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 449, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LeavesQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t leavesQtyId() SBE_NOEXCEPT + { + return 151; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t leavesQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool leavesQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= leavesQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t leavesQtyEncodingOffset() SBE_NOEXCEPT + { + return 453; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t leavesQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t leavesQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 453, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportStatus532 &leavesQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 453, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t minQtyId() SBE_NOEXCEPT + { + return 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= minQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minQtyEncodingOffset() SBE_NOEXCEPT + { + return 457; + } + + static SBE_CONSTEXPR std::uint32_t minQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t minQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t minQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 457, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportStatus532 &minQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 457, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t displayQtyId() SBE_NOEXCEPT + { + return 1138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool displayQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= displayQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayQtyEncodingOffset() SBE_NOEXCEPT + { + return 461; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t displayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t displayQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 461, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportStatus532 &displayQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 461, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 465; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 465, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportStatus532 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 465, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 467; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderStatus::Value ordStatus() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 467, sizeof(char)); + return OrderStatus::get((val)); + } + + ExecutionReportStatus532 &ordStatus(const OrderStatus::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 467, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 468; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 73 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 73 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 73 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 73 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 468; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 468, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportStatus532 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 468, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 469; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 469, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportStatus532 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 469, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 470; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 470, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + ExecutionReportStatus532 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 470, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 471; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 471, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportStatus532 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 471, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 472; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 472, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportStatus532 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 472, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LastRptRequestedMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastRptRequestedId() SBE_NOEXCEPT + { + return 912; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastRptRequestedSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastRptRequestedInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastRptRequestedSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastRptRequestedEncodingOffset() SBE_NOEXCEPT + { + return 473; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastRptRequestedEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value lastRptRequested() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 473, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportStatus532 &lastRptRequested(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 473, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + 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 474; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t crossType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 474, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportStatus532 &crossType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 474, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 475; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 475, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 476; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 476, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportStatus532 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 476, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 477; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 477, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportStatus532 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 477, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 478; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 478, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportStatus532 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 478, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 479; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 479, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportStatus532 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 479, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, ExecutionReportStatus532 _writer) + { + ExecutionReportStatus532 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportStatus532", )"; + 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"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("OrdStatusReqID": )"; + builder << +writer.ordStatusReqID(); + + builder << ", "; + builder << R"("MassStatusReqID": )"; + builder << +writer.massStatusReqID(); + + builder << ", "; + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("HostCrossID": )"; + builder << +writer.hostCrossID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("CumQty": )"; + builder << +writer.cumQty(); + + builder << ", "; + builder << R"("LeavesQty": )"; + builder << +writer.leavesQty(); + + builder << ", "; + builder << R"("MinQty": )"; + builder << +writer.minQty(); + + builder << ", "; + builder << R"("DisplayQty": )"; + builder << +writer.displayQty(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("OrdStatus": )"; + builder << '"' << writer.ordStatus() << '"'; + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("LastRptRequested": )"; + builder << '"' << writer.lastRptRequested() << '"'; + + builder << ", "; + builder << R"("CrossType": )"; + builder << +writer.crossType(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeAddendumOutright548.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeAddendumOutright548.h new file mode 100644 index 000000000..116026b36 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeAddendumOutright548.h @@ -0,0 +1,4297 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMOUTRIGHT548_H_ +#define _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMOUTRIGHT548_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 ExecutionReportTradeAddendumOutright548 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + ExecutionReportTradeAddendumOutright548() = default; + + ExecutionReportTradeAddendumOutright548( + 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_actingVersion(actingVersion) + { + } + + ExecutionReportTradeAddendumOutright548(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportTradeAddendumOutright548(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportTradeAddendumOutright548( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportTradeAddendumOutright548(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)181; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)548; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportTradeAddendumOutright548 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeAddendumOutright548(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportTradeAddendumOutright548 &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 = ExecutionReportTradeAddendumOutright548( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportTradeAddendumOutright548 &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 = ExecutionReportTradeAddendumOutright548(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + ExecutionReportTradeAddendumOutright548 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + ExecutionReportTradeAddendumOutright548 &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 * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumOutright548 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumOutright548 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumOutright548 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumOutright548 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + 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 + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumOutright548 &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 + 52 + (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 + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumOutright548 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumOutright548 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumOutright548 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + 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 + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumOutright548 &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 + 72 + (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 + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumOutright548 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumOutright548 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumOutright548 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumOutright548 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LastPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastPxId() SBE_NOEXCEPT + { + return 31; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastPxEncodingOffset() SBE_NOEXCEPT + { + return 100; + } + +private: + PRICE9 m_lastPx; + +public: + SBE_NODISCARD PRICE9 &lastPx() + { + m_lastPx.wrap(m_buffer, m_offset + 100, m_actingVersion, m_bufferLength); + return m_lastPx; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 108; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 108, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumOutright548 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 108, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 116; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 116, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumOutright548 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 116, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 124; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 124, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumOutright548 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t secExecIDId() SBE_NOEXCEPT + { + return 527; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secExecIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secExecIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secExecIDEncodingOffset() SBE_NOEXCEPT + { + return 132; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t secExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t secExecID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumOutright548 &secExecID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrigSecondaryExecutionIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t origSecondaryExecutionIDId() SBE_NOEXCEPT + { + return 9703; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool origSecondaryExecutionIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origSecondaryExecutionIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origSecondaryExecutionIDEncodingOffset() SBE_NOEXCEPT + { + return 140; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t origSecondaryExecutionIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t origSecondaryExecutionID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumOutright548 &origSecondaryExecutionID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 148; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 148; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 148; + } + + 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 + 148 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumOutright548 &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 + 148 + (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 + 148, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumOutright548 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 148, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 148; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 148; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumOutright548 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 148, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 148 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumOutright548 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 148, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 148 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 153; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 153, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumOutright548 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 153, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastQtyEncodingOffset() SBE_NOEXCEPT + { + return 157; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t lastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 157, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumOutright548 &lastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 157, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t sideTradeIDId() SBE_NOEXCEPT + { + return 1506; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 161; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t sideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t sideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 161, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumOutright548 &sideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 161, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrigSideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t origSideTradeIDId() SBE_NOEXCEPT + { + return 1507; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origSideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool origSideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origSideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origSideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 165; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t origSideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t origSideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 165, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumOutright548 &origSideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 165, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * TradeDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateId() SBE_NOEXCEPT + { + return 75; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradeDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradeDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradeDateEncodingOffset() SBE_NOEXCEPT + { + return 169; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 169, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportTradeAddendumOutright548 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 169, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 171; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrdStatusTrdCxl::Value ordStatus() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 171, sizeof(char)); + return OrdStatusTrdCxl::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &ordStatus(const OrdStatusTrdCxl::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 171, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 172; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecTypTrdCxl::Value execType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 172, sizeof(char)); + return ExecTypTrdCxl::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &execType(const ExecTypTrdCxl::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 172, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 173; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 173, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 173, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 174; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 174, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 174, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 175; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 175, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 175, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 176; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 176, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 177; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 177, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 177, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 178; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 178, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 178, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 179; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 179, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 179, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 180; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 180, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportTradeAddendumOutright548 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 180, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoFills + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)15); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 15; + m_actingVersion = actingVersion; + 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 15; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoFills &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillPxId() SBE_NOEXCEPT + { + return 1364; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_fillPx; + +public: + SBE_NODISCARD PRICE9 &fillPx() + { + m_fillPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_fillPx; + } + + SBE_NODISCARD static const char * FillQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillQtyId() SBE_NOEXCEPT + { + return 1365; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillQtyEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fillQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fillQty() 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); + } + + NoFills &fillQty(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 * FillExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillExecIDId() SBE_NOEXCEPT + { + return 1363; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillExecIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char fillExecIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char fillExecIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char fillExecIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t fillExecIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint64_t fillExecIDLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD const char *fillExecID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *fillExecID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char fillExecID(const std::uint64_t index) const + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + NoFills &fillExecID(const std::uint64_t index, const char value) + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFillExecID(char *const dst, const std::uint64_t length) const + { + if (length > 2) + { + throw std::runtime_error("length too large for getFillExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + NoFills &putFillExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 2); + return *this; + } + + NoFills &putFillExecID( + const char value0, + const char value1) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 12, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 13, &val1, sizeof(char)); + + return *this; + } + + std::string getFillExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFillExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFillExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getFillExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoFills &putFillExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + NoFills &putFillExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FillYieldTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillYieldTypeId() SBE_NOEXCEPT + { + return 1622; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillYieldTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillYieldTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillYieldTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingOffset() SBE_NOEXCEPT + { + return 14; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t fillYieldType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return (val); + } + + NoFills &fillYieldType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoFills writer) + { + builder << '{'; + builder << R"("FillPx": )"; + builder << writer.fillPx(); + + builder << ", "; + builder << R"("FillQty": )"; + builder << +writer.fillQty(); + + builder << ", "; + builder << R"("FillExecID": )"; + builder << '"' << + writer.getFillExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("FillYieldType": )"; + builder << +writer.fillYieldType(); + + builder << '}'; + + return builder; + } + }; + +private: + NoFills m_noFills; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoFillsId() SBE_NOEXCEPT + { + return 1362; + } + + SBE_NODISCARD inline NoFills &noFills() + { + m_noFills.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + NoFills &noFillsCount(const std::uint8_t count) + { + m_noFills.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noFillsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noFillsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noFillsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoOrderEvents + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)23); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 23; + m_actingVersion = actingVersion; + 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 + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoOrderEvents &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventPxId() SBE_NOEXCEPT + { + return 1799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_orderEventPx; + +public: + SBE_NODISCARD PRICE9 &orderEventPx() + { + m_orderEventPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_orderEventPx; + } + + SBE_NODISCARD static const char * OrderEventTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventTextId() SBE_NOEXCEPT + { + return 1802; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTextSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTextInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTextSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTextEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR char orderEventTextNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char orderEventTextMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char orderEventTextMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t orderEventTextEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t orderEventTextLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *orderEventText() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char *orderEventText() SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char orderEventText(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 8 + (index * 1), sizeof(char)); + return (val); + } + + NoOrderEvents &orderEventText(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 8 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrderEventText(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getOrderEventText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 8, sizeof(char) * static_cast(length)); + return length; + } + + NoOrderEvents &putOrderEventText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 8, src, sizeof(char) * 5); + return *this; + } + + std::string getOrderEventTextAsString() const + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrderEventTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrderEventTextAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getOrderEventTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoOrderEvents &putOrderEventText(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #else + NoOrderEvents &putOrderEventText(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OrderEventExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventExecIDId() SBE_NOEXCEPT + { + return 1797; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventExecID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventExecID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 13, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventQtyId() SBE_NOEXCEPT + { + return 1800; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventQtyEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventQty() 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); + } + + NoOrderEvents &orderEventQty(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 * OrderEventTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventTypeId() SBE_NOEXCEPT + { + return 1796; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TradeAddendum::Value orderEventType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 21, sizeof(std::uint8_t)); + return TradeAddendum::get((val)); + } + + NoOrderEvents &orderEventType(const TradeAddendum::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 21, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventReasonId() SBE_NOEXCEPT + { + return 1798; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventReasonEncodingOffset() SBE_NOEXCEPT + { + return 22; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t orderEventReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t orderEventReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 22, sizeof(std::uint8_t)); + return (val); + } + + NoOrderEvents &orderEventReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 22, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoOrderEvents writer) + { + builder << '{'; + builder << R"("OrderEventPx": )"; + builder << writer.orderEventPx(); + + builder << ", "; + builder << R"("OrderEventText": )"; + builder << '"' << + writer.getOrderEventTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("OrderEventExecID": )"; + builder << +writer.orderEventExecID(); + + builder << ", "; + builder << R"("OrderEventQty": )"; + builder << +writer.orderEventQty(); + + builder << ", "; + builder << R"("OrderEventType": )"; + builder << '"' << writer.orderEventType() << '"'; + + builder << ", "; + builder << R"("OrderEventReason": )"; + builder << +writer.orderEventReason(); + + builder << '}'; + + return builder; + } + }; + +private: + NoOrderEvents m_noOrderEvents; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoOrderEventsId() SBE_NOEXCEPT + { + return 1795; + } + + SBE_NODISCARD inline NoOrderEvents &noOrderEvents() + { + m_noOrderEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + NoOrderEvents &noOrderEventsCount(const std::uint8_t count) + { + m_noOrderEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noOrderEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noOrderEventsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noOrderEventsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, ExecutionReportTradeAddendumOutright548 _writer) + { + ExecutionReportTradeAddendumOutright548 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportTradeAddendumOutright548", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("LastPx": )"; + builder << writer.lastPx(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SecExecID": )"; + builder << +writer.secExecID(); + + builder << ", "; + builder << R"("OrigSecondaryExecutionID": )"; + builder << +writer.origSecondaryExecutionID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("LastQty": )"; + builder << +writer.lastQty(); + + builder << ", "; + builder << R"("SideTradeID": )"; + builder << +writer.sideTradeID(); + + builder << ", "; + builder << R"("OrigSideTradeID": )"; + builder << +writer.origSideTradeID(); + + builder << ", "; + builder << R"("TradeDate": )"; + builder << +writer.tradeDate(); + + builder << ", "; + builder << R"("OrdStatus": )"; + builder << '"' << writer.ordStatus() << '"'; + + builder << ", "; + builder << R"("ExecType": )"; + builder << '"' << writer.execType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoFills": [)"; + writer.noFills().forEach([&](NoFills& noFills) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoOrderEvents": [)"; + writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeAddendumSpread549.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeAddendumSpread549.h new file mode 100644 index 000000000..737ae8b1b --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeAddendumSpread549.h @@ -0,0 +1,5304 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMSPREAD549_H_ +#define _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMSPREAD549_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 ExecutionReportTradeAddendumSpread549 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + ExecutionReportTradeAddendumSpread549() = default; + + ExecutionReportTradeAddendumSpread549( + 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_actingVersion(actingVersion) + { + } + + ExecutionReportTradeAddendumSpread549(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportTradeAddendumSpread549(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportTradeAddendumSpread549( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportTradeAddendumSpread549(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)187; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportTradeAddendumSpread549 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeAddendumSpread549(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportTradeAddendumSpread549 &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 = ExecutionReportTradeAddendumSpread549( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportTradeAddendumSpread549 &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 = ExecutionReportTradeAddendumSpread549(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + ExecutionReportTradeAddendumSpread549 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + ExecutionReportTradeAddendumSpread549 &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 * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpread549 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpread549 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpread549 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpread549 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + 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 + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpread549 &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 + 52 + (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 + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpread549 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpread549 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpread549 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + 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 + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpread549 &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 + 72 + (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 + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpread549 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpread549 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpread549 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpread549 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LastPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastPxId() SBE_NOEXCEPT + { + return 31; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastPxEncodingOffset() SBE_NOEXCEPT + { + return 100; + } + +private: + PRICE9 m_lastPx; + +public: + SBE_NODISCARD PRICE9 &lastPx() + { + m_lastPx.wrap(m_buffer, m_offset + 100, m_actingVersion, m_bufferLength); + return m_lastPx; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 108; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 108, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpread549 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 108, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 116; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 116, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpread549 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 116, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 124; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 124, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpread549 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t secExecIDId() SBE_NOEXCEPT + { + return 527; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secExecIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secExecIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secExecIDEncodingOffset() SBE_NOEXCEPT + { + return 132; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t secExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t secExecID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpread549 &secExecID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrigSecondaryExecutionIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t origSecondaryExecutionIDId() SBE_NOEXCEPT + { + return 9703; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool origSecondaryExecutionIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origSecondaryExecutionIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origSecondaryExecutionIDEncodingOffset() SBE_NOEXCEPT + { + return 140; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t origSecondaryExecutionIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t origSecondaryExecutionID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpread549 &origSecondaryExecutionID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 148; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 148; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 148; + } + + 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 + 148 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpread549 &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 + 148 + (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 + 148, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpread549 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 148, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 148; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 148; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpread549 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 148, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 148 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpread549 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 148, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 148 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 153; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 153, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpread549 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 153, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * MDTradeEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t mDTradeEntryIDId() SBE_NOEXCEPT + { + return 37711; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDTradeEntryIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + 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 157; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t mDTradeEntryIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t mDTradeEntryID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 157, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpread549 &mDTradeEntryID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 157, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastQtyEncodingOffset() SBE_NOEXCEPT + { + return 161; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t lastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 161, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpread549 &lastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 161, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t sideTradeIDId() SBE_NOEXCEPT + { + return 1506; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 165; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t sideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t sideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 165, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpread549 &sideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 165, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrigSideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t origSideTradeIDId() SBE_NOEXCEPT + { + return 1507; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origSideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool origSideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origSideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origSideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 169; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t origSideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t origSideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 169, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpread549 &origSideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 169, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * TradeDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateId() SBE_NOEXCEPT + { + return 75; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradeDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradeDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradeDateEncodingOffset() SBE_NOEXCEPT + { + return 173; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 173, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportTradeAddendumSpread549 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 173, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 175; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrdStatusTrdCxl::Value ordStatus() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 175, sizeof(char)); + return OrdStatusTrdCxl::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &ordStatus(const OrdStatusTrdCxl::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 175, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 176; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecTypTrdCxl::Value execType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 176, sizeof(char)); + return ExecTypTrdCxl::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &execType(const ExecTypTrdCxl::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 176, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 177; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 177, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 177, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 178; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 178, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 178, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 179; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 179, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 179, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 180; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 180, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 180, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TotalNumSecuritiesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t totalNumSecuritiesId() SBE_NOEXCEPT + { + return 393; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totalNumSecuritiesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool totalNumSecuritiesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= totalNumSecuritiesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totalNumSecuritiesEncodingOffset() SBE_NOEXCEPT + { + return 181; + } + + static SBE_CONSTEXPR std::uint8_t totalNumSecuritiesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t totalNumSecuritiesMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t totalNumSecuritiesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t totalNumSecuritiesEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t totalNumSecurities() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 181, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportTradeAddendumSpread549 &totalNumSecurities(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 181, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 182; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 182, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 183; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 183, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 183, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 184; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 184, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 184, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 185; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 185, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 185, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 186; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 186, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportTradeAddendumSpread549 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 186, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoFills + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)15); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 15; + m_actingVersion = actingVersion; + 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 15; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoFills &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillPxId() SBE_NOEXCEPT + { + return 1364; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_fillPx; + +public: + SBE_NODISCARD PRICE9 &fillPx() + { + m_fillPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_fillPx; + } + + SBE_NODISCARD static const char * FillQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillQtyId() SBE_NOEXCEPT + { + return 1365; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillQtyEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fillQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fillQty() 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); + } + + NoFills &fillQty(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 * FillExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillExecIDId() SBE_NOEXCEPT + { + return 1363; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillExecIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char fillExecIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char fillExecIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char fillExecIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t fillExecIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint64_t fillExecIDLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD const char *fillExecID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *fillExecID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char fillExecID(const std::uint64_t index) const + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + NoFills &fillExecID(const std::uint64_t index, const char value) + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFillExecID(char *const dst, const std::uint64_t length) const + { + if (length > 2) + { + throw std::runtime_error("length too large for getFillExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + NoFills &putFillExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 2); + return *this; + } + + NoFills &putFillExecID( + const char value0, + const char value1) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 12, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 13, &val1, sizeof(char)); + + return *this; + } + + std::string getFillExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFillExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFillExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getFillExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoFills &putFillExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + NoFills &putFillExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FillYieldTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillYieldTypeId() SBE_NOEXCEPT + { + return 1622; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillYieldTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillYieldTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillYieldTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingOffset() SBE_NOEXCEPT + { + return 14; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t fillYieldType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return (val); + } + + NoFills &fillYieldType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoFills writer) + { + builder << '{'; + builder << R"("FillPx": )"; + builder << writer.fillPx(); + + builder << ", "; + builder << R"("FillQty": )"; + builder << +writer.fillQty(); + + builder << ", "; + builder << R"("FillExecID": )"; + builder << '"' << + writer.getFillExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("FillYieldType": )"; + builder << +writer.fillYieldType(); + + builder << '}'; + + return builder; + } + }; + +private: + NoFills m_noFills; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoFillsId() SBE_NOEXCEPT + { + return 1362; + } + + SBE_NODISCARD inline NoFills &noFills() + { + m_noFills.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + NoFills &noFillsCount(const std::uint8_t count) + { + m_noFills.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noFillsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noFillsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noFillsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoLegs + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)41); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 41; + m_actingVersion = actingVersion; + 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 41; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoLegs &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * LegExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legExecIDId() SBE_NOEXCEPT + { + return 1893; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legExecIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t legExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t legExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t legExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t legExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t legExecID() 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); + } + + NoLegs &legExecID(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 * LegLastPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legLastPxId() SBE_NOEXCEPT + { + return 637; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legLastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legLastPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legLastPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legLastPxEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + +private: + PRICE9 m_legLastPx; + +public: + SBE_NODISCARD PRICE9 &legLastPx() + { + m_legLastPx.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_legLastPx; + } + + SBE_NODISCARD static const char * LegExecRefIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legExecRefIDId() SBE_NOEXCEPT + { + return 1901; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legExecRefIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legExecRefIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legExecRefIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legExecRefIDEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint64_t legExecRefIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t legExecRefIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t legExecRefIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t legExecRefIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t legExecRefID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoLegs &legExecRefID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LegTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legTradeIDId() SBE_NOEXCEPT + { + return 1894; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legTradeIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legTradeIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::uint32_t legTradeIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t legTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t legTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t legTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t legTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LegTradeRefIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legTradeRefIDId() SBE_NOEXCEPT + { + return 39023; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legTradeRefIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legTradeRefIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legTradeRefIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legTradeRefIDEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::uint32_t legTradeRefIDNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t legTradeRefIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t legTradeRefIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t legTradeRefIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t legTradeRefID() 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); + } + + NoLegs &legTradeRefID(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 * LegSecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legSecurityIDId() SBE_NOEXCEPT + { + return 602; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSecurityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSecurityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSecurityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSecurityIDEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t legSecurityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t legSecurityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legSecurityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * LegLastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legLastQtyId() SBE_NOEXCEPT + { + return 1418; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legLastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legLastQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legLastQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legLastQtyEncodingOffset() SBE_NOEXCEPT + { + return 36; + } + + static SBE_CONSTEXPR std::uint32_t legLastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t legLastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t legLastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t legLastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t legLastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 36, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legLastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 36, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LegSideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legSideId() SBE_NOEXCEPT + { + return 624; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingOffset() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value legSide() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 40, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + NoLegs &legSide(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 40, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoLegs writer) + { + builder << '{'; + builder << R"("LegExecID": )"; + builder << +writer.legExecID(); + + builder << ", "; + builder << R"("LegLastPx": )"; + builder << writer.legLastPx(); + + builder << ", "; + builder << R"("LegExecRefID": )"; + builder << +writer.legExecRefID(); + + builder << ", "; + builder << R"("LegTradeID": )"; + builder << +writer.legTradeID(); + + builder << ", "; + builder << R"("LegTradeRefID": )"; + builder << +writer.legTradeRefID(); + + builder << ", "; + builder << R"("LegSecurityID": )"; + builder << +writer.legSecurityID(); + + builder << ", "; + builder << R"("LegLastQty": )"; + builder << +writer.legLastQty(); + + builder << ", "; + builder << R"("LegSide": )"; + builder << '"' << writer.legSide() << '"'; + + builder << '}'; + + return builder; + } + }; + +private: + NoLegs m_noLegs; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLegsId() SBE_NOEXCEPT + { + return 555; + } + + SBE_NODISCARD inline NoLegs &noLegs() + { + m_noLegs.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + NoLegs &noLegsCount(const std::uint8_t count) + { + m_noLegs.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noLegsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noLegsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noLegsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoOrderEvents + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)23); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 23; + m_actingVersion = actingVersion; + 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 + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoOrderEvents &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventPxId() SBE_NOEXCEPT + { + return 1799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_orderEventPx; + +public: + SBE_NODISCARD PRICE9 &orderEventPx() + { + m_orderEventPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_orderEventPx; + } + + SBE_NODISCARD static const char * OrderEventTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventTextId() SBE_NOEXCEPT + { + return 1802; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTextSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTextInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTextSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTextEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR char orderEventTextNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char orderEventTextMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char orderEventTextMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t orderEventTextEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t orderEventTextLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *orderEventText() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char *orderEventText() SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char orderEventText(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 8 + (index * 1), sizeof(char)); + return (val); + } + + NoOrderEvents &orderEventText(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 8 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrderEventText(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getOrderEventText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 8, sizeof(char) * static_cast(length)); + return length; + } + + NoOrderEvents &putOrderEventText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 8, src, sizeof(char) * 5); + return *this; + } + + std::string getOrderEventTextAsString() const + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrderEventTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrderEventTextAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getOrderEventTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoOrderEvents &putOrderEventText(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #else + NoOrderEvents &putOrderEventText(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OrderEventExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventExecIDId() SBE_NOEXCEPT + { + return 1797; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventExecID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventExecID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 13, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventQtyId() SBE_NOEXCEPT + { + return 1800; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventQtyEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventQty() 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); + } + + NoOrderEvents &orderEventQty(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 * OrderEventTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventTypeId() SBE_NOEXCEPT + { + return 1796; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TradeAddendum::Value orderEventType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 21, sizeof(std::uint8_t)); + return TradeAddendum::get((val)); + } + + NoOrderEvents &orderEventType(const TradeAddendum::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 21, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventReasonId() SBE_NOEXCEPT + { + return 1798; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventReasonEncodingOffset() SBE_NOEXCEPT + { + return 22; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t orderEventReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t orderEventReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 22, sizeof(std::uint8_t)); + return (val); + } + + NoOrderEvents &orderEventReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 22, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoOrderEvents writer) + { + builder << '{'; + builder << R"("OrderEventPx": )"; + builder << writer.orderEventPx(); + + builder << ", "; + builder << R"("OrderEventText": )"; + builder << '"' << + writer.getOrderEventTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("OrderEventExecID": )"; + builder << +writer.orderEventExecID(); + + builder << ", "; + builder << R"("OrderEventQty": )"; + builder << +writer.orderEventQty(); + + builder << ", "; + builder << R"("OrderEventType": )"; + builder << '"' << writer.orderEventType() << '"'; + + builder << ", "; + builder << R"("OrderEventReason": )"; + builder << +writer.orderEventReason(); + + builder << '}'; + + return builder; + } + }; + +private: + NoOrderEvents m_noOrderEvents; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoOrderEventsId() SBE_NOEXCEPT + { + return 1795; + } + + SBE_NODISCARD inline NoOrderEvents &noOrderEvents() + { + m_noOrderEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + NoOrderEvents &noOrderEventsCount(const std::uint8_t count) + { + m_noOrderEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noOrderEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noOrderEventsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noOrderEventsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, ExecutionReportTradeAddendumSpread549 _writer) + { + ExecutionReportTradeAddendumSpread549 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportTradeAddendumSpread549", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("LastPx": )"; + builder << writer.lastPx(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SecExecID": )"; + builder << +writer.secExecID(); + + builder << ", "; + builder << R"("OrigSecondaryExecutionID": )"; + builder << +writer.origSecondaryExecutionID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("MDTradeEntryID": )"; + builder << +writer.mDTradeEntryID(); + + builder << ", "; + builder << R"("LastQty": )"; + builder << +writer.lastQty(); + + builder << ", "; + builder << R"("SideTradeID": )"; + builder << +writer.sideTradeID(); + + builder << ", "; + builder << R"("OrigSideTradeID": )"; + builder << +writer.origSideTradeID(); + + builder << ", "; + builder << R"("TradeDate": )"; + builder << +writer.tradeDate(); + + builder << ", "; + builder << R"("OrdStatus": )"; + builder << '"' << writer.ordStatus() << '"'; + + builder << ", "; + builder << R"("ExecType": )"; + builder << '"' << writer.execType() << '"'; + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("TotalNumSecurities": )"; + builder << +writer.totalNumSecurities(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoFills": [)"; + writer.noFills().forEach([&](NoFills& noFills) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoLegs": [)"; + writer.noLegs().forEach([&](NoLegs& noLegs) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noLegs; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoOrderEvents": [)"; + writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeAddendumSpreadLeg550.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeAddendumSpreadLeg550.h new file mode 100644 index 000000000..1c529e9e6 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeAddendumSpreadLeg550.h @@ -0,0 +1,3923 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMSPREADLEG550_H_ +#define _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMSPREADLEG550_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 ExecutionReportTradeAddendumSpreadLeg550 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + ExecutionReportTradeAddendumSpreadLeg550() = default; + + ExecutionReportTradeAddendumSpreadLeg550( + 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_actingVersion(actingVersion) + { + } + + ExecutionReportTradeAddendumSpreadLeg550(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportTradeAddendumSpreadLeg550(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportTradeAddendumSpreadLeg550( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportTradeAddendumSpreadLeg550(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)175; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)550; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportTradeAddendumSpreadLeg550 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeAddendumSpreadLeg550(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportTradeAddendumSpreadLeg550 &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 = ExecutionReportTradeAddendumSpreadLeg550( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportTradeAddendumSpreadLeg550 &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 = ExecutionReportTradeAddendumSpreadLeg550(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + ExecutionReportTradeAddendumSpreadLeg550 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + ExecutionReportTradeAddendumSpreadLeg550 &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 * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpreadLeg550 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpreadLeg550 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpreadLeg550 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + 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 + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &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 + 52 + (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 + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpreadLeg550 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpreadLeg550 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpreadLeg550 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + 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 + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &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 + 72 + (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 + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpreadLeg550 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpreadLeg550 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpreadLeg550 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LastPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastPxId() SBE_NOEXCEPT + { + return 31; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastPxEncodingOffset() SBE_NOEXCEPT + { + return 100; + } + +private: + PRICE9 m_lastPx; + +public: + SBE_NODISCARD PRICE9 &lastPx() + { + m_lastPx.wrap(m_buffer, m_offset + 100, m_actingVersion, m_bufferLength); + return m_lastPx; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 108; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 108, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 108, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 116; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 116, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 116, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 124; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 124, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t secExecIDId() SBE_NOEXCEPT + { + return 527; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secExecIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secExecIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secExecIDEncodingOffset() SBE_NOEXCEPT + { + return 132; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t secExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t secExecID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &secExecID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrigSecondaryExecutionIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t origSecondaryExecutionIDId() SBE_NOEXCEPT + { + return 9703; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool origSecondaryExecutionIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origSecondaryExecutionIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origSecondaryExecutionIDEncodingOffset() SBE_NOEXCEPT + { + return 140; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t origSecondaryExecutionIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t origSecondaryExecutionIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t origSecondaryExecutionID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &origSecondaryExecutionID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 148; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 148; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 148; + } + + 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 + 148 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &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 + 148 + (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 + 148, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeAddendumSpreadLeg550 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 148, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 148; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 148; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeAddendumSpreadLeg550 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 148, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 148 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeAddendumSpreadLeg550 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 148, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 148 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 153; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 153, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 153, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastQtyEncodingOffset() SBE_NOEXCEPT + { + return 157; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t lastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 157, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &lastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 157, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t sideTradeIDId() SBE_NOEXCEPT + { + return 1506; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 161; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t sideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t sideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 161, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &sideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 161, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrigSideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t origSideTradeIDId() SBE_NOEXCEPT + { + return 1507; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origSideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool origSideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origSideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origSideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 165; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t origSideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t origSideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t origSideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 165, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &origSideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 165, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * TradeDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateId() SBE_NOEXCEPT + { + return 75; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradeDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradeDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradeDateEncodingOffset() SBE_NOEXCEPT + { + return 169; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 169, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportTradeAddendumSpreadLeg550 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 169, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 171; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrdStatusTrdCxl::Value ordStatus() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 171, sizeof(char)); + return OrdStatusTrdCxl::get((val)); + } + + ExecutionReportTradeAddendumSpreadLeg550 &ordStatus(const OrdStatusTrdCxl::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 171, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 172; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecTypTrdCxl::Value execType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 172, sizeof(char)); + return ExecTypTrdCxl::get((val)); + } + + ExecutionReportTradeAddendumSpreadLeg550 &execType(const ExecTypTrdCxl::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 172, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 173; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 173, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportTradeAddendumSpreadLeg550 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 173, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 174; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 174, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportTradeAddendumSpreadLeg550 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 174, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoFills + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)15); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 15; + m_actingVersion = actingVersion; + 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 15; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoFills &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillPxId() SBE_NOEXCEPT + { + return 1364; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_fillPx; + +public: + SBE_NODISCARD PRICE9 &fillPx() + { + m_fillPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_fillPx; + } + + SBE_NODISCARD static const char * FillQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillQtyId() SBE_NOEXCEPT + { + return 1365; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillQtyEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fillQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fillQty() 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); + } + + NoFills &fillQty(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 * FillExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillExecIDId() SBE_NOEXCEPT + { + return 1363; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillExecIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char fillExecIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char fillExecIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char fillExecIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t fillExecIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint64_t fillExecIDLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD const char *fillExecID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *fillExecID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char fillExecID(const std::uint64_t index) const + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + NoFills &fillExecID(const std::uint64_t index, const char value) + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFillExecID(char *const dst, const std::uint64_t length) const + { + if (length > 2) + { + throw std::runtime_error("length too large for getFillExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + NoFills &putFillExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 2); + return *this; + } + + NoFills &putFillExecID( + const char value0, + const char value1) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 12, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 13, &val1, sizeof(char)); + + return *this; + } + + std::string getFillExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFillExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFillExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getFillExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoFills &putFillExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + NoFills &putFillExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FillYieldTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillYieldTypeId() SBE_NOEXCEPT + { + return 1622; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillYieldTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillYieldTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillYieldTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingOffset() SBE_NOEXCEPT + { + return 14; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t fillYieldType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return (val); + } + + NoFills &fillYieldType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoFills writer) + { + builder << '{'; + builder << R"("FillPx": )"; + builder << writer.fillPx(); + + builder << ", "; + builder << R"("FillQty": )"; + builder << +writer.fillQty(); + + builder << ", "; + builder << R"("FillExecID": )"; + builder << '"' << + writer.getFillExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("FillYieldType": )"; + builder << +writer.fillYieldType(); + + builder << '}'; + + return builder; + } + }; + +private: + NoFills m_noFills; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoFillsId() SBE_NOEXCEPT + { + return 1362; + } + + SBE_NODISCARD inline NoFills &noFills() + { + m_noFills.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + NoFills &noFillsCount(const std::uint8_t count) + { + m_noFills.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noFillsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noFillsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noFillsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoOrderEvents + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)23); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 23; + m_actingVersion = actingVersion; + 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 + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoOrderEvents &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventPxId() SBE_NOEXCEPT + { + return 1799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_orderEventPx; + +public: + SBE_NODISCARD PRICE9 &orderEventPx() + { + m_orderEventPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_orderEventPx; + } + + SBE_NODISCARD static const char * OrderEventTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventTextId() SBE_NOEXCEPT + { + return 1802; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTextSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTextInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTextSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTextEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR char orderEventTextNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char orderEventTextMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char orderEventTextMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t orderEventTextEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t orderEventTextLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *orderEventText() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char *orderEventText() SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char orderEventText(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 8 + (index * 1), sizeof(char)); + return (val); + } + + NoOrderEvents &orderEventText(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 8 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrderEventText(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getOrderEventText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 8, sizeof(char) * static_cast(length)); + return length; + } + + NoOrderEvents &putOrderEventText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 8, src, sizeof(char) * 5); + return *this; + } + + std::string getOrderEventTextAsString() const + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrderEventTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrderEventTextAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getOrderEventTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoOrderEvents &putOrderEventText(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #else + NoOrderEvents &putOrderEventText(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OrderEventExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventExecIDId() SBE_NOEXCEPT + { + return 1797; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventExecID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventExecID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 13, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventQtyId() SBE_NOEXCEPT + { + return 1800; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventQtyEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventQty() 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); + } + + NoOrderEvents &orderEventQty(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 * OrderEventTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventTypeId() SBE_NOEXCEPT + { + return 1796; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TradeAddendum::Value orderEventType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 21, sizeof(std::uint8_t)); + return TradeAddendum::get((val)); + } + + NoOrderEvents &orderEventType(const TradeAddendum::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 21, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventReasonId() SBE_NOEXCEPT + { + return 1798; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventReasonEncodingOffset() SBE_NOEXCEPT + { + return 22; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t orderEventReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t orderEventReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 22, sizeof(std::uint8_t)); + return (val); + } + + NoOrderEvents &orderEventReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 22, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoOrderEvents writer) + { + builder << '{'; + builder << R"("OrderEventPx": )"; + builder << writer.orderEventPx(); + + builder << ", "; + builder << R"("OrderEventText": )"; + builder << '"' << + writer.getOrderEventTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("OrderEventExecID": )"; + builder << +writer.orderEventExecID(); + + builder << ", "; + builder << R"("OrderEventQty": )"; + builder << +writer.orderEventQty(); + + builder << ", "; + builder << R"("OrderEventType": )"; + builder << '"' << writer.orderEventType() << '"'; + + builder << ", "; + builder << R"("OrderEventReason": )"; + builder << +writer.orderEventReason(); + + builder << '}'; + + return builder; + } + }; + +private: + NoOrderEvents m_noOrderEvents; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoOrderEventsId() SBE_NOEXCEPT + { + return 1795; + } + + SBE_NODISCARD inline NoOrderEvents &noOrderEvents() + { + m_noOrderEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + NoOrderEvents &noOrderEventsCount(const std::uint8_t count) + { + m_noOrderEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noOrderEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noOrderEventsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noOrderEventsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, ExecutionReportTradeAddendumSpreadLeg550 _writer) + { + ExecutionReportTradeAddendumSpreadLeg550 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportTradeAddendumSpreadLeg550", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("LastPx": )"; + builder << writer.lastPx(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SecExecID": )"; + builder << +writer.secExecID(); + + builder << ", "; + builder << R"("OrigSecondaryExecutionID": )"; + builder << +writer.origSecondaryExecutionID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("LastQty": )"; + builder << +writer.lastQty(); + + builder << ", "; + builder << R"("SideTradeID": )"; + builder << +writer.sideTradeID(); + + builder << ", "; + builder << R"("OrigSideTradeID": )"; + builder << +writer.origSideTradeID(); + + builder << ", "; + builder << R"("TradeDate": )"; + builder << +writer.tradeDate(); + + builder << ", "; + builder << R"("OrdStatus": )"; + builder << '"' << writer.ordStatus() << '"'; + + builder << ", "; + builder << R"("ExecType": )"; + builder << '"' << writer.execType() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoFills": [)"; + writer.noFills().forEach([&](NoFills& noFills) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoOrderEvents": [)"; + writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeOutright525.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeOutright525.h new file mode 100644 index 000000000..fcdcf5f1d --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeOutright525.h @@ -0,0 +1,5361 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTTRADEOUTRIGHT525_H_ +#define _ILINKBINARY_EXECUTIONREPORTTRADEOUTRIGHT525_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 ExecutionReportTradeOutright525 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + ExecutionReportTradeOutright525() = default; + + ExecutionReportTradeOutright525( + 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_actingVersion(actingVersion) + { + } + + ExecutionReportTradeOutright525(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportTradeOutright525(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportTradeOutright525( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportTradeOutright525(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)235; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)525; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportTradeOutright525 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeOutright525(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportTradeOutright525 &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 = ExecutionReportTradeOutright525( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportTradeOutright525 &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 = ExecutionReportTradeOutright525(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + ExecutionReportTradeOutright525 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + ExecutionReportTradeOutright525 &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 * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeOutright525 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeOutright525 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeOutright525 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeOutright525 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + 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 + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeOutright525 &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 + 52 + (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 + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeOutright525 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeOutright525 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeOutright525 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + 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 + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeOutright525 &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 + 72 + (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 + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeOutright525 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeOutright525 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeOutright525 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeOutright525 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LastPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastPxId() SBE_NOEXCEPT + { + return 31; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastPxEncodingOffset() SBE_NOEXCEPT + { + return 100; + } + +private: + PRICE9 m_lastPx; + +public: + SBE_NODISCARD PRICE9 &lastPx() + { + m_lastPx.wrap(m_buffer, m_offset + 100, m_actingVersion, m_bufferLength); + return m_lastPx; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 108; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 108, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeOutright525 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 108, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 116; + } + +private: + PRICE9 m_price; + +public: + SBE_NODISCARD PRICE9 &price() + { + m_price.wrap(m_buffer, m_offset + 116, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 124; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 124, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 132; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeOutright525 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 140; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeOutright525 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 148; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 148, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeOutright525 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 148, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t secExecIDId() SBE_NOEXCEPT + { + return 527; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secExecIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secExecIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secExecIDEncodingOffset() SBE_NOEXCEPT + { + return 156; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t secExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t secExecID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 156, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeOutright525 &secExecID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 156, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 164; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 164, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeOutright525 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 164, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * HostCrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t hostCrossIDId() SBE_NOEXCEPT + { + return 961; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hostCrossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hostCrossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hostCrossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hostCrossIDEncodingOffset() SBE_NOEXCEPT + { + return 172; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t hostCrossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t hostCrossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 172, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeOutright525 &hostCrossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 172, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 180; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 180; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 180; + } + + 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 + 180 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeOutright525 &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 + 180 + (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 + 180, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeOutright525 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 180, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 180; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 180; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeOutright525 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 180, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 180 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeOutright525 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 180, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 180 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 185; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 185, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeOutright525 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 185, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 189; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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 + 189, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeOutright525 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 189, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastQtyEncodingOffset() SBE_NOEXCEPT + { + return 193; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t lastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeOutright525 &lastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * CumQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cumQtyId() SBE_NOEXCEPT + { + return 14; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cumQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cumQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cumQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cumQtyEncodingOffset() SBE_NOEXCEPT + { + return 197; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t cumQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t cumQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 197, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeOutright525 &cumQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 197, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MDTradeEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t mDTradeEntryIDId() SBE_NOEXCEPT + { + return 37711; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDTradeEntryIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + 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 201; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t mDTradeEntryIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t mDTradeEntryID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 201, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeOutright525 &mDTradeEntryID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 201, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t sideTradeIDId() SBE_NOEXCEPT + { + return 1506; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 205; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t sideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t sideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 205, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeOutright525 &sideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 205, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * TradeLinkIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t tradeLinkIDId() SBE_NOEXCEPT + { + return 820; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradeLinkIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradeLinkIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradeLinkIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradeLinkIDEncodingOffset() SBE_NOEXCEPT + { + return 209; + } + + static SBE_CONSTEXPR std::uint32_t tradeLinkIDNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t tradeLinkIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t tradeLinkIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t tradeLinkIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t tradeLinkID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 209, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeOutright525 &tradeLinkID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 209, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LeavesQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t leavesQtyId() SBE_NOEXCEPT + { + return 151; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t leavesQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool leavesQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= leavesQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t leavesQtyEncodingOffset() SBE_NOEXCEPT + { + return 213; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t leavesQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t leavesQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 213, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeOutright525 &leavesQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 213, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * TradeDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateId() SBE_NOEXCEPT + { + return 75; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradeDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradeDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradeDateEncodingOffset() SBE_NOEXCEPT + { + return 217; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 217, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportTradeOutright525 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 217, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 219; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 219, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportTradeOutright525 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 219, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 221; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrdStatusTrd::Value ordStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 221, sizeof(std::uint8_t)); + return OrdStatusTrd::get((val)); + } + + ExecutionReportTradeOutright525 &ordStatus(const OrdStatusTrd::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 221, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 222; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 70 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 70 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 70 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 70 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 222; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 222, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportTradeOutright525 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 222, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 223; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 223, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportTradeOutright525 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 223, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 224; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 224, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + ExecutionReportTradeOutright525 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 224, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 225; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 225, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportTradeOutright525 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 225, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 226; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 226, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportTradeOutright525 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 226, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * AggressorIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t aggressorIndicatorId() SBE_NOEXCEPT + { + return 1057; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t aggressorIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool aggressorIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= aggressorIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t aggressorIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 227; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t aggressorIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value aggressorIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 227, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportTradeOutright525 &aggressorIndicator(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 227, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + 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 228; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t crossType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 228, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportTradeOutright525 &crossType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 228, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 229; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 229, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 230; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 230, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportTradeOutright525 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 230, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 231; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 231, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportTradeOutright525 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 231, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 232; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 232, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportTradeOutright525 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 232, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 233; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 233, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportTradeOutright525 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 233, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OwnershipMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ownershipId() SBE_NOEXCEPT + { + return 7191; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ownershipSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ownershipInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ownershipSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ownershipEncodingOffset() SBE_NOEXCEPT + { + return 234; + } + + static SBE_CONSTEXPR std::uint8_t ownershipNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t ownershipMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t ownershipMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t ownershipEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t ownership() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 234, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportTradeOutright525 &ownership(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 234, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoFills + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)15); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 15; + m_actingVersion = actingVersion; + 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 15; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoFills &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillPxId() SBE_NOEXCEPT + { + return 1364; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_fillPx; + +public: + SBE_NODISCARD PRICE9 &fillPx() + { + m_fillPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_fillPx; + } + + SBE_NODISCARD static const char * FillQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillQtyId() SBE_NOEXCEPT + { + return 1365; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillQtyEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fillQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fillQty() 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); + } + + NoFills &fillQty(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 * FillExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillExecIDId() SBE_NOEXCEPT + { + return 1363; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillExecIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char fillExecIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char fillExecIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char fillExecIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t fillExecIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint64_t fillExecIDLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD const char *fillExecID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *fillExecID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char fillExecID(const std::uint64_t index) const + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + NoFills &fillExecID(const std::uint64_t index, const char value) + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFillExecID(char *const dst, const std::uint64_t length) const + { + if (length > 2) + { + throw std::runtime_error("length too large for getFillExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + NoFills &putFillExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 2); + return *this; + } + + NoFills &putFillExecID( + const char value0, + const char value1) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 12, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 13, &val1, sizeof(char)); + + return *this; + } + + std::string getFillExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFillExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFillExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getFillExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoFills &putFillExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + NoFills &putFillExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FillYieldTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillYieldTypeId() SBE_NOEXCEPT + { + return 1622; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillYieldTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillYieldTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillYieldTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingOffset() SBE_NOEXCEPT + { + return 14; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t fillYieldType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return (val); + } + + NoFills &fillYieldType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoFills writer) + { + builder << '{'; + builder << R"("FillPx": )"; + builder << writer.fillPx(); + + builder << ", "; + builder << R"("FillQty": )"; + builder << +writer.fillQty(); + + builder << ", "; + builder << R"("FillExecID": )"; + builder << '"' << + writer.getFillExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("FillYieldType": )"; + builder << +writer.fillYieldType(); + + builder << '}'; + + return builder; + } + }; + +private: + NoFills m_noFills; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoFillsId() SBE_NOEXCEPT + { + return 1362; + } + + SBE_NODISCARD inline NoFills &noFills() + { + m_noFills.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + NoFills &noFillsCount(const std::uint8_t count) + { + m_noFills.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noFillsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noFillsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noFillsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoOrderEvents + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)23); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 23; + m_actingVersion = actingVersion; + 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 + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoOrderEvents &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventPxId() SBE_NOEXCEPT + { + return 1799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_orderEventPx; + +public: + SBE_NODISCARD PRICE9 &orderEventPx() + { + m_orderEventPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_orderEventPx; + } + + SBE_NODISCARD static const char * OrderEventTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventTextId() SBE_NOEXCEPT + { + return 1802; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTextSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTextInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTextSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTextEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR char orderEventTextNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char orderEventTextMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char orderEventTextMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t orderEventTextEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t orderEventTextLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *orderEventText() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char *orderEventText() SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char orderEventText(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 8 + (index * 1), sizeof(char)); + return (val); + } + + NoOrderEvents &orderEventText(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 8 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrderEventText(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getOrderEventText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 8, sizeof(char) * static_cast(length)); + return length; + } + + NoOrderEvents &putOrderEventText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 8, src, sizeof(char) * 5); + return *this; + } + + std::string getOrderEventTextAsString() const + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrderEventTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrderEventTextAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getOrderEventTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoOrderEvents &putOrderEventText(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #else + NoOrderEvents &putOrderEventText(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OrderEventExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventExecIDId() SBE_NOEXCEPT + { + return 1797; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventExecID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventExecID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 13, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventQtyId() SBE_NOEXCEPT + { + return 1800; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventQtyEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventQty() 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); + } + + NoOrderEvents &orderEventQty(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 * OrderEventTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventTypeId() SBE_NOEXCEPT + { + return 1796; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderEventType::Value orderEventType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 21, sizeof(std::uint8_t)); + return OrderEventType::get((val)); + } + + NoOrderEvents &orderEventType(const OrderEventType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 21, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventReasonId() SBE_NOEXCEPT + { + return 1798; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventReasonEncodingOffset() SBE_NOEXCEPT + { + return 22; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t orderEventReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t orderEventReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 22, sizeof(std::uint8_t)); + return (val); + } + + NoOrderEvents &orderEventReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 22, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoOrderEvents writer) + { + builder << '{'; + builder << R"("OrderEventPx": )"; + builder << writer.orderEventPx(); + + builder << ", "; + builder << R"("OrderEventText": )"; + builder << '"' << + writer.getOrderEventTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("OrderEventExecID": )"; + builder << +writer.orderEventExecID(); + + builder << ", "; + builder << R"("OrderEventQty": )"; + builder << +writer.orderEventQty(); + + builder << ", "; + builder << R"("OrderEventType": )"; + builder << '"' << writer.orderEventType() << '"'; + + builder << ", "; + builder << R"("OrderEventReason": )"; + builder << +writer.orderEventReason(); + + builder << '}'; + + return builder; + } + }; + +private: + NoOrderEvents m_noOrderEvents; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoOrderEventsId() SBE_NOEXCEPT + { + return 1795; + } + + SBE_NODISCARD inline NoOrderEvents &noOrderEvents() + { + m_noOrderEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + NoOrderEvents &noOrderEventsCount(const std::uint8_t count) + { + m_noOrderEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noOrderEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noOrderEventsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noOrderEventsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, ExecutionReportTradeOutright525 _writer) + { + ExecutionReportTradeOutright525 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportTradeOutright525", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("LastPx": )"; + builder << writer.lastPx(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("SecExecID": )"; + builder << +writer.secExecID(); + + builder << ", "; + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("HostCrossID": )"; + builder << +writer.hostCrossID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("LastQty": )"; + builder << +writer.lastQty(); + + builder << ", "; + builder << R"("CumQty": )"; + builder << +writer.cumQty(); + + builder << ", "; + builder << R"("MDTradeEntryID": )"; + builder << +writer.mDTradeEntryID(); + + builder << ", "; + builder << R"("SideTradeID": )"; + builder << +writer.sideTradeID(); + + builder << ", "; + builder << R"("TradeLinkID": )"; + builder << +writer.tradeLinkID(); + + builder << ", "; + builder << R"("LeavesQty": )"; + builder << +writer.leavesQty(); + + builder << ", "; + builder << R"("TradeDate": )"; + builder << +writer.tradeDate(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("OrdStatus": )"; + builder << '"' << writer.ordStatus() << '"'; + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("AggressorIndicator": )"; + builder << '"' << writer.aggressorIndicator() << '"'; + + builder << ", "; + builder << R"("CrossType": )"; + builder << +writer.crossType(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << ", "; + builder << R"("Ownership": )"; + builder << +writer.ownership(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoFills": [)"; + writer.noFills().forEach([&](NoFills& noFills) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoOrderEvents": [)"; + writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeSpread526.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeSpread526.h new file mode 100644 index 000000000..4cf837d1d --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeSpread526.h @@ -0,0 +1,5852 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTTRADESPREAD526_H_ +#define _ILINKBINARY_EXECUTIONREPORTTRADESPREAD526_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 ExecutionReportTradeSpread526 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + ExecutionReportTradeSpread526() = default; + + ExecutionReportTradeSpread526( + 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_actingVersion(actingVersion) + { + } + + ExecutionReportTradeSpread526(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportTradeSpread526(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportTradeSpread526( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportTradeSpread526(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)230; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)526; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportTradeSpread526 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeSpread526(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportTradeSpread526 &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 = ExecutionReportTradeSpread526( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportTradeSpread526 &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 = ExecutionReportTradeSpread526(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + ExecutionReportTradeSpread526 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + ExecutionReportTradeSpread526 &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 * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeSpread526 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeSpread526 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeSpread526 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeSpread526 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + 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 + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeSpread526 &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 + 52 + (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 + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeSpread526 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeSpread526 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeSpread526 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + 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 + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeSpread526 &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 + 72 + (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 + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeSpread526 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeSpread526 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeSpread526 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 92; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 92, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpread526 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LastPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastPxId() SBE_NOEXCEPT + { + return 31; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastPxEncodingOffset() SBE_NOEXCEPT + { + return 100; + } + +private: + PRICE9 m_lastPx; + +public: + SBE_NODISCARD PRICE9 &lastPx() + { + m_lastPx.wrap(m_buffer, m_offset + 100, m_actingVersion, m_bufferLength); + return m_lastPx; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 108; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 108, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpread526 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 108, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 116; + } + +private: + PRICE9 m_price; + +public: + SBE_NODISCARD PRICE9 &price() + { + m_price.wrap(m_buffer, m_offset + 116, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 124; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 124, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 132; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 132, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpread526 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 140; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 140, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpread526 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 148; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 148, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpread526 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 148, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t secExecIDId() SBE_NOEXCEPT + { + return 527; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secExecIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secExecIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secExecIDEncodingOffset() SBE_NOEXCEPT + { + return 156; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t secExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t secExecID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 156, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpread526 &secExecID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 156, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 164; + } + + static SBE_CONSTEXPR std::uint64_t crossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 164, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpread526 &crossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 164, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * HostCrossIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t hostCrossIDId() SBE_NOEXCEPT + { + return 961; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hostCrossIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hostCrossIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hostCrossIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hostCrossIDEncodingOffset() SBE_NOEXCEPT + { + return 172; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t hostCrossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t hostCrossIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t hostCrossID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 172, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpread526 &hostCrossID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 172, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 180; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 180; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 180; + } + + 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 + 180 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeSpread526 &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 + 180 + (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 + 180, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeSpread526 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 180, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 180; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 180; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeSpread526 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 180, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 180 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeSpread526 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 180, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 180 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 185; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 185, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpread526 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 185, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 189; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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 + 189, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpread526 &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 189, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastQtyEncodingOffset() SBE_NOEXCEPT + { + return 193; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t lastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpread526 &lastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * CumQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cumQtyId() SBE_NOEXCEPT + { + return 14; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cumQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cumQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cumQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cumQtyEncodingOffset() SBE_NOEXCEPT + { + return 197; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t cumQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t cumQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 197, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpread526 &cumQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 197, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MDTradeEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t mDTradeEntryIDId() SBE_NOEXCEPT + { + return 37711; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDTradeEntryIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + 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 201; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t mDTradeEntryIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t mDTradeEntryID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 201, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpread526 &mDTradeEntryID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 201, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t sideTradeIDId() SBE_NOEXCEPT + { + return 1506; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 205; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t sideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t sideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 205, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpread526 &sideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 205, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LeavesQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t leavesQtyId() SBE_NOEXCEPT + { + return 151; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t leavesQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool leavesQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= leavesQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t leavesQtyEncodingOffset() SBE_NOEXCEPT + { + return 209; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t leavesQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t leavesQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t leavesQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 209, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpread526 &leavesQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 209, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * TradeDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateId() SBE_NOEXCEPT + { + return 75; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradeDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradeDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradeDateEncodingOffset() SBE_NOEXCEPT + { + return 213; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 213, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportTradeSpread526 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 213, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 215; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 215, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportTradeSpread526 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 215, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 217; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrdStatusTrd::Value ordStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 217, sizeof(std::uint8_t)); + return OrdStatusTrd::get((val)); + } + + ExecutionReportTradeSpread526 &ordStatus(const OrdStatusTrd::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 217, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 218; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 70 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 70 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 70 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 70 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 218; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 218, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportTradeSpread526 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 218, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 219; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 219, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportTradeSpread526 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 219, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 220; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 220, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + ExecutionReportTradeSpread526 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 220, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 221; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 221, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + ExecutionReportTradeSpread526 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 221, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 222; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 222, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportTradeSpread526 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 222, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * AggressorIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t aggressorIndicatorId() SBE_NOEXCEPT + { + return 1057; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t aggressorIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool aggressorIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= aggressorIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t aggressorIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 223; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t aggressorIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value aggressorIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 223, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportTradeSpread526 &aggressorIndicator(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 223, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CrossTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + 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 224; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t crossTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t crossType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 224, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportTradeSpread526 &crossType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 224, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TotalNumSecuritiesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t totalNumSecuritiesId() SBE_NOEXCEPT + { + return 393; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totalNumSecuritiesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool totalNumSecuritiesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= totalNumSecuritiesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totalNumSecuritiesEncodingOffset() SBE_NOEXCEPT + { + return 225; + } + + static SBE_CONSTEXPR std::uint8_t totalNumSecuritiesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t totalNumSecuritiesMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t totalNumSecuritiesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t totalNumSecuritiesEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t totalNumSecurities() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 225, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportTradeSpread526 &totalNumSecurities(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 225, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 226; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 226, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 227; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 227, sizeof(char)); + return ExecMode::get((val)); + } + + ExecutionReportTradeSpread526 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 227, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 228; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 228, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + ExecutionReportTradeSpread526 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 228, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 229; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 229, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + ExecutionReportTradeSpread526 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 229, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoFills + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)15); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 15; + m_actingVersion = actingVersion; + 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 15; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoFills &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillPxId() SBE_NOEXCEPT + { + return 1364; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_fillPx; + +public: + SBE_NODISCARD PRICE9 &fillPx() + { + m_fillPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_fillPx; + } + + SBE_NODISCARD static const char * FillQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillQtyId() SBE_NOEXCEPT + { + return 1365; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillQtyEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fillQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fillQty() 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); + } + + NoFills &fillQty(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 * FillExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillExecIDId() SBE_NOEXCEPT + { + return 1363; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillExecIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char fillExecIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char fillExecIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char fillExecIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t fillExecIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint64_t fillExecIDLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD const char *fillExecID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *fillExecID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char fillExecID(const std::uint64_t index) const + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + NoFills &fillExecID(const std::uint64_t index, const char value) + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFillExecID(char *const dst, const std::uint64_t length) const + { + if (length > 2) + { + throw std::runtime_error("length too large for getFillExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + NoFills &putFillExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 2); + return *this; + } + + NoFills &putFillExecID( + const char value0, + const char value1) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 12, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 13, &val1, sizeof(char)); + + return *this; + } + + std::string getFillExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFillExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFillExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getFillExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoFills &putFillExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + NoFills &putFillExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FillYieldTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillYieldTypeId() SBE_NOEXCEPT + { + return 1622; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillYieldTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillYieldTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillYieldTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingOffset() SBE_NOEXCEPT + { + return 14; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t fillYieldType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return (val); + } + + NoFills &fillYieldType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoFills writer) + { + builder << '{'; + builder << R"("FillPx": )"; + builder << writer.fillPx(); + + builder << ", "; + builder << R"("FillQty": )"; + builder << +writer.fillQty(); + + builder << ", "; + builder << R"("FillExecID": )"; + builder << '"' << + writer.getFillExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("FillYieldType": )"; + builder << +writer.fillYieldType(); + + builder << '}'; + + return builder; + } + }; + +private: + NoFills m_noFills; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoFillsId() SBE_NOEXCEPT + { + return 1362; + } + + SBE_NODISCARD inline NoFills &noFills() + { + m_noFills.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + NoFills &noFillsCount(const std::uint8_t count) + { + m_noFills.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noFillsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noFillsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noFillsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoLegs + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)29); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 29; + m_actingVersion = actingVersion; + 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 29; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoLegs &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * LegExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legExecIDId() SBE_NOEXCEPT + { + return 1893; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legExecIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t legExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t legExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t legExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t legExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t legExecID() 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); + } + + NoLegs &legExecID(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 * LegLastPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legLastPxId() SBE_NOEXCEPT + { + return 637; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legLastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legLastPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legLastPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legLastPxEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + +private: + PRICE9 m_legLastPx; + +public: + SBE_NODISCARD PRICE9 &legLastPx() + { + m_legLastPx.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_legLastPx; + } + + SBE_NODISCARD static const char * LegSecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legSecurityIDId() SBE_NOEXCEPT + { + return 602; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSecurityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSecurityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSecurityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSecurityIDEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t legSecurityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t legSecurityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legSecurityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * LegTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legTradeIDId() SBE_NOEXCEPT + { + return 1894; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legTradeIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legTradeIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint32_t legTradeIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t legTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t legTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t legTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t legTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LegLastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legLastQtyId() SBE_NOEXCEPT + { + return 1418; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legLastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legLastQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legLastQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legLastQtyEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::uint32_t legLastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t legLastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t legLastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t legLastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t legLastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legLastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * LegSideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legSideId() SBE_NOEXCEPT + { + return 624; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value legSide() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + NoLegs &legSide(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoLegs writer) + { + builder << '{'; + builder << R"("LegExecID": )"; + builder << +writer.legExecID(); + + builder << ", "; + builder << R"("LegLastPx": )"; + builder << writer.legLastPx(); + + builder << ", "; + builder << R"("LegSecurityID": )"; + builder << +writer.legSecurityID(); + + builder << ", "; + builder << R"("LegTradeID": )"; + builder << +writer.legTradeID(); + + builder << ", "; + builder << R"("LegLastQty": )"; + builder << +writer.legLastQty(); + + builder << ", "; + builder << R"("LegSide": )"; + builder << '"' << writer.legSide() << '"'; + + builder << '}'; + + return builder; + } + }; + +private: + NoLegs m_noLegs; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLegsId() SBE_NOEXCEPT + { + return 555; + } + + SBE_NODISCARD inline NoLegs &noLegs() + { + m_noLegs.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + NoLegs &noLegsCount(const std::uint8_t count) + { + m_noLegs.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noLegsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noLegsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noLegsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoOrderEvents + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)23); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 23; + m_actingVersion = actingVersion; + 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 + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoOrderEvents &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventPxId() SBE_NOEXCEPT + { + return 1799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_orderEventPx; + +public: + SBE_NODISCARD PRICE9 &orderEventPx() + { + m_orderEventPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_orderEventPx; + } + + SBE_NODISCARD static const char * OrderEventTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventTextId() SBE_NOEXCEPT + { + return 1802; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTextSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTextInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTextSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTextEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR char orderEventTextNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char orderEventTextMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char orderEventTextMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t orderEventTextEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t orderEventTextLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *orderEventText() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char *orderEventText() SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char orderEventText(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 8 + (index * 1), sizeof(char)); + return (val); + } + + NoOrderEvents &orderEventText(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 8 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrderEventText(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getOrderEventText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 8, sizeof(char) * static_cast(length)); + return length; + } + + NoOrderEvents &putOrderEventText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 8, src, sizeof(char) * 5); + return *this; + } + + std::string getOrderEventTextAsString() const + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrderEventTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrderEventTextAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getOrderEventTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoOrderEvents &putOrderEventText(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #else + NoOrderEvents &putOrderEventText(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OrderEventExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventExecIDId() SBE_NOEXCEPT + { + return 1797; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventExecID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventExecID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 13, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventQtyId() SBE_NOEXCEPT + { + return 1800; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventQtyEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventQty() 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); + } + + NoOrderEvents &orderEventQty(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 * OrderEventTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventTypeId() SBE_NOEXCEPT + { + return 1796; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderEventType::Value orderEventType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 21, sizeof(std::uint8_t)); + return OrderEventType::get((val)); + } + + NoOrderEvents &orderEventType(const OrderEventType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 21, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventReasonId() SBE_NOEXCEPT + { + return 1798; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventReasonEncodingOffset() SBE_NOEXCEPT + { + return 22; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t orderEventReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t orderEventReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 22, sizeof(std::uint8_t)); + return (val); + } + + NoOrderEvents &orderEventReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 22, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoOrderEvents writer) + { + builder << '{'; + builder << R"("OrderEventPx": )"; + builder << writer.orderEventPx(); + + builder << ", "; + builder << R"("OrderEventText": )"; + builder << '"' << + writer.getOrderEventTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("OrderEventExecID": )"; + builder << +writer.orderEventExecID(); + + builder << ", "; + builder << R"("OrderEventQty": )"; + builder << +writer.orderEventQty(); + + builder << ", "; + builder << R"("OrderEventType": )"; + builder << '"' << writer.orderEventType() << '"'; + + builder << ", "; + builder << R"("OrderEventReason": )"; + builder << +writer.orderEventReason(); + + builder << '}'; + + return builder; + } + }; + +private: + NoOrderEvents m_noOrderEvents; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoOrderEventsId() SBE_NOEXCEPT + { + return 1795; + } + + SBE_NODISCARD inline NoOrderEvents &noOrderEvents() + { + m_noOrderEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + NoOrderEvents &noOrderEventsCount(const std::uint8_t count) + { + m_noOrderEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noOrderEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noOrderEventsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noOrderEventsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, ExecutionReportTradeSpread526 _writer) + { + ExecutionReportTradeSpread526 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportTradeSpread526", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("LastPx": )"; + builder << writer.lastPx(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("SecExecID": )"; + builder << +writer.secExecID(); + + builder << ", "; + builder << R"("CrossID": )"; + builder << +writer.crossID(); + + builder << ", "; + builder << R"("HostCrossID": )"; + builder << +writer.hostCrossID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("LastQty": )"; + builder << +writer.lastQty(); + + builder << ", "; + builder << R"("CumQty": )"; + builder << +writer.cumQty(); + + builder << ", "; + builder << R"("MDTradeEntryID": )"; + builder << +writer.mDTradeEntryID(); + + builder << ", "; + builder << R"("SideTradeID": )"; + builder << +writer.sideTradeID(); + + builder << ", "; + builder << R"("LeavesQty": )"; + builder << +writer.leavesQty(); + + builder << ", "; + builder << R"("TradeDate": )"; + builder << +writer.tradeDate(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("OrdStatus": )"; + builder << '"' << writer.ordStatus() << '"'; + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("AggressorIndicator": )"; + builder << '"' << writer.aggressorIndicator() << '"'; + + builder << ", "; + builder << R"("CrossType": )"; + builder << +writer.crossType(); + + builder << ", "; + builder << R"("TotalNumSecurities": )"; + builder << +writer.totalNumSecurities(); + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoFills": [)"; + writer.noFills().forEach([&](NoFills& noFills) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoLegs": [)"; + writer.noLegs().forEach([&](NoLegs& noLegs) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noLegs; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoOrderEvents": [)"; + writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeSpreadLeg527.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeSpreadLeg527.h new file mode 100644 index 000000000..40e80ba18 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExecutionReportTradeSpreadLeg527.h @@ -0,0 +1,4243 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXECUTIONREPORTTRADESPREADLEG527_H_ +#define _ILINKBINARY_EXECUTIONREPORTTRADESPREADLEG527_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 ExecutionReportTradeSpreadLeg527 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + ExecutionReportTradeSpreadLeg527() = default; + + ExecutionReportTradeSpreadLeg527( + 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_actingVersion(actingVersion) + { + } + + ExecutionReportTradeSpreadLeg527(char *buffer, const std::uint64_t bufferLength) : + ExecutionReportTradeSpreadLeg527(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + ExecutionReportTradeSpreadLeg527( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ExecutionReportTradeSpreadLeg527(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)199; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)527; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "8"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + ExecutionReportTradeSpreadLeg527 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ExecutionReportTradeSpreadLeg527(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + ExecutionReportTradeSpreadLeg527 &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 = ExecutionReportTradeSpreadLeg527( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + ExecutionReportTradeSpreadLeg527 &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 = ExecutionReportTradeSpreadLeg527(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + ExecutionReportTradeSpreadLeg527 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + ExecutionReportTradeSpreadLeg527 &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 * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeSpreadLeg527 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeSpreadLeg527 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 40); + return *this; + } + + std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeSpreadLeg527 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeSpreadLeg527 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 52; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 52; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 52; + } + + 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 + 52 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeSpreadLeg527 &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 + 52 + (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 + 52, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeSpreadLeg527 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeSpreadLeg527 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeSpreadLeg527 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 72; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 72; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + 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 + 72 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeSpreadLeg527 &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 + 72 + (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 + 72, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeSpreadLeg527 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeSpreadLeg527 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeSpreadLeg527 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * VolatilityMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t volatilityId() SBE_NOEXCEPT + { + return 1188; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t volatilitySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool volatilityInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= volatilitySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t volatilityEncodingOffset() SBE_NOEXCEPT + { + return 92; + } + +private: + Decimal64NULL m_volatility; + +public: + SBE_NODISCARD Decimal64NULL &volatility() + { + m_volatility.wrap(m_buffer, m_offset + 92, m_actingVersion, m_bufferLength); + return m_volatility; + } + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 101; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 101, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpreadLeg527 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 101, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LastPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastPxId() SBE_NOEXCEPT + { + return 31; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastPxEncodingOffset() SBE_NOEXCEPT + { + return 109; + } + +private: + PRICE9 m_lastPx; + +public: + SBE_NODISCARD PRICE9 &lastPx() + { + m_lastPx.wrap(m_buffer, m_offset + 109, m_actingVersion, m_bufferLength); + return m_lastPx; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 117; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 117, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpreadLeg527 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 117, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * UnderlyingPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t underlyingPxId() SBE_NOEXCEPT + { + return 810; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t underlyingPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool underlyingPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= underlyingPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t underlyingPxEncodingOffset() SBE_NOEXCEPT + { + return 125; + } + +private: + PRICENULL9 m_underlyingPx; + +public: + SBE_NODISCARD PRICENULL9 &underlyingPx() + { + m_underlyingPx.wrap(m_buffer, m_offset + 125, m_actingVersion, m_bufferLength); + return m_underlyingPx; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 133; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 133, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpreadLeg527 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 133, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 141; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 141, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpreadLeg527 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 141, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t secExecIDId() SBE_NOEXCEPT + { + return 527; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secExecIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secExecIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secExecIDEncodingOffset() SBE_NOEXCEPT + { + return 149; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t secExecIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t secExecIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t secExecID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 149, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + ExecutionReportTradeSpreadLeg527 &secExecID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 149, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 157; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 157; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 157; + } + + 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 + 157 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportTradeSpreadLeg527 &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 + 157 + (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 + 157, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportTradeSpreadLeg527 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 157, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 157; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 157; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportTradeSpreadLeg527 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 157, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 157 + start] = 0; + } + + return *this; + } + #else + ExecutionReportTradeSpreadLeg527 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 157, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 157 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OptionDeltaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t optionDeltaId() SBE_NOEXCEPT + { + return 811; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t optionDeltaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool optionDeltaInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= optionDeltaSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t optionDeltaEncodingOffset() SBE_NOEXCEPT + { + return 162; + } + +private: + Decimal32NULL m_optionDelta; + +public: + SBE_NODISCARD Decimal32NULL &optionDelta() + { + m_optionDelta.wrap(m_buffer, m_offset + 162, m_actingVersion, m_bufferLength); + return m_optionDelta; + } + + SBE_NODISCARD static const char * TimeToExpirationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t timeToExpirationId() SBE_NOEXCEPT + { + return 1189; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeToExpirationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeToExpirationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeToExpirationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeToExpirationEncodingOffset() SBE_NOEXCEPT + { + return 167; + } + +private: + Decimal32NULL m_timeToExpiration; + +public: + SBE_NODISCARD Decimal32NULL &timeToExpiration() + { + m_timeToExpiration.wrap(m_buffer, m_offset + 167, m_actingVersion, m_bufferLength); + return m_timeToExpiration; + } + + SBE_NODISCARD static const char * RiskFreeRateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t riskFreeRateId() SBE_NOEXCEPT + { + return 1190; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t riskFreeRateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool riskFreeRateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= riskFreeRateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t riskFreeRateEncodingOffset() SBE_NOEXCEPT + { + return 172; + } + +private: + Decimal32NULL m_riskFreeRate; + +public: + SBE_NODISCARD Decimal32NULL &riskFreeRate() + { + m_riskFreeRate.wrap(m_buffer, m_offset + 172, m_actingVersion, m_bufferLength); + return m_riskFreeRate; + } + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 177; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 177, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpreadLeg527 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 177, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastQtyEncodingOffset() SBE_NOEXCEPT + { + return 181; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t lastQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t lastQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 181, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpreadLeg527 &lastQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 181, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * CumQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cumQtyId() SBE_NOEXCEPT + { + return 14; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cumQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cumQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cumQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cumQtyEncodingOffset() SBE_NOEXCEPT + { + return 185; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t cumQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t cumQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t cumQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 185, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpreadLeg527 &cumQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 185, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideTradeIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t sideTradeIDId() SBE_NOEXCEPT + { + return 1506; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideTradeIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideTradeIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sideTradeIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideTradeIDEncodingOffset() SBE_NOEXCEPT + { + return 189; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t sideTradeIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t sideTradeIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t sideTradeID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 189, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + ExecutionReportTradeSpreadLeg527 &sideTradeID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 189, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * TradeDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateId() SBE_NOEXCEPT + { + return 75; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradeDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= tradeDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradeDateEncodingOffset() SBE_NOEXCEPT + { + return 193; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + ExecutionReportTradeSpreadLeg527 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 195; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrdStatusTrd::Value ordStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 195, sizeof(std::uint8_t)); + return OrdStatusTrd::get((val)); + } + + ExecutionReportTradeSpreadLeg527 &ordStatus(const OrdStatusTrd::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 195, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execTypeId() SBE_NOEXCEPT + { + return 150; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execTypeEncodingOffset() SBE_NOEXCEPT + { + return 196; + } + + static SBE_CONSTEXPR char execTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t execTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *execType() const + { + static const std::uint8_t execTypeValues[] = { 70 }; + + return (const char *)execTypeValues; + } + + SBE_NODISCARD char execType(const std::uint64_t index) const + { + static const std::uint8_t execTypeValues[] = { 70 }; + + return (char)execTypeValues[index]; + } + + std::uint64_t getExecType(char *dst, const std::uint64_t length) const + { + static std::uint8_t execTypeValues[] = { 70 }; + std::uint64_t bytesToCopy = length < sizeof(execTypeValues) ? length : sizeof(execTypeValues); + + std::memcpy(dst, execTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getExecTypeAsString() const + { + static const std::uint8_t ExecTypeValues[] = { 70 }; + + return std::string((const char *)ExecTypeValues, 1); + } + + std::string getExecTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 196; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderType::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 196, sizeof(char)); + return OrderType::get((val)); + } + + ExecutionReportTradeSpreadLeg527 &ordType(const OrderType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 196, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 197; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 197, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + ExecutionReportTradeSpreadLeg527 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 197, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 198; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 198, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + ExecutionReportTradeSpreadLeg527 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 198, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoFills + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)15); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 15; + m_actingVersion = actingVersion; + 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 15; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoFills &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillPxId() SBE_NOEXCEPT + { + return 1364; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_fillPx; + +public: + SBE_NODISCARD PRICE9 &fillPx() + { + m_fillPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_fillPx; + } + + SBE_NODISCARD static const char * FillQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillQtyId() SBE_NOEXCEPT + { + return 1365; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillQtyEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fillQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fillQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fillQty() 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); + } + + NoFills &fillQty(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 * FillExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillExecIDId() SBE_NOEXCEPT + { + return 1363; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillExecIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char fillExecIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char fillExecIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char fillExecIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t fillExecIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint64_t fillExecIDLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD const char *fillExecID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *fillExecID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char fillExecID(const std::uint64_t index) const + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + NoFills &fillExecID(const std::uint64_t index, const char value) + { + if (index >= 2) + { + throw std::runtime_error("index out of range for fillExecID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFillExecID(char *const dst, const std::uint64_t length) const + { + if (length > 2) + { + throw std::runtime_error("length too large for getFillExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + NoFills &putFillExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 2); + return *this; + } + + NoFills &putFillExecID( + const char value0, + const char value1) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 12, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 13, &val1, sizeof(char)); + + return *this; + } + + std::string getFillExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFillExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFillExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getFillExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 2 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoFills &putFillExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + NoFills &putFillExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 2) + { + throw std::runtime_error("string too large for putFillExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 2; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FillYieldTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fillYieldTypeId() SBE_NOEXCEPT + { + return 1622; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fillYieldTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fillYieldTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= fillYieldTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingOffset() SBE_NOEXCEPT + { + return 14; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t fillYieldTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t fillYieldTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t fillYieldType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return (val); + } + + NoFills &fillYieldType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoFills writer) + { + builder << '{'; + builder << R"("FillPx": )"; + builder << writer.fillPx(); + + builder << ", "; + builder << R"("FillQty": )"; + builder << +writer.fillQty(); + + builder << ", "; + builder << R"("FillExecID": )"; + builder << '"' << + writer.getFillExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("FillYieldType": )"; + builder << +writer.fillYieldType(); + + builder << '}'; + + return builder; + } + }; + +private: + NoFills m_noFills; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoFillsId() SBE_NOEXCEPT + { + return 1362; + } + + SBE_NODISCARD inline NoFills &noFills() + { + m_noFills.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + NoFills &noFillsCount(const std::uint8_t count) + { + m_noFills.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noFills; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noFillsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noFillsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noFillsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoOrderEvents + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)23); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 23; + m_actingVersion = actingVersion; + 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 + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoOrderEvents &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventPxId() SBE_NOEXCEPT + { + return 1799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_orderEventPx; + +public: + SBE_NODISCARD PRICE9 &orderEventPx() + { + m_orderEventPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_orderEventPx; + } + + SBE_NODISCARD static const char * OrderEventTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventTextId() SBE_NOEXCEPT + { + return 1802; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTextSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTextInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTextSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTextEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR char orderEventTextNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char orderEventTextMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char orderEventTextMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t orderEventTextEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t orderEventTextLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *orderEventText() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char *orderEventText() SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } + + SBE_NODISCARD char orderEventText(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 8 + (index * 1), sizeof(char)); + return (val); + } + + NoOrderEvents &orderEventText(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for orderEventText [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 8 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrderEventText(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getOrderEventText [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 8, sizeof(char) * static_cast(length)); + return length; + } + + NoOrderEvents &putOrderEventText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 8, src, sizeof(char) * 5); + return *this; + } + + std::string getOrderEventTextAsString() const + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrderEventTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrderEventTextAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getOrderEventTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoOrderEvents &putOrderEventText(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #else + NoOrderEvents &putOrderEventText(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putOrderEventText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 8, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OrderEventExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventExecIDId() SBE_NOEXCEPT + { + return 1797; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventExecIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventExecIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventExecIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventExecIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventExecIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventExecID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderEvents &orderEventExecID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 13, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventQtyId() SBE_NOEXCEPT + { + return 1800; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventQtyEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderEventQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t orderEventQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t orderEventQty() 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); + } + + NoOrderEvents &orderEventQty(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 * OrderEventTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventTypeId() SBE_NOEXCEPT + { + return 1796; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderEventType::Value orderEventType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 21, sizeof(std::uint8_t)); + return OrderEventType::get((val)); + } + + NoOrderEvents &orderEventType(const OrderEventType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 21, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderEventReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t orderEventReasonId() SBE_NOEXCEPT + { + return 1798; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderEventReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderEventReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderEventReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderEventReasonEncodingOffset() SBE_NOEXCEPT + { + return 22; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t orderEventReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t orderEventReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t orderEventReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 22, sizeof(std::uint8_t)); + return (val); + } + + NoOrderEvents &orderEventReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 22, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoOrderEvents writer) + { + builder << '{'; + builder << R"("OrderEventPx": )"; + builder << writer.orderEventPx(); + + builder << ", "; + builder << R"("OrderEventText": )"; + builder << '"' << + writer.getOrderEventTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("OrderEventExecID": )"; + builder << +writer.orderEventExecID(); + + builder << ", "; + builder << R"("OrderEventQty": )"; + builder << +writer.orderEventQty(); + + builder << ", "; + builder << R"("OrderEventType": )"; + builder << '"' << writer.orderEventType() << '"'; + + builder << ", "; + builder << R"("OrderEventReason": )"; + builder << +writer.orderEventReason(); + + builder << '}'; + + return builder; + } + }; + +private: + NoOrderEvents m_noOrderEvents; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoOrderEventsId() SBE_NOEXCEPT + { + return 1795; + } + + SBE_NODISCARD inline NoOrderEvents &noOrderEvents() + { + m_noOrderEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + NoOrderEvents &noOrderEventsCount(const std::uint8_t count) + { + m_noOrderEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderEvents; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noOrderEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noOrderEventsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noOrderEventsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, ExecutionReportTradeSpreadLeg527 _writer) + { + ExecutionReportTradeSpreadLeg527 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ExecutionReportTradeSpreadLeg527", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Volatility": )"; + builder << writer.volatility(); + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("LastPx": )"; + builder << writer.lastPx(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("UnderlyingPx": )"; + builder << writer.underlyingPx(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SecExecID": )"; + builder << +writer.secExecID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("OptionDelta": )"; + builder << writer.optionDelta(); + + builder << ", "; + builder << R"("TimeToExpiration": )"; + builder << writer.timeToExpiration(); + + builder << ", "; + builder << R"("RiskFreeRate": )"; + builder << writer.riskFreeRate(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("LastQty": )"; + builder << +writer.lastQty(); + + builder << ", "; + builder << R"("CumQty": )"; + builder << +writer.cumQty(); + + builder << ", "; + builder << R"("SideTradeID": )"; + builder << +writer.sideTradeID(); + + builder << ", "; + builder << R"("TradeDate": )"; + builder << +writer.tradeDate(); + + builder << ", "; + builder << R"("OrdStatus": )"; + builder << '"' << writer.ordStatus() << '"'; + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoFills": [)"; + writer.noFills().forEach([&](NoFills& noFills) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoOrderEvents": [)"; + writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExpCycle.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExpCycle.h new file mode 100644 index 000000000..686b06872 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ExpCycle.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_EXPCYCLE_H_ +#define _ILINKBINARY_EXPCYCLE_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class ExpCycle +{ +public: + enum Value + { + ExpireOnTradingSessionClose = (std::uint8_t)0, + Expirationatgivendate = (std::uint8_t)2, + NULL_VALUE = (std::uint8_t)255 + }; + + static ExpCycle::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return ExpireOnTradingSessionClose; + case 2: return Expirationatgivendate; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum ExpCycle [E103]"); + } + + static const char* c_str(const ExpCycle::Value value) + { + switch (value) + { + case ExpireOnTradingSessionClose: return "ExpireOnTradingSessionClose"; + case Expirationatgivendate: return "Expirationatgivendate"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ExpCycle [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, ExpCycle::Value m) + { + return os << ExpCycle::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/FTI.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/FTI.h new file mode 100644 index 000000000..bd665d662 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/FTI.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_FTI_H_ +#define _ILINKBINARY_FTI_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class FTI +{ +public: + enum Value + { + Backup = (std::uint8_t)0, + Primary = (std::uint8_t)1, + NULL_VALUE = (std::uint8_t)255 + }; + + static FTI::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return Backup; + case 1: return Primary; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum FTI [E103]"); + } + + static const char* c_str(const FTI::Value value) + { + switch (value) + { + case Backup: return "Backup"; + case Primary: return "Primary"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum FTI [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, FTI::Value m) + { + return os << FTI::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/GroupSize.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/GroupSize.h new file mode 100644 index 000000000..2b8d3f163 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/GroupSize.h @@ -0,0 +1,361 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_GROUPSIZE_H_ +#define _ILINKBINARY_GROUPSIZE_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class GroupSize +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + 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; + }; + + GroupSize() = default; + + GroupSize( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 3) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + GroupSize( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + GroupSize(buffer, 0, bufferLength, actingVersion) + { + } + + GroupSize( + char *buffer, + const std::uint64_t bufferLength) : + GroupSize(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + GroupSize &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = GroupSize(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 3; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + 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 SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static const char * blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t blockLengthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool blockLengthInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= blockLengthSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t blockLengthEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint16_t blockLengthNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t blockLengthMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t blockLengthMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t blockLengthEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t blockLength() 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); + } + + GroupSize &blockLength(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; + } + + SBE_NODISCARD static const char * numInGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t numInGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool numInGroupInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= numInGroupSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t numInGroupEncodingOffset() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint8_t numInGroupNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t numInGroupMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t numInGroupMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t numInGroupEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t numInGroup() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 2, sizeof(std::uint8_t)); + return (val); + } + + GroupSize &numInGroup(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 2, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, GroupSize writer) + { + builder << '{'; + builder << R"("blockLength": )"; + builder << +writer.blockLength(); + + builder << ", "; + builder << R"("numInGroup": )"; + builder << +writer.numInGroup(); + + builder << '}'; + + return builder; + } + +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/KeepAliveLapsed.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/KeepAliveLapsed.h new file mode 100644 index 000000000..3d1ab4471 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/KeepAliveLapsed.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_KEEPALIVELAPSED_H_ +#define _ILINKBINARY_KEEPALIVELAPSED_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class KeepAliveLapsed +{ +public: + enum Value + { + NotLapsed = (std::uint8_t)0, + Lapsed = (std::uint8_t)1, + NULL_VALUE = (std::uint8_t)255 + }; + + static KeepAliveLapsed::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return NotLapsed; + case 1: return Lapsed; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum KeepAliveLapsed [E103]"); + } + + static const char* c_str(const KeepAliveLapsed::Value value) + { + switch (value) + { + case NotLapsed: return "NotLapsed"; + case Lapsed: return "Lapsed"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum KeepAliveLapsed [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, KeepAliveLapsed::Value m) + { + return os << KeepAliveLapsed::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ListUpdAct.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ListUpdAct.h new file mode 100644 index 000000000..9b0e4cb6e --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ListUpdAct.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_LISTUPDACT_H_ +#define _ILINKBINARY_LISTUPDACT_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class ListUpdAct +{ +public: + enum Value + { + Add = (char)65, + Delete = (char)68, + NULL_VALUE = (char)0 + }; + + static ListUpdAct::Value get(const char value) + { + switch (value) + { + case 65: return Add; + case 68: return Delete; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum ListUpdAct [E103]"); + } + + static const char* c_str(const ListUpdAct::Value value) + { + switch (value) + { + case Add: return "Add"; + case Delete: return "Delete"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ListUpdAct [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, ListUpdAct::Value m) + { + return os << ListUpdAct::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ManualOrdInd.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ManualOrdInd.h new file mode 100644 index 000000000..08c045bd5 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ManualOrdInd.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MANUALORDIND_H_ +#define _ILINKBINARY_MANUALORDIND_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class ManualOrdInd +{ +public: + enum Value + { + Automated = (std::uint8_t)0, + Manual = (std::uint8_t)1, + NULL_VALUE = (std::uint8_t)255 + }; + + static ManualOrdInd::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return Automated; + case 1: return Manual; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum ManualOrdInd [E103]"); + } + + static const char* c_str(const ManualOrdInd::Value value) + { + switch (value) + { + case Automated: return "Automated"; + case Manual: return "Manual"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ManualOrdInd [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, ManualOrdInd::Value m) + { + return os << ManualOrdInd::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ManualOrdIndReq.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ManualOrdIndReq.h new file mode 100644 index 000000000..33c93ca50 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ManualOrdIndReq.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MANUALORDINDREQ_H_ +#define _ILINKBINARY_MANUALORDINDREQ_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class ManualOrdIndReq +{ +public: + enum Value + { + Automated = (std::uint8_t)0, + Manual = (std::uint8_t)1, + NULL_VALUE = (std::uint8_t)255 + }; + + static ManualOrdIndReq::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return Automated; + case 1: return Manual; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum ManualOrdIndReq [E103]"); + } + + static const char* c_str(const ManualOrdIndReq::Value value) + { + switch (value) + { + case Automated: return "Automated"; + case Manual: return "Manual"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ManualOrdIndReq [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, ManualOrdIndReq::Value m) + { + return os << ManualOrdIndReq::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassActionOrdTyp.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassActionOrdTyp.h new file mode 100644 index 000000000..da8111cea --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassActionOrdTyp.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSACTIONORDTYP_H_ +#define _ILINKBINARY_MASSACTIONORDTYP_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class MassActionOrdTyp +{ +public: + enum Value + { + Limit = (char)50, + StopLimit = (char)52, + NULL_VALUE = (char)0 + }; + + static MassActionOrdTyp::Value get(const char value) + { + switch (value) + { + case 50: return Limit; + case 52: return StopLimit; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum MassActionOrdTyp [E103]"); + } + + static const char* c_str(const MassActionOrdTyp::Value value) + { + switch (value) + { + case Limit: return "Limit"; + case StopLimit: return "StopLimit"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum MassActionOrdTyp [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, MassActionOrdTyp::Value m) + { + return os << MassActionOrdTyp::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassActionResponse.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassActionResponse.h new file mode 100644 index 000000000..56eee04bd --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassActionResponse.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSACTIONRESPONSE_H_ +#define _ILINKBINARY_MASSACTIONRESPONSE_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class MassActionResponse +{ +public: + enum Value + { + Rejected = (std::uint8_t)0, + Accepted = (std::uint8_t)1, + NULL_VALUE = (std::uint8_t)255 + }; + + static MassActionResponse::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return Rejected; + case 1: return Accepted; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum MassActionResponse [E103]"); + } + + static const char* c_str(const MassActionResponse::Value value) + { + switch (value) + { + case Rejected: return "Rejected"; + case Accepted: return "Accepted"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum MassActionResponse [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, MassActionResponse::Value m) + { + return os << MassActionResponse::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassActionScope.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassActionScope.h new file mode 100644 index 000000000..01570c90c --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassActionScope.h @@ -0,0 +1,147 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSACTIONSCOPE_H_ +#define _ILINKBINARY_MASSACTIONSCOPE_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class MassActionScope +{ +public: + enum Value + { + Instrument = (std::uint8_t)1, + All = (std::uint8_t)7, + MarketSegmentID = (std::uint8_t)9, + InstrumentGroup = (std::uint8_t)10, + QuoteSetID = (std::uint8_t)100, + NULL_VALUE = (std::uint8_t)255 + }; + + static MassActionScope::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return Instrument; + case 7: return All; + case 9: return MarketSegmentID; + case 10: return InstrumentGroup; + case 100: return QuoteSetID; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum MassActionScope [E103]"); + } + + static const char* c_str(const MassActionScope::Value value) + { + switch (value) + { + case Instrument: return "Instrument"; + case All: return "All"; + case MarketSegmentID: return "MarketSegmentID"; + case InstrumentGroup: return "InstrumentGroup"; + case QuoteSetID: return "QuoteSetID"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum MassActionScope [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, MassActionScope::Value m) + { + return os << MassActionScope::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassCancelTIF.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassCancelTIF.h new file mode 100644 index 000000000..1953ce674 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassCancelTIF.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSCANCELTIF_H_ +#define _ILINKBINARY_MASSCANCELTIF_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class MassCancelTIF +{ +public: + enum Value + { + Day = (std::uint8_t)0, + GoodTillCancel = (std::uint8_t)1, + GoodTillDate = (std::uint8_t)6, + NULL_VALUE = (std::uint8_t)255 + }; + + static MassCancelTIF::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return Day; + case 1: return GoodTillCancel; + case 6: return GoodTillDate; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum MassCancelTIF [E103]"); + } + + static const char* c_str(const MassCancelTIF::Value value) + { + switch (value) + { + case Day: return "Day"; + case GoodTillCancel: return "GoodTillCancel"; + case GoodTillDate: return "GoodTillDate"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum MassCancelTIF [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, MassCancelTIF::Value m) + { + return os << MassCancelTIF::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassCxlReqTyp.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassCxlReqTyp.h new file mode 100644 index 000000000..74c169eed --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassCxlReqTyp.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSCXLREQTYP_H_ +#define _ILINKBINARY_MASSCXLREQTYP_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class MassCxlReqTyp +{ +public: + enum Value + { + SenderSubID = (std::uint8_t)100, + Account = (std::uint8_t)101, + NULL_VALUE = (std::uint8_t)255 + }; + + static MassCxlReqTyp::Value get(const std::uint8_t value) + { + switch (value) + { + case 100: return SenderSubID; + case 101: return Account; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum MassCxlReqTyp [E103]"); + } + + static const char* c_str(const MassCxlReqTyp::Value value) + { + switch (value) + { + case SenderSubID: return "SenderSubID"; + case Account: return "Account"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum MassCxlReqTyp [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, MassCxlReqTyp::Value m) + { + return os << MassCxlReqTyp::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassQuote517.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassQuote517.h new file mode 100644 index 000000000..6bfb55e6b --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassQuote517.h @@ -0,0 +1,2267 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSQUOTE517_H_ +#define _ILINKBINARY_MASSQUOTE517_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 MassQuote517 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + MassQuote517() = default; + + MassQuote517( + 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_actingVersion(actingVersion) + { + } + + MassQuote517(char *buffer, const std::uint64_t bufferLength) : + MassQuote517(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + MassQuote517( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MassQuote517(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)62; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)517; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "i"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + MassQuote517 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MassQuote517(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + MassQuote517 &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 = MassQuote517( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + MassQuote517 &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 = MassQuote517(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + MassQuote517 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + MassQuote517 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + MassQuote517 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + MassQuote517 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + MassQuote517 &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; + } + + MassQuote517 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuote517 &putSenderID(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + MassQuote517 &putSenderID(const std::string& str) + { + const 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 (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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + MassQuote517 "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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + MassQuote517 &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; + } + + MassQuote517 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 49, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 49; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 49; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuote517 &putLocation(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #else + MassQuote517 &putLocation(const std::string& str) + { + const 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 (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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + MassQuote517 "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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)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); + } + + MassQuote517 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 BooleanFlag::Value mMProtectionReset() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 59, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + MassQuote517 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 60, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + MassQuote517 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 61, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + MassQuote517 &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; + } + + class NoQuoteEntries + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)38); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 38; + m_actingVersion = actingVersion; + 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 38; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoQuoteEntries &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * BidPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t bidPxId() SBE_NOEXCEPT + { + return 132; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t bidPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool bidPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= bidPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t bidPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICENULL9 m_bidPx; + +public: + SBE_NODISCARD PRICENULL9 &bidPx() + { + m_bidPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_bidPx; + } + + SBE_NODISCARD static const char * OfferPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t offerPxId() SBE_NOEXCEPT + { + return 133; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t offerPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool offerPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= offerPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t offerPxEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + +private: + PRICENULL9 m_offerPx; + +public: + SBE_NODISCARD PRICENULL9 &offerPx() + { + m_offerPx.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_offerPx; + } + + SBE_NODISCARD static const char * QuoteEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 16; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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 + 16, 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 + 16, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 20; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 20, 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 + 20, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * BidSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t bidSizeId() SBE_NOEXCEPT + { + return 134; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t bidSizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool bidSizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= bidSizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t bidSizeEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::uint32_t bidSizeNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t bidSizeMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t bidSizeMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t bidSizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t bidSize() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries &bidSize(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * OfferSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t offerSizeId() SBE_NOEXCEPT + { + return 135; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t offerSizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool offerSizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= offerSizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t offerSizeEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::uint32_t offerSizeNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t offerSizeMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t offerSizeMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t offerSizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t offerSize() 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); + } + + NoQuoteEntries &offerSize(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 * UnderlyingSecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t underlyingSecurityIDId() SBE_NOEXCEPT + { + return 309; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t underlyingSecurityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool underlyingSecurityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= underlyingSecurityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t underlyingSecurityIDEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR std::int32_t underlyingSecurityIDNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t underlyingSecurityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t underlyingSecurityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t underlyingSecurityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t underlyingSecurityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteEntries &underlyingSecurityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteSetIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 36; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)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 + 36, 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 + 36, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoQuoteEntries writer) + { + builder << '{'; + builder << R"("BidPx": )"; + builder << writer.bidPx(); + + builder << ", "; + builder << R"("OfferPx": )"; + builder << writer.offerPx(); + + builder << ", "; + builder << R"("QuoteEntryID": )"; + builder << +writer.quoteEntryID(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("BidSize": )"; + builder << +writer.bidSize(); + + builder << ", "; + builder << R"("OfferSize": )"; + builder << +writer.offerSize(); + + builder << ", "; + builder << R"("UnderlyingSecurityID": )"; + builder << +writer.underlyingSecurityID(); + + builder << ", "; + builder << R"("QuoteSetID": )"; + builder << +writer.quoteSetID(); + + builder << '}'; + + return builder; + } + }; + +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, MassQuote517 _writer) + { + MassQuote517 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MassQuote517", )"; + 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 << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteEntries": [)"; + writer.noQuoteEntries().forEach([&](NoQuoteEntries& noQuoteEntries) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteEntries; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassQuoteAck545.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassQuoteAck545.h new file mode 100644 index 000000000..e00d47d63 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassQuoteAck545.h @@ -0,0 +1,2801 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSQUOTEACK545_H_ +#define _ILINKBINARY_MASSQUOTEACK545_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 MassQuoteAck545 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + MassQuoteAck545() = default; + + MassQuoteAck545( + 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_actingVersion(actingVersion) + { + } + + MassQuoteAck545(char *buffer, const std::uint64_t bufferLength) : + MassQuoteAck545(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + MassQuoteAck545( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MassQuoteAck545(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)342; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)545; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "b"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + MassQuoteAck545 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MassQuoteAck545(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + MassQuoteAck545 &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 = MassQuoteAck545( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + MassQuoteAck545 &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 = MassQuoteAck545(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + MassQuoteAck545 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + MassQuoteAck545 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + MassQuoteAck545 &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; + } + + MassQuoteAck545 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuoteAck545 &putText(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 256; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + MassQuoteAck545 &putText(const std::string& str) + { + const 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 (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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + MassQuoteAck545 &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; + } + + MassQuoteAck545 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuoteAck545 &putSenderID(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + MassQuoteAck545 &putSenderID(const std::string& str) + { + const 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 (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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + MassQuoteAck545 &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 * RequestTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestTimeId() SBE_NOEXCEPT + { + return 5979; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimeEncodingOffset() SBE_NOEXCEPT + { + return 296; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTime() 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); + } + + MassQuoteAck545 &requestTime(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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + MassQuoteAck545 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + MassQuoteAck545 "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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + MassQuoteAck545 &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; + } + + MassQuoteAck545 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 320, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 320; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 320; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuoteAck545 &putLocation(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 320 + start] = 0; + } + + return *this; + } + #else + MassQuoteAck545 &putLocation(const std::string& str) + { + const 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 (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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + MassQuoteAck545 "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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)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); + } + + MassQuoteAck545 "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 * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 331; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 331, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + MassQuoteAck545 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 331, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 333; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD QuoteAckStatus::Value quoteStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 333, sizeof(std::uint8_t)); + return QuoteAckStatus::get((val)); + } + + MassQuoteAck545 "eStatus(const QuoteAckStatus::Value 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 * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 334; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 334, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + MassQuoteAck545 &manualOrderIndicator(const ManualOrdIndReq::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 * NoProcessedEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 335; + } + + static SBE_CONSTEXPR std::uint8_t noProcessedEntriesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t noProcessedEntriesMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t noProcessedEntriesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)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 + 335, sizeof(std::uint8_t)); + return (val); + } + + MassQuoteAck545 &noProcessedEntries(const std::uint8_t 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 * MMProtectionResetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 336; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mMProtectionResetEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value mMProtectionReset() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 336, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + MassQuoteAck545 &mMProtectionReset(const BooleanFlag::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 * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 337; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 337, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + MassQuoteAck545 &splitMsg(const SplitMsg::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 * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 338; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 338, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + MassQuoteAck545 &liquidityFlag(const BooleanNULL::Value 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 * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 339; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 339, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + MassQuoteAck545 &shortSaleType(const ShortSaleType::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 * TotNoQuoteEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 340; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)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 + 340, sizeof(std::uint8_t)); + return (val); + } + + MassQuoteAck545 &totNoQuoteEntries(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 340, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 2; + } + + 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 341; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + if (m_actingVersion < 2) + { + return BooleanFlag::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 341, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + MassQuoteAck545 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 341, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoQuoteEntries + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)11); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 11; + m_actingVersion = actingVersion; + 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 11; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoQuoteEntries &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * QuoteEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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 + 0, 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 + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 4; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 4, 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 + 4, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteSetIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 8; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)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 + 8, 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 + 8, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteEntryRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 10; + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)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 + 10, 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 + 10, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoQuoteEntries writer) + { + builder << '{'; + builder << R"("QuoteEntryID": )"; + builder << +writer.quoteEntryID(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("QuoteSetID": )"; + builder << +writer.quoteSetID(); + + builder << ", "; + builder << R"("QuoteEntryRejectReason": )"; + builder << +writer.quoteEntryRejectReason(); + + builder << '}'; + + return builder; + } + }; + +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, MassQuoteAck545 _writer) + { + MassQuoteAck545 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MassQuoteAck545", )"; + 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"("RequestTime": )"; + builder << +writer.requestTime(); + + 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"("DelayDuration": )"; + builder << +writer.delayDuration(); + + 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 << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteEntries": [)"; + writer.noQuoteEntries().forEach([&](NoQuoteEntries& noQuoteEntries) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteEntries; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassStatusOrdTyp.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassStatusOrdTyp.h new file mode 100644 index 000000000..0b2c7cc72 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassStatusOrdTyp.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSSTATUSORDTYP_H_ +#define _ILINKBINARY_MASSSTATUSORDTYP_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class MassStatusOrdTyp +{ +public: + enum Value + { + SenderSubID = (std::uint8_t)100, + Account = (std::uint8_t)101, + NULL_VALUE = (std::uint8_t)255 + }; + + static MassStatusOrdTyp::Value get(const std::uint8_t value) + { + switch (value) + { + case 100: return SenderSubID; + case 101: return Account; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum MassStatusOrdTyp [E103]"); + } + + static const char* c_str(const MassStatusOrdTyp::Value value) + { + switch (value) + { + case SenderSubID: return "SenderSubID"; + case Account: return "Account"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum MassStatusOrdTyp [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, MassStatusOrdTyp::Value m) + { + return os << MassStatusOrdTyp::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassStatusReqTyp.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassStatusReqTyp.h new file mode 100644 index 000000000..f9c6a2f0f --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassStatusReqTyp.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSSTATUSREQTYP_H_ +#define _ILINKBINARY_MASSSTATUSREQTYP_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class MassStatusReqTyp +{ +public: + enum Value + { + Instrument = (std::uint8_t)1, + InstrumentGroup = (std::uint8_t)3, + MarketSegment = (std::uint8_t)100, + NULL_VALUE = (std::uint8_t)255 + }; + + static MassStatusReqTyp::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return Instrument; + case 3: return InstrumentGroup; + case 100: return MarketSegment; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum MassStatusReqTyp [E103]"); + } + + static const char* c_str(const MassStatusReqTyp::Value value) + { + switch (value) + { + case Instrument: return "Instrument"; + case InstrumentGroup: return "InstrumentGroup"; + case MarketSegment: return "MarketSegment"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum MassStatusReqTyp [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, MassStatusReqTyp::Value m) + { + return os << MassStatusReqTyp::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassStatusTIF.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassStatusTIF.h new file mode 100644 index 000000000..ba3a93dab --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MassStatusTIF.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MASSSTATUSTIF_H_ +#define _ILINKBINARY_MASSSTATUSTIF_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class MassStatusTIF +{ +public: + enum Value + { + Day = (std::uint8_t)0, + GTC = (std::uint8_t)1, + GTD = (std::uint8_t)6, + NULL_VALUE = (std::uint8_t)255 + }; + + static MassStatusTIF::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return Day; + case 1: return GTC; + case 6: return GTD; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum MassStatusTIF [E103]"); + } + + static const char* c_str(const MassStatusTIF::Value value) + { + switch (value) + { + case Day: return "Day"; + case GTC: return "GTC"; + case GTD: return "GTD"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum MassStatusTIF [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, MassStatusTIF::Value m) + { + return os << MassStatusTIF::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/MaturityMonthYear.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MaturityMonthYear.h new file mode 100644 index 000000000..3af6bf92e --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MaturityMonthYear.h @@ -0,0 +1,507 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MATURITYMONTHYEAR_H_ +#define _ILINKBINARY_MATURITYMONTHYEAR_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class MaturityMonthYear +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + 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; + }; + + MaturityMonthYear() = default; + + MaturityMonthYear( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 5) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + MaturityMonthYear( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + MaturityMonthYear(buffer, 0, bufferLength, actingVersion) + { + } + + MaturityMonthYear( + char *buffer, + const std::uint64_t bufferLength) : + MaturityMonthYear(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + MaturityMonthYear &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MaturityMonthYear(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + 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 SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static const char * yearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t yearSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool yearInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= yearSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t yearEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint16_t yearNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t yearMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t yearMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t yearEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t year() 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); + } + + MaturityMonthYear &year(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; + } + + SBE_NODISCARD static const char * monthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t monthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool monthInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= monthSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t monthEncodingOffset() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint8_t monthNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t monthMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t monthMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t monthEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t month() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 2, sizeof(std::uint8_t)); + return (val); + } + + MaturityMonthYear &month(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 2, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * dayMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t daySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool dayInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= daySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t dayEncodingOffset() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint8_t dayNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t dayMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t dayMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t dayEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t day() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 3, sizeof(std::uint8_t)); + return (val); + } + + MaturityMonthYear &day(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 3, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * weekMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t weekSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool weekInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= weekSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t weekEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint8_t weekNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t weekMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t weekMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t weekEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t week() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint8_t)); + return (val); + } + + MaturityMonthYear &week(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, MaturityMonthYear writer) + { + builder << '{'; + builder << R"("year": )"; + builder << +writer.year(); + + builder << ", "; + builder << R"("month": )"; + builder << +writer.month(); + + builder << ", "; + builder << R"("day": )"; + builder << +writer.day(); + + builder << ", "; + builder << R"("week": )"; + builder << +writer.week(); + + builder << '}'; + + return builder; + } + +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/MessageHeader.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MessageHeader.h new file mode 100644 index 000000000..cf1b431c4 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/MessageHeader.h @@ -0,0 +1,507 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_MESSAGEHEADER_H_ +#define _ILINKBINARY_MESSAGEHEADER_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class MessageHeader +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + 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; + }; + + MessageHeader() = default; + + MessageHeader( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + MessageHeader( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + MessageHeader(buffer, 0, bufferLength, actingVersion) + { + } + + MessageHeader( + char *buffer, + const std::uint64_t bufferLength) : + MessageHeader(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + MessageHeader &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MessageHeader(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + 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 SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static const char * blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t blockLengthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool blockLengthInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= blockLengthSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t blockLengthEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint16_t blockLengthNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t blockLengthMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t blockLengthMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t blockLengthEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t blockLength() 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); + } + + MessageHeader &blockLength(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; + } + + SBE_NODISCARD static const char * templateIdMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t templateIdSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool templateIdInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= templateIdSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t templateIdEncodingOffset() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint16_t templateIdNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t templateIdMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t templateIdMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t templateIdEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t templateId() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 2, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + MessageHeader &templateId(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 2, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * schemaIdMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t schemaIdSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool schemaIdInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= schemaIdSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t schemaIdEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint16_t schemaIdNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t schemaIdMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t schemaIdMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t schemaIdEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t schemaId() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + MessageHeader &schemaId(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * versionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t versionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool versionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= versionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t versionEncodingOffset() SBE_NOEXCEPT + { + return 6; + } + + static SBE_CONSTEXPR std::uint16_t versionNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t versionMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t versionMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t versionEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t version() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 6, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + MessageHeader &version(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 6, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, MessageHeader writer) + { + builder << '{'; + builder << R"("blockLength": )"; + builder << +writer.blockLength(); + + builder << ", "; + builder << R"("templateId": )"; + builder << +writer.templateId(); + + builder << ", "; + builder << R"("schemaId": )"; + builder << +writer.schemaId(); + + builder << ", "; + builder << R"("version": )"; + builder << +writer.version(); + + builder << '}'; + + return builder; + } + +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/Negotiate500.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/Negotiate500.h new file mode 100644 index 000000000..f2b8927b7 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/Negotiate500.h @@ -0,0 +1,1808 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_NEGOTIATE500_H_ +#define _ILINKBINARY_NEGOTIATE500_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 Negotiate500 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + Negotiate500() = default; + + Negotiate500( + 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_actingVersion(actingVersion) + { + } + + Negotiate500(char *buffer, const std::uint64_t bufferLength) : + Negotiate500(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + Negotiate500( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + Negotiate500(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)76; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)500; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "Negotiate"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + Negotiate500 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = Negotiate500(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + Negotiate500 &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 = Negotiate500( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + Negotiate500 &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 = Negotiate500(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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 * CustomerFlowMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t customerFlowId() SBE_NOEXCEPT + { + return 39000; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t customerFlowSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool customerFlowInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= customerFlowSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t customerFlowEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char customerFlowNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char customerFlowMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char customerFlowMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t customerFlowEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t customerFlowLength() SBE_NOEXCEPT + { + return 10; + } + + SBE_NODISCARD const char *customerFlow() const + { + static const std::uint8_t customerFlowValues[] = { 73, 68, 69, 77, 80, 79, 84, 69, 78, 84 }; + + return (const char *)customerFlowValues; + } + + SBE_NODISCARD char customerFlow(const std::uint64_t index) const + { + static const std::uint8_t customerFlowValues[] = { 73, 68, 69, 77, 80, 79, 84, 69, 78, 84 }; + + return (char)customerFlowValues[index]; + } + + std::uint64_t getCustomerFlow(char *dst, const std::uint64_t length) const + { + static std::uint8_t customerFlowValues[] = { 73, 68, 69, 77, 80, 79, 84, 69, 78, 84 }; + std::uint64_t bytesToCopy = length < sizeof(customerFlowValues) ? length : sizeof(customerFlowValues); + + std::memcpy(dst, customerFlowValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getCustomerFlowAsString() const + { + static const std::uint8_t CustomerFlowValues[] = { 73, 68, 69, 77, 80, 79, 84, 69, 78, 84 }; + + return std::string((const char *)CustomerFlowValues, 10); + } + + std::string getCustomerFlowAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCustomerFlowAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * HMACVersionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t hMACVersionId() SBE_NOEXCEPT + { + return 39003; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hMACVersionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hMACVersionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hMACVersionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hMACVersionEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char hMACVersionNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char hMACVersionMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char hMACVersionMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t hMACVersionEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t hMACVersionLength() SBE_NOEXCEPT + { + return 13; + } + + SBE_NODISCARD const char *hMACVersion() const + { + static const std::uint8_t hMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54 }; + + return (const char *)hMACVersionValues; + } + + SBE_NODISCARD char hMACVersion(const std::uint64_t index) const + { + static const std::uint8_t hMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54 }; + + return (char)hMACVersionValues[index]; + } + + std::uint64_t getHMACVersion(char *dst, const std::uint64_t length) const + { + static std::uint8_t hMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54 }; + std::uint64_t bytesToCopy = length < sizeof(hMACVersionValues) ? length : sizeof(hMACVersionValues); + + std::memcpy(dst, hMACVersionValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getHMACVersionAsString() const + { + static const std::uint8_t HMACVersionValues[] = { 67, 77, 69, 45, 49, 45, 83, 72, 65, 45, 50, 53, 54 }; + + return std::string((const char *)HMACVersionValues, 13); + } + + std::string getHMACVersionAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getHMACVersionAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * HMACSignatureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t hMACSignatureId() SBE_NOEXCEPT + { + return 39005; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t hMACSignatureSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool hMACSignatureInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= hMACSignatureSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t hMACSignatureEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char hMACSignatureNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char hMACSignatureMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char hMACSignatureMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t hMACSignatureEncodingLength() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR std::uint64_t hMACSignatureLength() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD const char *hMACSignature() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *hMACSignature() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char hMACSignature(const std::uint64_t index) const + { + if (index >= 32) + { + throw std::runtime_error("index out of range for hMACSignature [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + Negotiate500 &hMACSignature(const std::uint64_t index, const char value) + { + if (index >= 32) + { + throw std::runtime_error("index out of range for hMACSignature [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getHMACSignature(char *const dst, const std::uint64_t length) const + { + if (length > 32) + { + throw std::runtime_error("length too large for getHMACSignature [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + Negotiate500 &putHMACSignature(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 32); + return *this; + } + + std::string getHMACSignatureAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 32 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getHMACSignatureAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getHMACSignatureAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getHMACSignatureAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 32 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Negotiate500 &putHMACSignature(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 32) + { + throw std::runtime_error("string too large for putHMACSignature [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 32; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + Negotiate500 &putHMACSignature(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 32) + { + throw std::runtime_error("string too large for putHMACSignature [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 32; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * AccessKeyIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t accessKeyIDId() SBE_NOEXCEPT + { + return 39004; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t accessKeyIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool accessKeyIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= accessKeyIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t accessKeyIDEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR char accessKeyIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char accessKeyIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char accessKeyIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t accessKeyIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t accessKeyIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *accessKeyID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 32; + } + + SBE_NODISCARD char *accessKeyID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 32; + } + + SBE_NODISCARD char accessKeyID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for accessKeyID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 32 + (index * 1), sizeof(char)); + return (val); + } + + Negotiate500 &accessKeyID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for accessKeyID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 32 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getAccessKeyID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getAccessKeyID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 32, sizeof(char) * static_cast(length)); + return length; + } + + Negotiate500 &putAccessKeyID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 32, src, sizeof(char) * 20); + return *this; + } + + std::string getAccessKeyIDAsString() const + { + const char *buffer = m_buffer + m_offset + 32; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getAccessKeyIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getAccessKeyIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getAccessKeyIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 32; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Negotiate500 &putAccessKeyID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putAccessKeyID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 32, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 32 + start] = 0; + } + + return *this; + } + #else + Negotiate500 &putAccessKeyID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putAccessKeyID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 32, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 32 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 52; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 52, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Negotiate500 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 52, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 60; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 60, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Negotiate500 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 60, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SessionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t sessionId() SBE_NOEXCEPT + { + return 39006; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sessionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sessionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sessionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sessionEncodingOffset() SBE_NOEXCEPT + { + return 68; + } + + static SBE_CONSTEXPR char sessionNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char sessionMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char sessionMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t sessionEncodingLength() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sessionLength() SBE_NOEXCEPT + { + return 3; + } + + SBE_NODISCARD const char *session() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 68; + } + + SBE_NODISCARD char *session() SBE_NOEXCEPT + { + return m_buffer + m_offset + 68; + } + + SBE_NODISCARD char session(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for session [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 68 + (index * 1), sizeof(char)); + return (val); + } + + Negotiate500 &session(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for session [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 68 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSession(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getSession [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 68, sizeof(char) * static_cast(length)); + return length; + } + + Negotiate500 &putSession(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 68, src, sizeof(char) * 3); + return *this; + } + + Negotiate500 &putSession( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 68, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 69, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 70, &val2, sizeof(char)); + + return *this; + } + + std::string getSessionAsString() const + { + const char *buffer = m_buffer + m_offset + 68; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSessionAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSessionAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSessionAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 68; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Negotiate500 &putSession(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putSession [E106]"); + } + + std::memcpy(m_buffer + m_offset + 68, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 68 + start] = 0; + } + + return *this; + } + #else + Negotiate500 &putSession(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putSession [E106]"); + } + + std::memcpy(m_buffer + m_offset + 68, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 68 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FirmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t firmId() SBE_NOEXCEPT + { + return 39007; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t firmSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool firmInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= firmSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t firmEncodingOffset() SBE_NOEXCEPT + { + return 71; + } + + static SBE_CONSTEXPR char firmNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char firmMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char firmMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t firmEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t firmLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *firm() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 71; + } + + SBE_NODISCARD char *firm() SBE_NOEXCEPT + { + return m_buffer + m_offset + 71; + } + + SBE_NODISCARD char firm(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for firm [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 71 + (index * 1), sizeof(char)); + return (val); + } + + Negotiate500 &firm(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for firm [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 71 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFirm(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getFirm [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 71, sizeof(char) * static_cast(length)); + return length; + } + + Negotiate500 &putFirm(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 71, src, sizeof(char) * 5); + return *this; + } + + std::string getFirmAsString() const + { + const char *buffer = m_buffer + m_offset + 71; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFirmAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFirmAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getFirmAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 71; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Negotiate500 &putFirm(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putFirm [E106]"); + } + + std::memcpy(m_buffer + m_offset + 71, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 71 + start] = 0; + } + + return *this; + } + #else + Negotiate500 &putFirm(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putFirm [E106]"); + } + + std::memcpy(m_buffer + m_offset + 71, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 71 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * CredentialsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return "unix"; + case MetaAttribute::TIME_UNIT: return "nanosecond"; + case MetaAttribute::SEMANTIC_TYPE: return "data"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static const char *credentialsCharacterEncoding() SBE_NOEXCEPT + { + return "US-ASCII"; + } + + static SBE_CONSTEXPR std::uint64_t credentialsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + bool credentialsInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= credentialsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + static SBE_CONSTEXPR std::uint16_t credentialsId() SBE_NOEXCEPT + { + return 39008; + } + + static SBE_CONSTEXPR std::uint64_t credentialsHeaderLength() SBE_NOEXCEPT + { + return 2; + } + + std::uint16_t credentialsLength() const + { + std::uint16_t length; + std::memcpy(&length, m_buffer + sbePosition(), sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(length); + } + + std::uint64_t skipCredentials() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + sbePosition(lengthPosition + lengthOfLengthField + dataLength); + return dataLength; + } + + SBE_NODISCARD const char *credentials() + { + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + sbePosition(), sizeof(std::uint16_t)); + const char *fieldPtr = m_buffer + sbePosition() + 2; + sbePosition(sbePosition() + 2 + SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue)); + return fieldPtr; + } + + std::uint64_t getCredentials(char *dst, const std::uint64_t length) + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t bytesToCopy = length < dataLength ? length : dataLength; + std::uint64_t pos = sbePosition(); + sbePosition(pos + dataLength); + std::memcpy(dst, m_buffer + pos, static_cast(bytesToCopy)); + return bytesToCopy; + } + + Negotiate500 &putCredentials(const char *src, const std::uint16_t length) + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + std::uint16_t lengthFieldValue = SBE_LITTLE_ENDIAN_ENCODE_16(length); + sbePosition(lengthPosition + lengthOfLengthField); + std::memcpy(m_buffer + lengthPosition, &lengthFieldValue, sizeof(std::uint16_t)); + std::uint64_t pos = sbePosition(); + sbePosition(pos + length); + std::memcpy(m_buffer + pos, src, length); + return *this; + } + + std::string getCredentialsAsString() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t pos = sbePosition(); + const std::string result(m_buffer + pos, dataLength); + sbePosition(pos + dataLength); + return result; + } + + std::string getCredentialsAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCredentialsAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getCredentialsAsStringView() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t pos = sbePosition(); + const std::string_view result(m_buffer + pos, dataLength); + sbePosition(pos + dataLength); + return result; + } + #endif + + Negotiate500 &putCredentials(const std::string& str) + { + if (str.length() > 65534) + { + throw std::runtime_error("std::string too long for length type [E109]"); + } + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + std::uint16_t lengthFieldValue = SBE_LITTLE_ENDIAN_ENCODE_16(static_cast(str.length())); + sbePosition(lengthPosition + lengthOfLengthField); + std::memcpy(m_buffer + lengthPosition, &lengthFieldValue, sizeof(std::uint16_t)); + std::uint64_t pos = sbePosition(); + sbePosition(pos + str.length()); + std::memcpy(m_buffer + pos, str.c_str(), str.length()); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, Negotiate500 _writer) + { + Negotiate500 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "Negotiate500", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("HMACSignature": )"; + builder << '"' << + writer.getHMACSignatureAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("AccessKeyID": )"; + builder << '"' << + writer.getAccessKeyIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("Session": )"; + builder << '"' << + writer.getSessionAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Firm": )"; + builder << '"' << + writer.getFirmAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Credentials": )"; + builder << '"' << + writer.getCredentialsAsJsonEscapedString().c_str() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/NegotiationReject502.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/NegotiationReject502.h new file mode 100644 index 000000000..c46dd806f --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/NegotiationReject502.h @@ -0,0 +1,914 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_NEGOTIATIONREJECT502_H_ +#define _ILINKBINARY_NEGOTIATIONREJECT502_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 NegotiationReject502 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + NegotiationReject502() = default; + + NegotiationReject502( + 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_actingVersion(actingVersion) + { + } + + NegotiationReject502(char *buffer, const std::uint64_t bufferLength) : + NegotiationReject502(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + NegotiationReject502( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + NegotiationReject502(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)68; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)502; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "NegotiationReject"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + NegotiationReject502 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = NegotiationReject502(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + NegotiationReject502 &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 = NegotiationReject502( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + NegotiationReject502 &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 = NegotiationReject502(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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 * ReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t reasonId() SBE_NOEXCEPT + { + return 39011; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool reasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reasonEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char reasonNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char reasonMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char reasonMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t reasonEncodingLength() SBE_NOEXCEPT + { + return 48; + } + + static SBE_CONSTEXPR std::uint64_t reasonLength() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD const char *reason() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *reason() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char reason(const std::uint64_t index) const + { + if (index >= 48) + { + throw std::runtime_error("index out of range for reason [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NegotiationReject502 &reason(const std::uint64_t index, const char value) + { + if (index >= 48) + { + throw std::runtime_error("index out of range for reason [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getReason(char *const dst, const std::uint64_t length) const + { + if (length > 48) + { + throw std::runtime_error("length too large for getReason [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NegotiationReject502 &putReason(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 48); + return *this; + } + + std::string getReasonAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 48 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getReasonAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getReasonAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getReasonAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 48 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NegotiationReject502 &putReason(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 48) + { + throw std::runtime_error("string too large for putReason [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 48; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NegotiationReject502 &putReason(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 48) + { + throw std::runtime_error("string too large for putReason [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 48; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 48; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 48, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NegotiationReject502 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 48, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 56; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 56, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NegotiationReject502 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 56, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ErrorCodesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesId() SBE_NOEXCEPT + { + return 39012; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t errorCodesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool errorCodesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= errorCodesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t errorCodesEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t errorCodesEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t errorCodes() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NegotiationReject502 &errorCodes(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t faultToleranceIndicatorId() SBE_NOEXCEPT + { + return 39010; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t faultToleranceIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool faultToleranceIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= faultToleranceIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 66; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD FTI::Value faultToleranceIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t)); + return FTI::get((val)); + } + + NegotiationReject502 &faultToleranceIndicator(const FTI::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 66, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 67; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 67, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + NegotiationReject502 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 67, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NegotiationReject502 _writer) + { + NegotiationReject502 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "NegotiationReject502", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("Reason": )"; + builder << '"' << + writer.getReasonAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("ErrorCodes": )"; + builder << +writer.errorCodes(); + + builder << ", "; + builder << R"("FaultToleranceIndicator": )"; + builder << '"' << writer.faultToleranceIndicator() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/NegotiationResponse501.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/NegotiationResponse501.h new file mode 100644 index 000000000..acf62ce31 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/NegotiationResponse501.h @@ -0,0 +1,1169 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_NEGOTIATIONRESPONSE501_H_ +#define _ILINKBINARY_NEGOTIATIONRESPONSE501_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 NegotiationResponse501 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + NegotiationResponse501() = default; + + NegotiationResponse501( + 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_actingVersion(actingVersion) + { + } + + NegotiationResponse501(char *buffer, const std::uint64_t bufferLength) : + NegotiationResponse501(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + NegotiationResponse501( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + NegotiationResponse501(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)501; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "NegotiationResponse"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + NegotiationResponse501 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = NegotiationResponse501(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + NegotiationResponse501 &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 = NegotiationResponse501( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + NegotiationResponse501 &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 = NegotiationResponse501(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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 * ServerFlowMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t serverFlowId() SBE_NOEXCEPT + { + return 39009; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t serverFlowSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool serverFlowInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= serverFlowSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t serverFlowEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char serverFlowNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char serverFlowMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char serverFlowMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t serverFlowEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t serverFlowLength() SBE_NOEXCEPT + { + return 11; + } + + SBE_NODISCARD const char *serverFlow() const + { + static const std::uint8_t serverFlowValues[] = { 82, 69, 67, 79, 86, 69, 82, 65, 66, 76, 69 }; + + return (const char *)serverFlowValues; + } + + SBE_NODISCARD char serverFlow(const std::uint64_t index) const + { + static const std::uint8_t serverFlowValues[] = { 82, 69, 67, 79, 86, 69, 82, 65, 66, 76, 69 }; + + return (char)serverFlowValues[index]; + } + + std::uint64_t getServerFlow(char *dst, const std::uint64_t length) const + { + static std::uint8_t serverFlowValues[] = { 82, 69, 67, 79, 86, 69, 82, 65, 66, 76, 69 }; + std::uint64_t bytesToCopy = length < sizeof(serverFlowValues) ? length : sizeof(serverFlowValues); + + std::memcpy(dst, serverFlowValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getServerFlowAsString() const + { + static const std::uint8_t ServerFlowValues[] = { 82, 69, 67, 79, 86, 69, 82, 65, 66, 76, 69 }; + + return std::string((const char *)ServerFlowValues, 11); + } + + std::string getServerFlowAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getServerFlowAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NegotiationResponse501 &uUID(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 * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() 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); + } + + NegotiationResponse501 &requestTimestamp(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 * SecretKeySecureIDExpirationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationId() SBE_NOEXCEPT + { + return 39022; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t secretKeySecureIDExpirationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool secretKeySecureIDExpirationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= secretKeySecureIDExpirationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t secretKeySecureIDExpirationEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t secretKeySecureIDExpirationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t secretKeySecureIDExpirationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t secretKeySecureIDExpiration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NegotiationResponse501 &secretKeySecureIDExpiration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t faultToleranceIndicatorId() SBE_NOEXCEPT + { + return 39010; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t faultToleranceIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool faultToleranceIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= faultToleranceIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD FTI::Value faultToleranceIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); + return FTI::get((val)); + } + + NegotiationResponse501 &faultToleranceIndicator(const FTI::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 * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 19; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 19, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + NegotiationResponse501 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 19, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PreviousSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t previousSeqNoId() SBE_NOEXCEPT + { + return 39021; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t previousSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool previousSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= previousSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t previousSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint32_t previousSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t previousSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t previousSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t previousSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t previousSeqNo() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NegotiationResponse501 &previousSeqNo(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * PreviousUUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t previousUUIDId() SBE_NOEXCEPT + { + return 39015; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t previousUUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool previousUUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= previousUUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t previousUUIDEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::uint64_t previousUUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t previousUUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t previousUUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t previousUUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t previousUUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NegotiationResponse501 &previousUUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CredentialsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return "unix"; + case MetaAttribute::TIME_UNIT: return "nanosecond"; + case MetaAttribute::SEMANTIC_TYPE: return "data"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static const char *credentialsCharacterEncoding() SBE_NOEXCEPT + { + return "US-ASCII"; + } + + static SBE_CONSTEXPR std::uint64_t credentialsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + bool credentialsInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= credentialsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + static SBE_CONSTEXPR std::uint16_t credentialsId() SBE_NOEXCEPT + { + return 39008; + } + + static SBE_CONSTEXPR std::uint64_t credentialsHeaderLength() SBE_NOEXCEPT + { + return 2; + } + + std::uint16_t credentialsLength() const + { + std::uint16_t length; + std::memcpy(&length, m_buffer + sbePosition(), sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(length); + } + + std::uint64_t skipCredentials() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + sbePosition(lengthPosition + lengthOfLengthField + dataLength); + return dataLength; + } + + SBE_NODISCARD const char *credentials() + { + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + sbePosition(), sizeof(std::uint16_t)); + const char *fieldPtr = m_buffer + sbePosition() + 2; + sbePosition(sbePosition() + 2 + SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue)); + return fieldPtr; + } + + std::uint64_t getCredentials(char *dst, const std::uint64_t length) + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t bytesToCopy = length < dataLength ? length : dataLength; + std::uint64_t pos = sbePosition(); + sbePosition(pos + dataLength); + std::memcpy(dst, m_buffer + pos, static_cast(bytesToCopy)); + return bytesToCopy; + } + + NegotiationResponse501 &putCredentials(const char *src, const std::uint16_t length) + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + std::uint16_t lengthFieldValue = SBE_LITTLE_ENDIAN_ENCODE_16(length); + sbePosition(lengthPosition + lengthOfLengthField); + std::memcpy(m_buffer + lengthPosition, &lengthFieldValue, sizeof(std::uint16_t)); + std::uint64_t pos = sbePosition(); + sbePosition(pos + length); + std::memcpy(m_buffer + pos, src, length); + return *this; + } + + std::string getCredentialsAsString() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t pos = sbePosition(); + const std::string result(m_buffer + pos, dataLength); + sbePosition(pos + dataLength); + return result; + } + + std::string getCredentialsAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCredentialsAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getCredentialsAsStringView() + { + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + sbePosition(lengthPosition + lengthOfLengthField); + std::uint16_t lengthFieldValue; + std::memcpy(&lengthFieldValue, m_buffer + lengthPosition, sizeof(std::uint16_t)); + std::uint64_t dataLength = SBE_LITTLE_ENDIAN_ENCODE_16(lengthFieldValue); + std::uint64_t pos = sbePosition(); + const std::string_view result(m_buffer + pos, dataLength); + sbePosition(pos + dataLength); + return result; + } + #endif + + NegotiationResponse501 &putCredentials(const std::string& str) + { + if (str.length() > 65534) + { + throw std::runtime_error("std::string too long for length type [E109]"); + } + std::uint64_t lengthOfLengthField = 2; + std::uint64_t lengthPosition = sbePosition(); + std::uint16_t lengthFieldValue = SBE_LITTLE_ENDIAN_ENCODE_16(static_cast(str.length())); + sbePosition(lengthPosition + lengthOfLengthField); + std::memcpy(m_buffer + lengthPosition, &lengthFieldValue, sizeof(std::uint16_t)); + std::uint64_t pos = sbePosition(); + sbePosition(pos + str.length()); + std::memcpy(m_buffer + pos, str.c_str(), str.length()); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NegotiationResponse501 _writer) + { + NegotiationResponse501 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "NegotiationResponse501", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("SecretKeySecureIDExpiration": )"; + builder << +writer.secretKeySecureIDExpiration(); + + builder << ", "; + builder << R"("FaultToleranceIndicator": )"; + builder << '"' << writer.faultToleranceIndicator() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("PreviousSeqNo": )"; + builder << +writer.previousSeqNo(); + + builder << ", "; + builder << R"("PreviousUUID": )"; + builder << +writer.previousUUID(); + + builder << ", "; + builder << R"("Credentials": )"; + builder << '"' << + writer.getCredentialsAsJsonEscapedString().c_str() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/NewOrderCross544.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/NewOrderCross544.h new file mode 100644 index 000000000..70dd71e54 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/NewOrderCross544.h @@ -0,0 +1,2436 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_NEWORDERCROSS544_H_ +#define _ILINKBINARY_NEWORDERCROSS544_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 NewOrderCross544 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + NewOrderCross544() = default; + + NewOrderCross544( + 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_actingVersion(actingVersion) + { + } + + NewOrderCross544(char *buffer, const std::uint64_t bufferLength) : + NewOrderCross544(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + NewOrderCross544( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + NewOrderCross544(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)74; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)544; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "c"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + NewOrderCross544 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = NewOrderCross544(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + NewOrderCross544 &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 = NewOrderCross544( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + NewOrderCross544 &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 = NewOrderCross544(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t crossIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + NewOrderCross544 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + NewOrderCross544 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + NewOrderCross544 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + NewOrderCross544 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + NewOrderCross544 &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; + } + + NewOrderCross544 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NewOrderCross544 &putSenderID(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + NewOrderCross544 &putSenderID(const std::string& str) + { + const 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 (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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char ordTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char ordTypeMaxValue() SBE_NOEXCEPT + { + return (char)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 }; + + return (const char *)ordTypeValues; + } + + SBE_NODISCARD char ordType(const std::uint64_t index) const + { + static const std::uint8_t ordTypeValues[] = { 50 }; + + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t crossTypeId() SBE_NOEXCEPT + { + return 549; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t crossTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + 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; + } + + static SBE_CONSTEXPR char crossTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char crossTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char crossTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t crossTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t crossTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *crossType() const + { + static const std::uint8_t crossTypeValues[] = { 51 }; + + return (const char *)crossTypeValues; + } + + SBE_NODISCARD char crossType(const std::uint64_t index) const + { + static const std::uint8_t crossTypeValues[] = { 51 }; + + return (char)crossTypeValues[index]; + } + + std::uint64_t getCrossType(char *dst, const std::uint64_t length) const + { + static std::uint8_t crossTypeValues[] = { 51 }; + std::uint64_t bytesToCopy = length < sizeof(crossTypeValues) ? length : sizeof(crossTypeValues); + + std::memcpy(dst, crossTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getCrossTypeAsString() const + { + static const std::uint8_t CrossTypeValues[] = { 51 }; + + return std::string((const char *)CrossTypeValues, 1); + } + + std::string getCrossTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCrossTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * CrossPrioritizationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + 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 41; + } + + static SBE_CONSTEXPR char crossPrioritizationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char crossPrioritizationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char crossPrioritizationMaxValue() SBE_NOEXCEPT + { + return (char)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 }; + + return (const char *)crossPrioritizationValues; + } + + SBE_NODISCARD char crossPrioritization(const std::uint64_t index) const + { + static const std::uint8_t crossPrioritizationValues[] = { 48 }; + + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 41; + } + +private: + PRICE9 m_price; + +public: + SBE_NODISCARD PRICE9 &price() + { + m_price.wrap(m_buffer, m_offset + 41, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * TransBkdTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t transBkdTimeId() SBE_NOEXCEPT + { + return 483; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transBkdTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transBkdTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= transBkdTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transBkdTimeEncodingOffset() SBE_NOEXCEPT + { + return 49; + } + + static SBE_CONSTEXPR std::uint64_t transBkdTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transBkdTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transBkdTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t transBkdTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transBkdTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 49, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NewOrderCross544 &transBkdTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 49, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 57; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 57, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NewOrderCross544 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 57, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 65; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 65; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 65; + } + + 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 + 65 + (index * 1), sizeof(char)); + return (val); + } + + NewOrderCross544 &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 + 65 + (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 + 65, sizeof(char) * static_cast(length)); + return length; + } + + NewOrderCross544 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 65, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 65; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 65; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NewOrderCross544 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 65, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 65 + start] = 0; + } + + return *this; + } + #else + NewOrderCross544 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 65, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 65 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 70; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 70, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NewOrderCross544 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 70, &val, sizeof(std::int32_t)); + return *this; + } + + class NoSides + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)34); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 34; + m_actingVersion = actingVersion; + 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 + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoSides &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + 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 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoSides &putClOrdID(const std::string& str) + { + const 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 (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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 SideReq::Value side() const SBE_NOEXCEPT + { + 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 SideTimeInForce::Value sideTimeInForce() const SBE_NOEXCEPT + { + 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; + } + }; + +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, NewOrderCross544 _writer) + { + NewOrderCross544 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "NewOrderCross544", )"; + 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"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("TransBkdTime": )"; + builder << +writer.transBkdTime(); + + 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; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/NewOrderSingle514.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/NewOrderSingle514.h new file mode 100644 index 000000000..11fe3ae0f --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/NewOrderSingle514.h @@ -0,0 +1,2355 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_NEWORDERSINGLE514_H_ +#define _ILINKBINARY_NEWORDERSINGLE514_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 NewOrderSingle514 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + NewOrderSingle514() = default; + + NewOrderSingle514( + 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_actingVersion(actingVersion) + { + } + + NewOrderSingle514(char *buffer, const std::uint64_t bufferLength) : + NewOrderSingle514(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + NewOrderSingle514( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + NewOrderSingle514(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)116; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)514; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "D"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + NewOrderSingle514 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = NewOrderSingle514(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + NewOrderSingle514 &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 = NewOrderSingle514( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + NewOrderSingle514 &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 = NewOrderSingle514(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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 * PriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + +private: + PRICENULL9 m_price; + +public: + SBE_NODISCARD PRICENULL9 &price() + { + m_price.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 8; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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 + 8, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NewOrderSingle514 &orderQty(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 * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 12; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 12, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NewOrderSingle514 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + NewOrderSingle514 &side(const SideReq::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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + NewOrderSingle514 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + NewOrderSingle514 &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; + } + + NewOrderSingle514 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NewOrderSingle514 &putSenderID(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + NewOrderSingle514 &putSenderID(const std::string& str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 41; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 41; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 41; + } + + 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 + 41 + (index * 1), sizeof(char)); + return (val); + } + + NewOrderSingle514 &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 + 41 + (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 + 41, sizeof(char) * static_cast(length)); + return length; + } + + NewOrderSingle514 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 41, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 41; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 41; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NewOrderSingle514 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 41, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #else + NewOrderSingle514 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 41, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 61; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 61, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NewOrderSingle514 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 61, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 69; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 69, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NewOrderSingle514 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 69, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 77; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 77, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NewOrderSingle514 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 77, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 85; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 85, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 93; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 93; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 93; + } + + 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 + 93 + (index * 1), sizeof(char)); + return (val); + } + + NewOrderSingle514 &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 + 93 + (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 + 93, sizeof(char) * static_cast(length)); + return length; + } + + NewOrderSingle514 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 93, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 93; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 93; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NewOrderSingle514 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 93, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 93 + start] = 0; + } + + return *this; + } + #else + NewOrderSingle514 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 93, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 93 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t minQtyId() SBE_NOEXCEPT + { + return 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= minQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minQtyEncodingOffset() SBE_NOEXCEPT + { + return 98; + } + + static SBE_CONSTEXPR std::uint32_t minQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t minQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t minQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 98, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NewOrderSingle514 &minQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 98, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t displayQtyId() SBE_NOEXCEPT + { + return 1138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool displayQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= displayQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayQtyEncodingOffset() SBE_NOEXCEPT + { + return 102; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t displayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t displayQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 102, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NewOrderSingle514 &displayQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 102, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 106; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 106, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NewOrderSingle514 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 106, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 108; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderTypeReq::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 108, sizeof(char)); + return OrderTypeReq::get((val)); + } + + NewOrderSingle514 &ordType(const OrderTypeReq::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 108, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 109; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 109, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + NewOrderSingle514 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 109, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 110, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + NewOrderSingle514 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 110, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 111; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 111, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 112; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 112, sizeof(char)); + return ExecMode::get((val)); + } + + NewOrderSingle514 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 112, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 113; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 113, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + NewOrderSingle514 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 113, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 114; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 114, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + NewOrderSingle514 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 114, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 115; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 115, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + NewOrderSingle514 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 115, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NewOrderSingle514 _writer) + { + NewOrderSingle514 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "NewOrderSingle514", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("MinQty": )"; + builder << +writer.minQty(); + + builder << ", "; + builder << R"("DisplayQty": )"; + builder << +writer.displayQty(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/NotApplied513.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/NotApplied513.h new file mode 100644 index 000000000..fd3958900 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/NotApplied513.h @@ -0,0 +1,637 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_NOTAPPLIED513_H_ +#define _ILINKBINARY_NOTAPPLIED513_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 NotApplied513 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + NotApplied513() = default; + + NotApplied513( + 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_actingVersion(actingVersion) + { + } + + NotApplied513(char *buffer, const std::uint64_t bufferLength) : + NotApplied513(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + NotApplied513( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + NotApplied513(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)513; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "NotApplied"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + NotApplied513 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = NotApplied513(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + NotApplied513 &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 = NotApplied513( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + NotApplied513 &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 = NotApplied513(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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 * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NotApplied513 &uUID(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 * FromSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fromSeqNoId() SBE_NOEXCEPT + { + return 39018; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fromSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fromSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= fromSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fromSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fromSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fromSeqNo() 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); + } + + NotApplied513 &fromSeqNo(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 * MsgCountMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t msgCountId() SBE_NOEXCEPT + { + return 39019; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t msgCountSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool msgCountInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= msgCountSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t msgCountEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR std::uint32_t msgCountNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t msgCountMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t msgCountMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t msgCountEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t msgCount() 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); + } + + NotApplied513 &msgCount(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 * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + NotApplied513 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NotApplied513 _writer) + { + NotApplied513 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "NotApplied513", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("FromSeqNo": )"; + builder << +writer.fromSeqNo(); + + builder << ", "; + builder << R"("MsgCount": )"; + builder << +writer.msgCount(); + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/OFMOverrideReq.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OFMOverrideReq.h new file mode 100644 index 000000000..9e4f11a3b --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OFMOverrideReq.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_OFMOVERRIDEREQ_H_ +#define _ILINKBINARY_OFMOVERRIDEREQ_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class OFMOverrideReq +{ +public: + enum Value + { + Disabled = (std::uint8_t)0, + Enabled = (std::uint8_t)1, + NULL_VALUE = (std::uint8_t)255 + }; + + static OFMOverrideReq::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return Disabled; + case 1: return Enabled; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum OFMOverrideReq [E103]"); + } + + static const char* c_str(const OFMOverrideReq::Value value) + { + switch (value) + { + case Disabled: return "Disabled"; + case Enabled: return "Enabled"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum OFMOverrideReq [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, OFMOverrideReq::Value m) + { + return os << OFMOverrideReq::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrdStatusTrd.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrdStatusTrd.h new file mode 100644 index 000000000..163621234 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrdStatusTrd.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDSTATUSTRD_H_ +#define _ILINKBINARY_ORDSTATUSTRD_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class OrdStatusTrd +{ +public: + enum Value + { + PartiallyFilled = (std::uint8_t)1, + Filled = (std::uint8_t)2, + NULL_VALUE = (std::uint8_t)255 + }; + + static OrdStatusTrd::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return PartiallyFilled; + case 2: return Filled; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum OrdStatusTrd [E103]"); + } + + static const char* c_str(const OrdStatusTrd::Value value) + { + switch (value) + { + case PartiallyFilled: return "PartiallyFilled"; + case Filled: return "Filled"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum OrdStatusTrd [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, OrdStatusTrd::Value m) + { + return os << OrdStatusTrd::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrdStatusTrdCxl.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrdStatusTrdCxl.h new file mode 100644 index 000000000..6dff91650 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrdStatusTrdCxl.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDSTATUSTRDCXL_H_ +#define _ILINKBINARY_ORDSTATUSTRDCXL_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class OrdStatusTrdCxl +{ +public: + enum Value + { + TradeCorrection = (char)71, + TradeCancel = (char)72, + NULL_VALUE = (char)0 + }; + + static OrdStatusTrdCxl::Value get(const char value) + { + switch (value) + { + case 71: return TradeCorrection; + case 72: return TradeCancel; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum OrdStatusTrdCxl [E103]"); + } + + static const char* c_str(const OrdStatusTrdCxl::Value value) + { + switch (value) + { + case TradeCorrection: return "TradeCorrection"; + case TradeCancel: return "TradeCancel"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum OrdStatusTrdCxl [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, OrdStatusTrdCxl::Value m) + { + return os << OrdStatusTrdCxl::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderCancelReject535.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderCancelReject535.h new file mode 100644 index 000000000..047c10972 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderCancelReject535.h @@ -0,0 +1,2620 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERCANCELREJECT535_H_ +#define _ILINKBINARY_ORDERCANCELREJECT535_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 OrderCancelReject535 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + OrderCancelReject535() = default; + + OrderCancelReject535( + 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_actingVersion(actingVersion) + { + } + + OrderCancelReject535(char *buffer, const std::uint64_t bufferLength) : + OrderCancelReject535(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + OrderCancelReject535( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + OrderCancelReject535(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)401; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)535; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "9"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + OrderCancelReject535 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = OrderCancelReject535(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + OrderCancelReject535 &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 = OrderCancelReject535( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + OrderCancelReject535 &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 = OrderCancelReject535(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + OrderCancelReject535 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + OrderCancelReject535 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + OrderCancelReject535 &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; + } + + OrderCancelReject535 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReject535 &putText(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 256; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + OrderCancelReject535 &putText(const std::string& str) + { + const 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 (size_t start = srcLength; start < 256; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 268; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 268 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReject535 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 268 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReject535 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 40); + return *this; + } + + std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReject535 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 268, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + OrderCancelReject535 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 268, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 308; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 308; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 308; + } + + 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 + 308 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReject535 &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 + 308 + (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 + 308, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReject535 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 308, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 308; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 308; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReject535 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 308, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 308 + start] = 0; + } + + return *this; + } + #else + OrderCancelReject535 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 308, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 308 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 328; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 328; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 328; + } + + 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 + 328 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReject535 &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 + 328 + (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 + 328, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReject535 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 328, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 328; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 328; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReject535 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 328, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 328 + start] = 0; + } + + return *this; + } + #else + OrderCancelReject535 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 328, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 328 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 348; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 348, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReject535 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 348, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 356; + } + + static SBE_CONSTEXPR char ordStatusNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char ordStatusMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char ordStatusMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *ordStatus() const + { + static const std::uint8_t ordStatusValues[] = { 85 }; + + return (const char *)ordStatusValues; + } + + SBE_NODISCARD char ordStatus(const std::uint64_t index) const + { + static const std::uint8_t ordStatusValues[] = { 85 }; + + return (char)ordStatusValues[index]; + } + + std::uint64_t getOrdStatus(char *dst, const std::uint64_t length) const + { + static std::uint8_t ordStatusValues[] = { 85 }; + std::uint64_t bytesToCopy = length < sizeof(ordStatusValues) ? length : sizeof(ordStatusValues); + + std::memcpy(dst, ordStatusValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getOrdStatusAsString() const + { + static const std::uint8_t OrdStatusValues[] = { 85 }; + + return std::string((const char *)OrdStatusValues, 1); + } + + std::string getOrdStatusAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrdStatusAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * CxlRejResponseToMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cxlRejResponseToId() SBE_NOEXCEPT + { + return 434; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cxlRejResponseToSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cxlRejResponseToInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cxlRejResponseToSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlRejResponseToEncodingOffset() SBE_NOEXCEPT + { + return 356; + } + + static SBE_CONSTEXPR char cxlRejResponseToNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char cxlRejResponseToMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char cxlRejResponseToMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t cxlRejResponseToEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t cxlRejResponseToLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *cxlRejResponseTo() const + { + static const std::uint8_t cxlRejResponseToValues[] = { 49 }; + + return (const char *)cxlRejResponseToValues; + } + + SBE_NODISCARD char cxlRejResponseTo(const std::uint64_t index) const + { + static const std::uint8_t cxlRejResponseToValues[] = { 49 }; + + return (char)cxlRejResponseToValues[index]; + } + + std::uint64_t getCxlRejResponseTo(char *dst, const std::uint64_t length) const + { + static std::uint8_t cxlRejResponseToValues[] = { 49 }; + std::uint64_t bytesToCopy = length < sizeof(cxlRejResponseToValues) ? length : sizeof(cxlRejResponseToValues); + + std::memcpy(dst, cxlRejResponseToValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getCxlRejResponseToAsString() const + { + static const std::uint8_t CxlRejResponseToValues[] = { 49 }; + + return std::string((const char *)CxlRejResponseToValues, 1); + } + + std::string getCxlRejResponseToAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCxlRejResponseToAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 356; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 356, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReject535 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 356, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 364; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 364, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReject535 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 364, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 372; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 372, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReject535 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 372, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 380; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 380, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReject535 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 380, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 388; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 388; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 388; + } + + 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 + 388 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReject535 &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 + 388 + (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 + 388, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReject535 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 388, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 388; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 388; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReject535 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 388, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 388 + start] = 0; + } + + return *this; + } + #else + OrderCancelReject535 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 388, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 388 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * CxlRejReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cxlRejReasonId() SBE_NOEXCEPT + { + return 102; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cxlRejReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cxlRejReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cxlRejReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlRejReasonEncodingOffset() SBE_NOEXCEPT + { + return 393; + } + + static SBE_CONSTEXPR std::uint16_t cxlRejReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t cxlRejReasonMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t cxlRejReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t cxlRejReasonEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t cxlRejReason() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 393, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + OrderCancelReject535 &cxlRejReason(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 393, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 395; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 395, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + OrderCancelReject535 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 395, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 397; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 397, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + OrderCancelReject535 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 397, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 398; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 398, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + OrderCancelReject535 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 398, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 399; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 399, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + OrderCancelReject535 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 399, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 400; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 400, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + OrderCancelReject535 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 400, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, OrderCancelReject535 _writer) + { + OrderCancelReject535 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "OrderCancelReject535", )"; + 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"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("CxlRejReason": )"; + builder << +writer.cxlRejReason(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderCancelReplaceReject536.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderCancelReplaceReject536.h new file mode 100644 index 000000000..a59846498 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderCancelReplaceReject536.h @@ -0,0 +1,2620 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERCANCELREPLACEREJECT536_H_ +#define _ILINKBINARY_ORDERCANCELREPLACEREJECT536_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 OrderCancelReplaceReject536 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + OrderCancelReplaceReject536() = default; + + OrderCancelReplaceReject536( + 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_actingVersion(actingVersion) + { + } + + OrderCancelReplaceReject536(char *buffer, const std::uint64_t bufferLength) : + OrderCancelReplaceReject536(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + OrderCancelReplaceReject536( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + OrderCancelReplaceReject536(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)401; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)536; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "9"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + OrderCancelReplaceReject536 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = OrderCancelReplaceReject536(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + OrderCancelReplaceReject536 &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 = OrderCancelReplaceReject536( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + OrderCancelReplaceReject536 &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 = OrderCancelReplaceReject536(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + OrderCancelReplaceReject536 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + OrderCancelReplaceReject536 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + OrderCancelReplaceReject536 &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; + } + + OrderCancelReplaceReject536 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReplaceReject536 &putText(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 256; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + OrderCancelReplaceReject536 &putText(const std::string& str) + { + const 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 (size_t start = srcLength; start < 256; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execIDId() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execIDEncodingOffset() SBE_NOEXCEPT + { + return 268; + } + + static SBE_CONSTEXPR char execIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char execIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char execIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t execIDEncodingLength() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t execIDLength() SBE_NOEXCEPT + { + return 40; + } + + SBE_NODISCARD const char *execID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char *execID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char execID(const std::uint64_t index) const + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 268 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReplaceReject536 &execID(const std::uint64_t index, const char value) + { + if (index >= 40) + { + throw std::runtime_error("index out of range for execID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 268 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExecID(char *const dst, const std::uint64_t length) const + { + if (length > 40) + { + throw std::runtime_error("length too large for getExecID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReplaceReject536 &putExecID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 40); + return *this; + } + + std::string getExecIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExecIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExecIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getExecIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 40 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReplaceReject536 &putExecID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 268, str.data(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + OrderCancelReplaceReject536 &putExecID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 40) + { + throw std::runtime_error("string too large for putExecID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 268, str.c_str(), srcLength); + for (size_t start = srcLength; start < 40; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 308; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 308; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 308; + } + + 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 + 308 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReplaceReject536 &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 + 308 + (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 + 308, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReplaceReject536 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 308, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 308; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 308; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReplaceReject536 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 308, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 308 + start] = 0; + } + + return *this; + } + #else + OrderCancelReplaceReject536 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 308, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 308 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 328; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 328; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 328; + } + + 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 + 328 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReplaceReject536 &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 + 328 + (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 + 328, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReplaceReject536 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 328, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 328; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 328; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReplaceReject536 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 328, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 328 + start] = 0; + } + + return *this; + } + #else + OrderCancelReplaceReject536 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 328, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 328 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 348; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 348, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceReject536 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 348, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 356; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 356, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceReject536 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 356, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 364; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 364, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceReject536 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 364, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 372; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 372, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceReject536 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 372, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 380; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 380, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceReject536 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 380, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 388; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 388; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 388; + } + + 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 + 388 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReplaceReject536 &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 + 388 + (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 + 388, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReplaceReject536 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 388, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 388; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 388; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReplaceReject536 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 388, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 388 + start] = 0; + } + + return *this; + } + #else + OrderCancelReplaceReject536 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 388, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 388 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * CxlRejReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cxlRejReasonId() SBE_NOEXCEPT + { + return 102; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cxlRejReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cxlRejReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cxlRejReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlRejReasonEncodingOffset() SBE_NOEXCEPT + { + return 393; + } + + static SBE_CONSTEXPR std::uint16_t cxlRejReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t cxlRejReasonMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t cxlRejReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t cxlRejReasonEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t cxlRejReason() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 393, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + OrderCancelReplaceReject536 &cxlRejReason(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 393, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 395; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 395, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + OrderCancelReplaceReject536 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 395, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordStatusId() SBE_NOEXCEPT + { + return 39; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusEncodingOffset() SBE_NOEXCEPT + { + return 397; + } + + static SBE_CONSTEXPR char ordStatusNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char ordStatusMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char ordStatusMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t ordStatusEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *ordStatus() const + { + static const std::uint8_t ordStatusValues[] = { 85 }; + + return (const char *)ordStatusValues; + } + + SBE_NODISCARD char ordStatus(const std::uint64_t index) const + { + static const std::uint8_t ordStatusValues[] = { 85 }; + + return (char)ordStatusValues[index]; + } + + std::uint64_t getOrdStatus(char *dst, const std::uint64_t length) const + { + static std::uint8_t ordStatusValues[] = { 85 }; + std::uint64_t bytesToCopy = length < sizeof(ordStatusValues) ? length : sizeof(ordStatusValues); + + std::memcpy(dst, ordStatusValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getOrdStatusAsString() const + { + static const std::uint8_t OrdStatusValues[] = { 85 }; + + return std::string((const char *)OrdStatusValues, 1); + } + + std::string getOrdStatusAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrdStatusAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * CxlRejResponseToMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cxlRejResponseToId() SBE_NOEXCEPT + { + return 434; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cxlRejResponseToSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cxlRejResponseToInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cxlRejResponseToSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlRejResponseToEncodingOffset() SBE_NOEXCEPT + { + return 397; + } + + static SBE_CONSTEXPR char cxlRejResponseToNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char cxlRejResponseToMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char cxlRejResponseToMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t cxlRejResponseToEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t cxlRejResponseToLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *cxlRejResponseTo() const + { + static const std::uint8_t cxlRejResponseToValues[] = { 50 }; + + return (const char *)cxlRejResponseToValues; + } + + SBE_NODISCARD char cxlRejResponseTo(const std::uint64_t index) const + { + static const std::uint8_t cxlRejResponseToValues[] = { 50 }; + + return (char)cxlRejResponseToValues[index]; + } + + std::uint64_t getCxlRejResponseTo(char *dst, const std::uint64_t length) const + { + static std::uint8_t cxlRejResponseToValues[] = { 50 }; + std::uint64_t bytesToCopy = length < sizeof(cxlRejResponseToValues) ? length : sizeof(cxlRejResponseToValues); + + std::memcpy(dst, cxlRejResponseToValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getCxlRejResponseToAsString() const + { + static const std::uint8_t CxlRejResponseToValues[] = { 50 }; + + return std::string((const char *)CxlRejResponseToValues, 1); + } + + std::string getCxlRejResponseToAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCxlRejResponseToAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 397; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 397, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + OrderCancelReplaceReject536 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 397, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 398; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 398, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + OrderCancelReplaceReject536 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 398, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 399; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 399, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + OrderCancelReplaceReject536 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 399, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 400; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 400, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + OrderCancelReplaceReject536 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 400, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, OrderCancelReplaceReject536 _writer) + { + OrderCancelReplaceReject536 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "OrderCancelReplaceReject536", )"; + 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"("ExecID": )"; + builder << '"' << + writer.getExecIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("CxlRejReason": )"; + builder << +writer.cxlRejReason(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderCancelReplaceRequest515.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderCancelReplaceRequest515.h new file mode 100644 index 000000000..be63c7d81 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderCancelReplaceRequest515.h @@ -0,0 +1,2496 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERCANCELREPLACEREQUEST515_H_ +#define _ILINKBINARY_ORDERCANCELREPLACEREQUEST515_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 OrderCancelReplaceRequest515 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + OrderCancelReplaceRequest515() = default; + + OrderCancelReplaceRequest515( + 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_actingVersion(actingVersion) + { + } + + OrderCancelReplaceRequest515(char *buffer, const std::uint64_t bufferLength) : + OrderCancelReplaceRequest515(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + OrderCancelReplaceRequest515( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + OrderCancelReplaceRequest515(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)125; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)515; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "G"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + OrderCancelReplaceRequest515 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = OrderCancelReplaceRequest515(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + OrderCancelReplaceRequest515 &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 = OrderCancelReplaceRequest515( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + OrderCancelReplaceRequest515 &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 = OrderCancelReplaceRequest515(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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 * PriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + +private: + PRICENULL9 m_price; + +public: + SBE_NODISCARD PRICENULL9 &price() + { + m_price.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_price; + } + + SBE_NODISCARD static const char * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 8; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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 + 8, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderCancelReplaceRequest515 &orderQty(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 * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 12; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 12, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderCancelReplaceRequest515 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + OrderCancelReplaceRequest515 &side(const SideReq::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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + OrderCancelReplaceRequest515 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + OrderCancelReplaceRequest515 &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; + } + + OrderCancelReplaceRequest515 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReplaceRequest515 &putSenderID(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + OrderCancelReplaceRequest515 &putSenderID(const std::string& str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 41; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 41; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 41; + } + + 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 + 41 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReplaceRequest515 &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 + 41 + (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 + 41, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReplaceRequest515 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 41, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 41; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 41; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReplaceRequest515 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 41, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #else + OrderCancelReplaceRequest515 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 41, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 61; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 61, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceRequest515 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 61, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 69; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 69, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceRequest515 &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 69, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * StopPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t stopPxId() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t stopPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool stopPxInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= stopPxSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t stopPxEncodingOffset() SBE_NOEXCEPT + { + return 77; + } + +private: + PRICENULL9 m_stopPx; + +public: + SBE_NODISCARD PRICENULL9 &stopPx() + { + m_stopPx.wrap(m_buffer, m_offset + 77, m_actingVersion, m_bufferLength); + return m_stopPx; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 85; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 85, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceRequest515 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 85, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 93; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 93, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelReplaceRequest515 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 93, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 101; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 101; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 101; + } + + 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 + 101 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelReplaceRequest515 &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 + 101 + (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 + 101, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelReplaceRequest515 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 101, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 101; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 101; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelReplaceRequest515 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 101, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 101 + start] = 0; + } + + return *this; + } + #else + OrderCancelReplaceRequest515 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 101, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 101 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * MinQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t minQtyId() SBE_NOEXCEPT + { + return 110; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= minQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minQtyEncodingOffset() SBE_NOEXCEPT + { + return 106; + } + + static SBE_CONSTEXPR std::uint32_t minQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t minQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t minQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t minQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 106, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderCancelReplaceRequest515 &minQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 106, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * DisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t displayQtyId() SBE_NOEXCEPT + { + return 1138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool displayQtyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= displayQtySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayQtyEncodingOffset() SBE_NOEXCEPT + { + return 110; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t displayQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t displayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t displayQty() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 110, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderCancelReplaceRequest515 &displayQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 110, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * ExpireDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t expireDateId() SBE_NOEXCEPT + { + return 432; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expireDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expireDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expireDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expireDateEncodingOffset() SBE_NOEXCEPT + { + return 114; + } + + static SBE_CONSTEXPR std::uint16_t expireDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t expireDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t expireDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t expireDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 114, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + OrderCancelReplaceRequest515 &expireDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 114, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 116; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderTypeReq::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 116, sizeof(char)); + return OrderTypeReq::get((val)); + } + + OrderCancelReplaceRequest515 &ordType(const OrderTypeReq::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 116, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 117; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD TimeInForce::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 117, sizeof(std::uint8_t)); + return TimeInForce::get((val)); + } + + OrderCancelReplaceRequest515 &timeInForce(const TimeInForce::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 117, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 118; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 118, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + OrderCancelReplaceRequest515 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 118, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OFMOverrideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t oFMOverrideId() SBE_NOEXCEPT + { + return 9768; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t oFMOverrideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool oFMOverrideInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= oFMOverrideSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t oFMOverrideEncodingOffset() SBE_NOEXCEPT + { + return 119; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t oFMOverrideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OFMOverrideReq::Value oFMOverride() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 119, sizeof(std::uint8_t)); + return OFMOverrideReq::get((val)); + } + + OrderCancelReplaceRequest515 &oFMOverride(const OFMOverrideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 119, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t execInstId() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t execInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool execInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= execInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t execInstEncodingOffset() SBE_NOEXCEPT + { + return 120; + } + +private: + ExecInst m_execInst; + +public: + SBE_NODISCARD ExecInst &execInst() + { + m_execInst.wrap(m_buffer, m_offset + 120, m_actingVersion, m_bufferLength); + return m_execInst; + } + + static SBE_CONSTEXPR std::size_t execInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char * ExecutionModeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t executionModeId() SBE_NOEXCEPT + { + return 5906; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executionModeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executionModeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executionModeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingOffset() SBE_NOEXCEPT + { + return 121; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executionModeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExecMode::Value executionMode() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 121, sizeof(char)); + return ExecMode::get((val)); + } + + OrderCancelReplaceRequest515 &executionMode(const ExecMode::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 121, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 122; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 122, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + OrderCancelReplaceRequest515 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 122, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManagedOrderMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t managedOrderId() SBE_NOEXCEPT + { + return 6881; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t managedOrderSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool managedOrderInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= managedOrderSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingOffset() SBE_NOEXCEPT + { + return 123; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t managedOrderEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value managedOrder() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 123, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + OrderCancelReplaceRequest515 &managedOrder(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 123, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ShortSaleTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 124; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t shortSaleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ShortSaleType::Value shortSaleType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 124, sizeof(std::uint8_t)); + return ShortSaleType::get((val)); + } + + OrderCancelReplaceRequest515 &shortSaleType(const ShortSaleType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, OrderCancelReplaceRequest515 _writer) + { + OrderCancelReplaceRequest515 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "OrderCancelReplaceRequest515", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("Price": )"; + builder << writer.price(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("StopPx": )"; + builder << writer.stopPx(); + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("MinQty": )"; + builder << +writer.minQty(); + + builder << ", "; + builder << R"("DisplayQty": )"; + builder << +writer.displayQty(); + + builder << ", "; + builder << R"("ExpireDate": )"; + builder << +writer.expireDate(); + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("OFMOverride": )"; + builder << '"' << writer.oFMOverride() << '"'; + + builder << ", "; + builder << R"("ExecInst": )"; + builder << writer.execInst(); + + builder << ", "; + builder << R"("ExecutionMode": )"; + builder << '"' << writer.executionMode() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("ManagedOrder": )"; + builder << '"' << writer.managedOrder() << '"'; + + builder << ", "; + builder << R"("ShortSaleType": )"; + builder << '"' << writer.shortSaleType() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderCancelRequest516.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderCancelRequest516.h new file mode 100644 index 000000000..02c36cc50 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderCancelRequest516.h @@ -0,0 +1,1639 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERCANCELREQUEST516_H_ +#define _ILINKBINARY_ORDERCANCELREQUEST516_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 OrderCancelRequest516 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + OrderCancelRequest516() = default; + + OrderCancelRequest516( + 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_actingVersion(actingVersion) + { + } + + OrderCancelRequest516(char *buffer, const std::uint64_t bufferLength) : + OrderCancelRequest516(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + OrderCancelRequest516( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + OrderCancelRequest516(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)88; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)516; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "F"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + OrderCancelRequest516 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = OrderCancelRequest516(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + OrderCancelRequest516 &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 = OrderCancelRequest516( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + OrderCancelRequest516 &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 = OrderCancelRequest516(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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 * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + OrderCancelRequest516 &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 * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 8; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelRequest516 &partyDetailsListReqID(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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + OrderCancelRequest516 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + OrderCancelRequest516 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + OrderCancelRequest516 &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; + } + + OrderCancelRequest516 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelRequest516 &putSenderID(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + OrderCancelRequest516 &putSenderID(const std::string& str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 41; + } + + static SBE_CONSTEXPR char clOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char clOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char clOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 41; + } + + SBE_NODISCARD char *clOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 41; + } + + 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 + 41 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelRequest516 &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 + 41 + (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 + 41, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelRequest516 &putClOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 41, src, sizeof(char) * 20); + return *this; + } + + std::string getClOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 41; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getClOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 41; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelRequest516 &putClOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 41, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #else + OrderCancelRequest516 &putClOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putClOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 41, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 61; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 61, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelRequest516 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 61, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 69; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 69, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderCancelRequest516 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 69, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 77; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 77; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 77; + } + + 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 + 77 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelRequest516 &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 + 77 + (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 + 77, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelRequest516 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 77, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 77; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 77; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelRequest516 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 77, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 77 + start] = 0; + } + + return *this; + } + #else + OrderCancelRequest516 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 77, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 77 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 82; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 82, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderCancelRequest516 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 82, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 86; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 86, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + OrderCancelRequest516 &side(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 86, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 87; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 87, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + OrderCancelRequest516 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 87, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, OrderCancelRequest516 _writer) + { + OrderCancelRequest516 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "OrderCancelRequest516", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + 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"("ClOrdID": )"; + builder << '"' << + writer.getClOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderEventType.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderEventType.h new file mode 100644 index 000000000..302423559 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderEventType.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDEREVENTTYPE_H_ +#define _ILINKBINARY_ORDEREVENTTYPE_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class OrderEventType +{ +public: + enum Value + { + PartiallyFilled = (std::uint8_t)4, + Filled = (std::uint8_t)5, + NULL_VALUE = (std::uint8_t)255 + }; + + static OrderEventType::Value get(const std::uint8_t value) + { + switch (value) + { + case 4: return PartiallyFilled; + case 5: return Filled; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum OrderEventType [E103]"); + } + + static const char* c_str(const OrderEventType::Value value) + { + switch (value) + { + case PartiallyFilled: return "PartiallyFilled"; + case Filled: return "Filled"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum OrderEventType [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, OrderEventType::Value m) + { + return os << OrderEventType::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderMassActionReport558.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderMassActionReport558.h new file mode 100644 index 000000000..99edeca6f --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderMassActionReport558.h @@ -0,0 +1,3317 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERMASSACTIONREPORT558_H_ +#define _ILINKBINARY_ORDERMASSACTIONREPORT558_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 OrderMassActionReport558 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + OrderMassActionReport558() = default; + + OrderMassActionReport558( + 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_actingVersion(actingVersion) + { + } + + OrderMassActionReport558(char *buffer, const std::uint64_t bufferLength) : + OrderMassActionReport558(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + OrderMassActionReport558( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + OrderMassActionReport558(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)103; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)558; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "BZ"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + OrderMassActionReport558 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = OrderMassActionReport558(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + OrderMassActionReport558 &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 = OrderMassActionReport558( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + OrderMassActionReport558 &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 = OrderMassActionReport558(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + OrderMassActionReport558 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + OrderMassActionReport558 &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 * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 12; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 12; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + 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 + 12 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassActionReport558 &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 + 12 + (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 + 12, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassActionReport558 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionReport558 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + OrderMassActionReport558 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 32; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 32, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport558 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 40; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 40, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport558 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 40, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 48; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 48, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport558 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 48, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 56; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 56, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport558 &orderRequestID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 56, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * MassActionReportIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massActionReportIDId() SBE_NOEXCEPT + { + return 1369; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionReportIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionReportIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionReportIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionReportIDEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + static SBE_CONSTEXPR std::uint64_t massActionReportIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t massActionReportIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t massActionReportIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t massActionReportIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t massActionReportID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionReport558 &massActionReportID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * MassActionTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massActionTypeId() SBE_NOEXCEPT + { + return 1373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionTypeEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR char massActionTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char massActionTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char massActionTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t massActionTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t massActionTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *massActionType() const + { + static const std::uint8_t massActionTypeValues[] = { 51 }; + + return (const char *)massActionTypeValues; + } + + SBE_NODISCARD char massActionType(const std::uint64_t index) const + { + static const std::uint8_t massActionTypeValues[] = { 51 }; + + return (char)massActionTypeValues[index]; + } + + std::uint64_t getMassActionType(char *dst, const std::uint64_t length) const + { + static std::uint8_t massActionTypeValues[] = { 51 }; + std::uint64_t bytesToCopy = length < sizeof(massActionTypeValues) ? length : sizeof(massActionTypeValues); + + std::memcpy(dst, massActionTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getMassActionTypeAsString() const + { + static const std::uint8_t MassActionTypeValues[] = { 51 }; + + return std::string((const char *)MassActionTypeValues, 1); + } + + std::string getMassActionTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMassActionTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 72; + } + + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return (char)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 + 72; + } + + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 72; + } + + 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 + 72 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassActionReport558 &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 + 72 + (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 + 72, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassActionReport558 &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 72, src, sizeof(char) * 6); + return *this; + } + + std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 72; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 72; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionReport558 &putSecurityGroup(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #else + OrderMassActionReport558 &putSecurityGroup(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 72, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 72 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 78; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 78; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 78; + } + + 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 + 78 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassActionReport558 &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 + 78 + (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 + 78, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassActionReport558 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 78, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 78; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 78; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionReport558 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 78, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 78 + start] = 0; + } + + return *this; + } + #else + OrderMassActionReport558 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 78, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 78 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 83; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 83, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderMassActionReport558 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 83, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 87; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 87, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + OrderMassActionReport558 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 87, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * MassActionResponseMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massActionResponseId() SBE_NOEXCEPT + { + return 1375; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionResponseSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionResponseInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionResponseSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionResponseEncodingOffset() SBE_NOEXCEPT + { + return 89; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionResponseEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassActionResponse::Value massActionResponse() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 89, sizeof(std::uint8_t)); + return MassActionResponse::get((val)); + } + + OrderMassActionReport558 &massActionResponse(const MassActionResponse::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 89, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 90; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 90, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + OrderMassActionReport558 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 90, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MassActionScopeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massActionScopeId() SBE_NOEXCEPT + { + return 1374; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionScopeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionScopeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionScopeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionScopeEncodingOffset() SBE_NOEXCEPT + { + return 91; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionScopeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassActionScope::Value massActionScope() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 91, sizeof(std::uint8_t)); + return MassActionScope::get((val)); + } + + OrderMassActionReport558 &massActionScope(const MassActionScope::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 91, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TotalAffectedOrdersMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t totalAffectedOrdersId() SBE_NOEXCEPT + { + return 533; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totalAffectedOrdersSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool totalAffectedOrdersInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= totalAffectedOrdersSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totalAffectedOrdersEncodingOffset() SBE_NOEXCEPT + { + return 92; + } + + static SBE_CONSTEXPR std::uint8_t totalAffectedOrdersNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t totalAffectedOrdersMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t totalAffectedOrdersMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t totalAffectedOrdersEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t totalAffectedOrders() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 92, sizeof(std::uint8_t)); + return (val); + } + + OrderMassActionReport558 &totalAffectedOrders(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LastFragmentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastFragmentId() SBE_NOEXCEPT + { + return 893; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastFragmentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastFragmentInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastFragmentSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastFragmentEncodingOffset() SBE_NOEXCEPT + { + return 93; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastFragmentEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value lastFragment() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 93, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + OrderMassActionReport558 &lastFragment(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 93, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MassActionRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massActionRejectReasonId() SBE_NOEXCEPT + { + return 1376; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionRejectReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionRejectReasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionRejectReasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionRejectReasonEncodingOffset() SBE_NOEXCEPT + { + return 94; + } + + static SBE_CONSTEXPR std::uint8_t massActionRejectReasonNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t massActionRejectReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t massActionRejectReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t massActionRejectReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t massActionRejectReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 94, sizeof(std::uint8_t)); + return (val); + } + + OrderMassActionReport558 &massActionRejectReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 94, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MarketSegmentIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t marketSegmentIDId() SBE_NOEXCEPT + { + return 1300; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketSegmentIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= marketSegmentIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingOffset() SBE_NOEXCEPT + { + return 95; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 95, sizeof(std::uint8_t)); + return (val); + } + + OrderMassActionReport558 &marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 95, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MassCancelRequestTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massCancelRequestTypeId() SBE_NOEXCEPT + { + return 6115; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massCancelRequestTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massCancelRequestTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massCancelRequestTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massCancelRequestTypeEncodingOffset() SBE_NOEXCEPT + { + return 96; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massCancelRequestTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassCxlReqTyp::Value massCancelRequestType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 96, sizeof(std::uint8_t)); + return MassCxlReqTyp::get((val)); + } + + OrderMassActionReport558 &massCancelRequestType(const MassCxlReqTyp::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 96, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 97; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideNULL::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 97, sizeof(std::uint8_t)); + return SideNULL::get((val)); + } + + OrderMassActionReport558 &side(const SideNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 97, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 98; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassActionOrdTyp::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 98, sizeof(char)); + return MassActionOrdTyp::get((val)); + } + + OrderMassActionReport558 &ordType(const MassActionOrdTyp::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 98, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 99; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassCancelTIF::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 99, sizeof(std::uint8_t)); + return MassCancelTIF::get((val)); + } + + OrderMassActionReport558 &timeInForce(const MassCancelTIF::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 99, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 100; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 100, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + OrderMassActionReport558 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 100, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 101; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 101, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + OrderMassActionReport558 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 101, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 2; + } + + 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 102; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + if (m_actingVersion < 2) + { + return BooleanFlag::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 102, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + OrderMassActionReport558 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 102, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoAffectedOrders + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)32); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 32; + m_actingVersion = actingVersion; + 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 32; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoAffectedOrders &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * OrigCIOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t origCIOrdIDId() SBE_NOEXCEPT + { + return 41; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origCIOrdIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool origCIOrdIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= origCIOrdIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origCIOrdIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char origCIOrdIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char origCIOrdIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char origCIOrdIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t origCIOrdIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t origCIOrdIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *origCIOrdID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *origCIOrdID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char origCIOrdID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for origCIOrdID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoAffectedOrders &origCIOrdID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for origCIOrdID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrigCIOrdID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getOrigCIOrdID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoAffectedOrders &putOrigCIOrdID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 20); + return *this; + } + + std::string getOrigCIOrdIDAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrigCIOrdIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getOrigCIOrdIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getOrigCIOrdIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoAffectedOrders &putOrigCIOrdID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putOrigCIOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoAffectedOrders &putOrigCIOrdID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putOrigCIOrdID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * AffectedOrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t affectedOrderIDId() SBE_NOEXCEPT + { + return 535; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t affectedOrderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool affectedOrderIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= affectedOrderIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t affectedOrderIDEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t affectedOrderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t affectedOrderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t affectedOrderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t affectedOrderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t affectedOrderID() 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); + } + + NoAffectedOrders &affectedOrderID(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 * CxlQuantityMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cxlQuantityId() SBE_NOEXCEPT + { + return 84; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cxlQuantitySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cxlQuantityInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= cxlQuantitySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cxlQuantityEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::uint32_t cxlQuantityNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t cxlQuantityMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t cxlQuantityMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t cxlQuantityEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t cxlQuantity() 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); + } + + NoAffectedOrders &cxlQuantity(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; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoAffectedOrders writer) + { + builder << '{'; + builder << R"("OrigCIOrdID": )"; + builder << '"' << + writer.getOrigCIOrdIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("AffectedOrderID": )"; + builder << +writer.affectedOrderID(); + + builder << ", "; + builder << R"("CxlQuantity": )"; + builder << +writer.cxlQuantity(); + + builder << '}'; + + return builder; + } + }; + +private: + NoAffectedOrders m_noAffectedOrders; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoAffectedOrdersId() SBE_NOEXCEPT + { + return 534; + } + + SBE_NODISCARD inline NoAffectedOrders &noAffectedOrders() + { + m_noAffectedOrders.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noAffectedOrders; + } + + NoAffectedOrders &noAffectedOrdersCount(const std::uint8_t count) + { + m_noAffectedOrders.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noAffectedOrders; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noAffectedOrdersSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noAffectedOrdersInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noAffectedOrdersSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, OrderMassActionReport558 _writer) + { + OrderMassActionReport558 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "OrderMassActionReport558", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + 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"("OrderRequestID": )"; + builder << +writer.orderRequestID(); + + builder << ", "; + builder << R"("MassActionReportID": )"; + builder << +writer.massActionReportID(); + + builder << ", "; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("MassActionResponse": )"; + builder << '"' << writer.massActionResponse() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("MassActionScope": )"; + builder << '"' << writer.massActionScope() << '"'; + + builder << ", "; + builder << R"("TotalAffectedOrders": )"; + builder << +writer.totalAffectedOrders(); + + builder << ", "; + builder << R"("LastFragment": )"; + builder << '"' << writer.lastFragment() << '"'; + + builder << ", "; + builder << R"("MassActionRejectReason": )"; + builder << +writer.massActionRejectReason(); + + builder << ", "; + builder << R"("MarketSegmentID": )"; + builder << +writer.marketSegmentID(); + + builder << ", "; + builder << R"("MassCancelRequestType": )"; + builder << '"' << writer.massCancelRequestType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoAffectedOrders": [)"; + writer.noAffectedOrders().forEach([&](NoAffectedOrders& noAffectedOrders) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noAffectedOrders; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderMassActionRequest529.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderMassActionRequest529.h new file mode 100644 index 000000000..c0ff41cea --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderMassActionRequest529.h @@ -0,0 +1,2019 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERMASSACTIONREQUEST529_H_ +#define _ILINKBINARY_ORDERMASSACTIONREQUEST529_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 OrderMassActionRequest529 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + OrderMassActionRequest529() = default; + + OrderMassActionRequest529( + 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_actingVersion(actingVersion) + { + } + + OrderMassActionRequest529(char *buffer, const std::uint64_t bufferLength) : + OrderMassActionRequest529(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + OrderMassActionRequest529( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + OrderMassActionRequest529(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)71; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)529; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "CA"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + OrderMassActionRequest529 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = OrderMassActionRequest529(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + OrderMassActionRequest529 &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 = OrderMassActionRequest529( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + OrderMassActionRequest529 &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 = OrderMassActionRequest529(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + OrderMassActionRequest529 &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 * OrderRequestIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderRequestIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + OrderMassActionRequest529 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + OrderMassActionRequest529 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + OrderMassActionRequest529 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + OrderMassActionRequest529 &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; + } + + OrderMassActionRequest529 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionRequest529 &putSenderID(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + OrderMassActionRequest529 &putSenderID(const std::string& str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * MassActionTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massActionTypeId() SBE_NOEXCEPT + { + return 1373; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionTypeEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR char massActionTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char massActionTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char massActionTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t massActionTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t massActionTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *massActionType() const + { + static const std::uint8_t massActionTypeValues[] = { 51 }; + + return (const char *)massActionTypeValues; + } + + SBE_NODISCARD char massActionType(const std::uint64_t index) const + { + static const std::uint8_t massActionTypeValues[] = { 51 }; + + return (char)massActionTypeValues[index]; + } + + std::uint64_t getMassActionType(char *dst, const std::uint64_t length) const + { + static std::uint8_t massActionTypeValues[] = { 51 }; + std::uint64_t bytesToCopy = length < sizeof(massActionTypeValues) ? length : sizeof(massActionTypeValues); + + std::memcpy(dst, massActionTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getMassActionTypeAsString() const + { + static const std::uint8_t MassActionTypeValues[] = { 51 }; + + return std::string((const char *)MassActionTypeValues, 1); + } + + std::string getMassActionTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMassActionTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 41; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 41, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassActionRequest529 &sendingTimeEpoch(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 * SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 49; + } + + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return (char)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 + 49; + } + + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 49; + } + + 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 + 49 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassActionRequest529 &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 + 49 + (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 + 49, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassActionRequest529 &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 49, src, sizeof(char) * 6); + return *this; + } + + std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 49; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 49; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionRequest529 &putSecurityGroup(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 49, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #else + OrderMassActionRequest529 &putSecurityGroup(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 49, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 55; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 55; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 55; + } + + 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 + 55 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassActionRequest529 &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 + 55 + (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 + 55, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassActionRequest529 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 55, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 55; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 55; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionRequest529 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 55, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 55 + start] = 0; + } + + return *this; + } + #else + OrderMassActionRequest529 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 55, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 55 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 60; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 60, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderMassActionRequest529 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 60, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * MassActionScopeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massActionScopeId() SBE_NOEXCEPT + { + return 1374; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massActionScopeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massActionScopeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massActionScopeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionScopeEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massActionScopeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassActionScope::Value massActionScope() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint8_t)); + return MassActionScope::get((val)); + } + + OrderMassActionRequest529 &massActionScope(const MassActionScope::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MarketSegmentIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t marketSegmentIDId() SBE_NOEXCEPT + { + return 1300; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketSegmentIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= marketSegmentIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingOffset() SBE_NOEXCEPT + { + return 65; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 65, sizeof(std::uint8_t)); + return (val); + } + + OrderMassActionRequest529 &marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 65, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MassCancelRequestTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massCancelRequestTypeId() SBE_NOEXCEPT + { + return 6115; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massCancelRequestTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massCancelRequestTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massCancelRequestTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massCancelRequestTypeEncodingOffset() SBE_NOEXCEPT + { + return 66; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massCancelRequestTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassCxlReqTyp::Value massCancelRequestType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t)); + return MassCxlReqTyp::get((val)); + } + + OrderMassActionRequest529 &massCancelRequestType(const MassCxlReqTyp::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 66, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 67; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideNULL::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 67, sizeof(std::uint8_t)); + return SideNULL::get((val)); + } + + OrderMassActionRequest529 &side(const SideNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 67, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 68; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassActionOrdTyp::Value ordType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 68, sizeof(char)); + return MassActionOrdTyp::get((val)); + } + + OrderMassActionRequest529 &ordType(const MassActionOrdTyp::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 68, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 69; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassCancelTIF::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 69, sizeof(std::uint8_t)); + return MassCancelTIF::get((val)); + } + + OrderMassActionRequest529 &timeInForce(const MassCancelTIF::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 69, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 70; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 70, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + OrderMassActionRequest529 &liquidityFlag(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 70, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, OrderMassActionRequest529 _writer) + { + OrderMassActionRequest529 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "OrderMassActionRequest529", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + 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"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("MassActionScope": )"; + builder << '"' << writer.massActionScope() << '"'; + + builder << ", "; + builder << R"("MarketSegmentID": )"; + builder << +writer.marketSegmentID(); + + builder << ", "; + builder << R"("MassCancelRequestType": )"; + builder << '"' << writer.massCancelRequestType() << '"'; + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << ", "; + builder << R"("OrdType": )"; + builder << '"' << writer.ordType() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderMassStatusRequest530.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderMassStatusRequest530.h new file mode 100644 index 000000000..f8ac22322 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderMassStatusRequest530.h @@ -0,0 +1,1702 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERMASSSTATUSREQUEST530_H_ +#define _ILINKBINARY_ORDERMASSSTATUSREQUEST530_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 OrderMassStatusRequest530 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + OrderMassStatusRequest530() = default; + + OrderMassStatusRequest530( + 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_actingVersion(actingVersion) + { + } + + OrderMassStatusRequest530(char *buffer, const std::uint64_t bufferLength) : + OrderMassStatusRequest530(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + OrderMassStatusRequest530( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + OrderMassStatusRequest530(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)68; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)530; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "AF"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + OrderMassStatusRequest530 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = OrderMassStatusRequest530(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + OrderMassStatusRequest530 &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 = OrderMassStatusRequest530( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + OrderMassStatusRequest530 &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 = OrderMassStatusRequest530(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + OrderMassStatusRequest530 &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 * MassStatusReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massStatusReqIDId() SBE_NOEXCEPT + { + return 584; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massStatusReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massStatusReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massStatusReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massStatusReqIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t massStatusReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t massStatusReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t massStatusReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t massStatusReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t massStatusReqID() 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); + } + + OrderMassStatusRequest530 &massStatusReqID(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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + OrderMassStatusRequest530 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + OrderMassStatusRequest530 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + OrderMassStatusRequest530 &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; + } + + OrderMassStatusRequest530 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassStatusRequest530 &putSenderID(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + OrderMassStatusRequest530 &putSenderID(const std::string& str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 41; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 41, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderMassStatusRequest530 &sendingTimeEpoch(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 * SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 49; + } + + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return (char)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 + 49; + } + + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 49; + } + + 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 + 49 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassStatusRequest530 &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 + 49 + (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 + 49, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassStatusRequest530 &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 49, src, sizeof(char) * 6); + return *this; + } + + std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 49; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 49; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassStatusRequest530 &putSecurityGroup(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 49, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #else + OrderMassStatusRequest530 &putSecurityGroup(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 49, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 55; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 55; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 55; + } + + 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 + 55 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassStatusRequest530 &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 + 55 + (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 + 55, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassStatusRequest530 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 55, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 55; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 55; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassStatusRequest530 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 55, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 55 + start] = 0; + } + + return *this; + } + #else + OrderMassStatusRequest530 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 55, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 55 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 60; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 60, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + OrderMassStatusRequest530 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 60, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * MassStatusReqTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t massStatusReqTypeId() SBE_NOEXCEPT + { + return 585; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t massStatusReqTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool massStatusReqTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= massStatusReqTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massStatusReqTypeEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t massStatusReqTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassStatusReqTyp::Value massStatusReqType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint8_t)); + return MassStatusReqTyp::get((val)); + } + + OrderMassStatusRequest530 &massStatusReqType(const MassStatusReqTyp::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * OrdStatusReqTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordStatusReqTypeId() SBE_NOEXCEPT + { + return 5000; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusReqTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusReqTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusReqTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusReqTypeEncodingOffset() SBE_NOEXCEPT + { + return 65; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusReqTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassStatusOrdTyp::Value ordStatusReqType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 65, sizeof(std::uint8_t)); + return MassStatusOrdTyp::get((val)); + } + + OrderMassStatusRequest530 &ordStatusReqType(const MassStatusOrdTyp::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 65, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TimeInForceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t timeInForceId() SBE_NOEXCEPT + { + return 59; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t timeInForceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool timeInForceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= timeInForceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingOffset() SBE_NOEXCEPT + { + return 66; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t timeInForceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MassStatusTIF::Value timeInForce() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t)); + return MassStatusTIF::get((val)); + } + + OrderMassStatusRequest530 &timeInForce(const MassStatusTIF::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 66, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * MarketSegmentIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t marketSegmentIDId() SBE_NOEXCEPT + { + return 1300; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketSegmentIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= marketSegmentIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingOffset() SBE_NOEXCEPT + { + return 67; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 67, sizeof(std::uint8_t)); + return (val); + } + + OrderMassStatusRequest530 &marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 67, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, OrderMassStatusRequest530 _writer) + { + OrderMassStatusRequest530 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "OrderMassStatusRequest530", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("MassStatusReqID": )"; + builder << +writer.massStatusReqID(); + + 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"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("MassStatusReqType": )"; + builder << '"' << writer.massStatusReqType() << '"'; + + builder << ", "; + builder << R"("OrdStatusReqType": )"; + builder << '"' << writer.ordStatusReqType() << '"'; + + builder << ", "; + builder << R"("TimeInForce": )"; + builder << '"' << writer.timeInForce() << '"'; + + builder << ", "; + builder << R"("MarketSegmentID": )"; + builder << +writer.marketSegmentID(); + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderStatus.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderStatus.h new file mode 100644 index 000000000..a72054a57 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderStatus.h @@ -0,0 +1,156 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERSTATUS_H_ +#define _ILINKBINARY_ORDERSTATUS_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class OrderStatus +{ +public: + enum Value + { + New = (char)48, + PartiallyFilled = (char)49, + Filled = (char)50, + Cancelled = (char)52, + Replaced = (char)53, + Rejected = (char)56, + Expired = (char)67, + Undefined = (char)85, + NULL_VALUE = (char)0 + }; + + static OrderStatus::Value get(const char value) + { + switch (value) + { + case 48: return New; + case 49: return PartiallyFilled; + case 50: return Filled; + case 52: return Cancelled; + case 53: return Replaced; + case 56: return Rejected; + case 67: return Expired; + case 85: return Undefined; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum OrderStatus [E103]"); + } + + static const char* c_str(const OrderStatus::Value value) + { + switch (value) + { + case New: return "New"; + case PartiallyFilled: return "PartiallyFilled"; + case Filled: return "Filled"; + case Cancelled: return "Cancelled"; + case Replaced: return "Replaced"; + case Rejected: return "Rejected"; + case Expired: return "Expired"; + case Undefined: return "Undefined"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum OrderStatus [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, OrderStatus::Value m) + { + return os << OrderStatus::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderStatusRequest533.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderStatusRequest533.h new file mode 100644 index 000000000..88f20c3a5 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderStatusRequest533.h @@ -0,0 +1,1221 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERSTATUSREQUEST533_H_ +#define _ILINKBINARY_ORDERSTATUSREQUEST533_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 OrderStatusRequest533 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + OrderStatusRequest533() = default; + + OrderStatusRequest533( + 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_actingVersion(actingVersion) + { + } + + OrderStatusRequest533(char *buffer, const std::uint64_t bufferLength) : + OrderStatusRequest533(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + OrderStatusRequest533( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + OrderStatusRequest533(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)62; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)533; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "H"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + OrderStatusRequest533 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = OrderStatusRequest533(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + OrderStatusRequest533 &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 = OrderStatusRequest533( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + OrderStatusRequest533 &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 = OrderStatusRequest533(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + OrderStatusRequest533 &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 * OrdStatusReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t ordStatusReqIDId() SBE_NOEXCEPT + { + return 790; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t ordStatusReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool ordStatusReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= ordStatusReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t ordStatusReqIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t ordStatusReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t ordStatusReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t ordStatusReqID() 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); + } + + OrderStatusRequest533 &ordStatusReqID(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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + OrderStatusRequest533 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + OrderStatusRequest533 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + OrderStatusRequest533 &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; + } + + OrderStatusRequest533 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderStatusRequest533 &putSenderID(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + OrderStatusRequest533 &putSenderID(const std::string& str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 41; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 41, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderStatusRequest533 &orderID(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 * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 49; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 49, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + OrderStatusRequest533 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 49, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 57; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 57; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 57; + } + + 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 + 57 + (index * 1), sizeof(char)); + return (val); + } + + OrderStatusRequest533 &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 + 57 + (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 + 57, sizeof(char) * static_cast(length)); + return length; + } + + OrderStatusRequest533 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 57, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 57; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 57; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderStatusRequest533 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 57, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 57 + start] = 0; + } + + return *this; + } + #else + OrderStatusRequest533 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 57, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 57 + start] = 0; + } + + return *this; + } + #endif + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, OrderStatusRequest533 _writer) + { + OrderStatusRequest533 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "OrderStatusRequest533", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("OrdStatusReqID": )"; + builder << +writer.ordStatusReqID(); + + 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"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderType.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderType.h new file mode 100644 index 000000000..d3e300df7 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderType.h @@ -0,0 +1,144 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERTYPE_H_ +#define _ILINKBINARY_ORDERTYPE_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class OrderType +{ +public: + enum Value + { + MarketWithProtection = (char)49, + Limit = (char)50, + StopLimit = (char)52, + MarketWithLeftoverAsLimit = (char)75, + NULL_VALUE = (char)0 + }; + + static OrderType::Value get(const char value) + { + switch (value) + { + case 49: return MarketWithProtection; + case 50: return Limit; + case 52: return StopLimit; + case 75: return MarketWithLeftoverAsLimit; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum OrderType [E103]"); + } + + static const char* c_str(const OrderType::Value value) + { + switch (value) + { + case MarketWithProtection: return "MarketWithProtection"; + case Limit: return "Limit"; + case StopLimit: return "StopLimit"; + case MarketWithLeftoverAsLimit: return "MarketWithLeftoverAsLimit"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum OrderType [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, OrderType::Value m) + { + return os << OrderType::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderTypeReq.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderTypeReq.h new file mode 100644 index 000000000..20fcaf088 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/OrderTypeReq.h @@ -0,0 +1,147 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_ORDERTYPEREQ_H_ +#define _ILINKBINARY_ORDERTYPEREQ_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class OrderTypeReq +{ +public: + enum Value + { + MarketwithProtection = (char)49, + Limit = (char)50, + StopwithProtection = (char)51, + StopLimit = (char)52, + MarketWithLeftoverAsLimit = (char)75, + NULL_VALUE = (char)0 + }; + + static OrderTypeReq::Value get(const char value) + { + switch (value) + { + case 49: return MarketwithProtection; + case 50: return Limit; + case 51: return StopwithProtection; + case 52: return StopLimit; + case 75: return MarketWithLeftoverAsLimit; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum OrderTypeReq [E103]"); + } + + static const char* c_str(const OrderTypeReq::Value value) + { + switch (value) + { + case MarketwithProtection: return "MarketwithProtection"; + case Limit: return "Limit"; + case StopwithProtection: return "StopwithProtection"; + case StopLimit: return "StopLimit"; + case MarketWithLeftoverAsLimit: return "MarketWithLeftoverAsLimit"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum OrderTypeReq [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, OrderTypeReq::Value m) + { + return os << OrderTypeReq::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/PRICE9.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/PRICE9.h new file mode 100644 index 000000000..12d393904 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/PRICE9.h @@ -0,0 +1,348 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_PRICE9_H_ +#define _ILINKBINARY_PRICE9_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class PRICE9 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + 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; + }; + + PRICE9() = default; + + PRICE9( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + PRICE9( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + PRICE9(buffer, 0, bufferLength, actingVersion) + { + } + + PRICE9( + char *buffer, + const std::uint64_t bufferLength) : + PRICE9(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + PRICE9 &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = PRICE9(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + 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 SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static const char * mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mantissaSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mantissaEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT64; + } + + static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT + { + return -9223372036854775807L; + } + + static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT + { + return 9223372036854775807L; + } + + static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT + { + std::int64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PRICE9 &mantissa(const std::int64_t value) SBE_NOEXCEPT + { + std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); + return *this; + } + + SBE_NODISCARD static const char * exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= exponentSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exponentEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT + { + return (std::int8_t)-127; + } + + static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT + { + return (std::int8_t)127; + } + + static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT + { + return (std::int8_t)-9; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, PRICE9 writer) + { + builder << '{'; + builder << R"("mantissa": )"; + builder << +writer.mantissa(); + + builder << '}'; + + return builder; + } + +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/PRICENULL9.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/PRICENULL9.h new file mode 100644 index 000000000..01380a561 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/PRICENULL9.h @@ -0,0 +1,348 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_PRICENULL9_H_ +#define _ILINKBINARY_PRICENULL9_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class PRICENULL9 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + 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; + }; + + PRICENULL9() = default; + + PRICENULL9( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + PRICENULL9( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + PRICENULL9(buffer, 0, bufferLength, actingVersion) + { + } + + PRICENULL9( + char *buffer, + const std::uint64_t bufferLength) : + PRICENULL9(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + PRICENULL9 &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = PRICENULL9(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + 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 SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static const char * mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= mantissaSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mantissaEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT + { + return 9223372036854775807L; + } + + static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT + { + return -9223372036854775807L; + } + + static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT + { + return 9223372036854775807L; + } + + static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT + { + std::int64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PRICENULL9 &mantissa(const std::int64_t value) SBE_NOEXCEPT + { + std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); + return *this; + } + + SBE_NODISCARD static const char * exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return ""; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= exponentSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exponentEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT + { + return (std::int8_t)-127; + } + + static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT + { + return (std::int8_t)127; + } + + static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT + { + return (std::int8_t)-9; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, PRICENULL9 writer) + { + builder << '{'; + builder << R"("mantissa": )"; + builder << +writer.mantissa(); + + builder << '}'; + + return builder; + } + +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailRole.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailRole.h new file mode 100644 index 000000000..068a835c0 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailRole.h @@ -0,0 +1,147 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_PARTYDETAILROLE_H_ +#define _ILINKBINARY_PARTYDETAILROLE_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class PartyDetailRole +{ +public: + enum Value + { + ExecutingFirm = (std::uint16_t)1, + CustomerAccount = (std::uint16_t)24, + TakeUpFirm = (std::uint16_t)96, + Operator = (std::uint16_t)118, + TakeUpAccount = (std::uint16_t)1000, + NULL_VALUE = (std::uint16_t)65535 + }; + + static PartyDetailRole::Value get(const std::uint16_t value) + { + switch (value) + { + case 1: return ExecutingFirm; + case 24: return CustomerAccount; + case 96: return TakeUpFirm; + case 118: return Operator; + case 1000: return TakeUpAccount; + case 65535: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum PartyDetailRole [E103]"); + } + + static const char* c_str(const PartyDetailRole::Value value) + { + switch (value) + { + case ExecutingFirm: return "ExecutingFirm"; + case CustomerAccount: return "CustomerAccount"; + case TakeUpFirm: return "TakeUpFirm"; + case Operator: return "Operator"; + case TakeUpAccount: return "TakeUpAccount"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum PartyDetailRole [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, PartyDetailRole::Value m) + { + return os << PartyDetailRole::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailsDefinitionRequest518.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailsDefinitionRequest518.h new file mode 100644 index 000000000..e4a02480c --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailsDefinitionRequest518.h @@ -0,0 +1,2772 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_PARTYDETAILSDEFINITIONREQUEST518_H_ +#define _ILINKBINARY_PARTYDETAILSDEFINITIONREQUEST518_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 PartyDetailsDefinitionRequest518 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + PartyDetailsDefinitionRequest518() = default; + + PartyDetailsDefinitionRequest518( + 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_actingVersion(actingVersion) + { + } + + PartyDetailsDefinitionRequest518(char *buffer, const std::uint64_t bufferLength) : + PartyDetailsDefinitionRequest518(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + PartyDetailsDefinitionRequest518( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + PartyDetailsDefinitionRequest518(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)147; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)518; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "CX"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + PartyDetailsDefinitionRequest518 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = PartyDetailsDefinitionRequest518(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + PartyDetailsDefinitionRequest518 &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 = PartyDetailsDefinitionRequest518( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + PartyDetailsDefinitionRequest518 &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 = PartyDetailsDefinitionRequest518(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + PartyDetailsDefinitionRequest518 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + PartyDetailsDefinitionRequest518 &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 * ListUpdateActionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t listUpdateActionId() SBE_NOEXCEPT + { + return 1324; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t listUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool listUpdateActionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= listUpdateActionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t listUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t listUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ListUpdAct::Value listUpdateAction() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(char)); + return ListUpdAct::get((val)); + } + + PartyDetailsDefinitionRequest518 &listUpdateAction(const ListUpdAct::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + PartyDetailsDefinitionRequest518 &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 * MemoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t memoId() SBE_NOEXCEPT + { + return 5149; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t memoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool memoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= memoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t memoEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + static SBE_CONSTEXPR char memoNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char memoMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char memoMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t memoEncodingLength() SBE_NOEXCEPT + { + return 75; + } + + static SBE_CONSTEXPR std::uint64_t memoLength() SBE_NOEXCEPT + { + return 75; + } + + SBE_NODISCARD const char *memo() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char *memo() SBE_NOEXCEPT + { + return m_buffer + m_offset + 21; + } + + SBE_NODISCARD char memo(const std::uint64_t index) const + { + if (index >= 75) + { + throw std::runtime_error("index out of range for memo [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 21 + (index * 1), sizeof(char)); + return (val); + } + + PartyDetailsDefinitionRequest518 &memo(const std::uint64_t index, const char value) + { + if (index >= 75) + { + throw std::runtime_error("index out of range for memo [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 21 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getMemo(char *const dst, const std::uint64_t length) const + { + if (length > 75) + { + throw std::runtime_error("length too large for getMemo [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 21, sizeof(char) * static_cast(length)); + return length; + } + + PartyDetailsDefinitionRequest518 &putMemo(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 75); + return *this; + } + + std::string getMemoAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 75 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getMemoAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMemoAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getMemoAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 75 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + PartyDetailsDefinitionRequest518 &putMemo(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 75) + { + throw std::runtime_error("string too large for putMemo [E106]"); + } + + std::memcpy(m_buffer + m_offset + 21, str.data(), srcLength); + for (size_t start = srcLength; start < 75; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + PartyDetailsDefinitionRequest518 &putMemo(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 75) + { + throw std::runtime_error("string too large for putMemo [E106]"); + } + + std::memcpy(m_buffer + m_offset + 21, str.c_str(), srcLength); + for (size_t start = srcLength; start < 75; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * AvgPxGroupIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t avgPxGroupIDId() SBE_NOEXCEPT + { + return 1731; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t avgPxGroupIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool avgPxGroupIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= avgPxGroupIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxGroupIDEncodingOffset() SBE_NOEXCEPT + { + return 96; + } + + static SBE_CONSTEXPR char avgPxGroupIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char avgPxGroupIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char avgPxGroupIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t avgPxGroupIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t avgPxGroupIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *avgPxGroupID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 96; + } + + SBE_NODISCARD char *avgPxGroupID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 96; + } + + SBE_NODISCARD char avgPxGroupID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for avgPxGroupID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 96 + (index * 1), sizeof(char)); + return (val); + } + + PartyDetailsDefinitionRequest518 &avgPxGroupID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for avgPxGroupID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 96 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getAvgPxGroupID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getAvgPxGroupID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 96, sizeof(char) * static_cast(length)); + return length; + } + + PartyDetailsDefinitionRequest518 &putAvgPxGroupID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 96, src, sizeof(char) * 20); + return *this; + } + + std::string getAvgPxGroupIDAsString() const + { + const char *buffer = m_buffer + m_offset + 96; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getAvgPxGroupIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getAvgPxGroupIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getAvgPxGroupIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 96; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + PartyDetailsDefinitionRequest518 &putAvgPxGroupID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putAvgPxGroupID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 96, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 96 + start] = 0; + } + + return *this; + } + #else + PartyDetailsDefinitionRequest518 &putAvgPxGroupID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putAvgPxGroupID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 96, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 96 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SelfMatchPreventionIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t selfMatchPreventionIDId() SBE_NOEXCEPT + { + return 2362; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool selfMatchPreventionIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= selfMatchPreventionIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionIDEncodingOffset() SBE_NOEXCEPT + { + return 116; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t selfMatchPreventionIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t selfMatchPreventionID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 116, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequest518 &selfMatchPreventionID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 116, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * CmtaGiveupCDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cmtaGiveupCDId() SBE_NOEXCEPT + { + return 9708; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cmtaGiveupCDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cmtaGiveupCDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cmtaGiveupCDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cmtaGiveupCDEncodingOffset() SBE_NOEXCEPT + { + return 124; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cmtaGiveupCDEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CmtaGiveUpCD::Value cmtaGiveupCD() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 124, sizeof(char)); + return CmtaGiveUpCD::get((val)); + } + + PartyDetailsDefinitionRequest518 &cmtaGiveupCD(const CmtaGiveUpCD::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 124, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * CustOrderCapacityMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t custOrderCapacityId() SBE_NOEXCEPT + { + return 582; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t custOrderCapacitySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool custOrderCapacityInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= custOrderCapacitySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderCapacityEncodingOffset() SBE_NOEXCEPT + { + return 125; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderCapacityEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CustOrderCapacity::Value custOrderCapacity() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 125, sizeof(std::uint8_t)); + return CustOrderCapacity::get((val)); + } + + PartyDetailsDefinitionRequest518 &custOrderCapacity(const CustOrderCapacity::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 125, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ClearingAccountTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t clearingAccountTypeId() SBE_NOEXCEPT + { + return 1816; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearingAccountTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clearingAccountTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clearingAccountTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingAccountTypeEncodingOffset() SBE_NOEXCEPT + { + return 126; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingAccountTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ClearingAcctType::Value clearingAccountType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 126, sizeof(std::uint8_t)); + return ClearingAcctType::get((val)); + } + + PartyDetailsDefinitionRequest518 &clearingAccountType(const ClearingAcctType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 126, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SelfMatchPreventionInstructionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t selfMatchPreventionInstructionId() SBE_NOEXCEPT + { + return 8000; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t selfMatchPreventionInstructionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool selfMatchPreventionInstructionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= selfMatchPreventionInstructionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionInstructionEncodingOffset() SBE_NOEXCEPT + { + return 127; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionInstructionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SMPI::Value selfMatchPreventionInstruction() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 127, sizeof(char)); + return SMPI::get((val)); + } + + PartyDetailsDefinitionRequest518 &selfMatchPreventionInstruction(const SMPI::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 127, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * AvgPxIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t avgPxIndicatorId() SBE_NOEXCEPT + { + return 819; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t avgPxIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool avgPxIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= avgPxIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 128; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD AvgPxInd::Value avgPxIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 128, sizeof(std::uint8_t)); + return AvgPxInd::get((val)); + } + + PartyDetailsDefinitionRequest518 &avgPxIndicator(const AvgPxInd::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 128, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ClearingTradePriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t clearingTradePriceTypeId() SBE_NOEXCEPT + { + return 1598; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearingTradePriceTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clearingTradePriceTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clearingTradePriceTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingTradePriceTypeEncodingOffset() SBE_NOEXCEPT + { + return 129; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingTradePriceTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SLEDS::Value clearingTradePriceType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 129, sizeof(std::uint8_t)); + return SLEDS::get((val)); + } + + PartyDetailsDefinitionRequest518 &clearingTradePriceType(const SLEDS::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 129, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CustOrderHandlingInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t custOrderHandlingInstId() SBE_NOEXCEPT + { + return 1031; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t custOrderHandlingInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool custOrderHandlingInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= custOrderHandlingInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderHandlingInstEncodingOffset() SBE_NOEXCEPT + { + return 130; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderHandlingInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CustOrdHandlInst::Value custOrderHandlingInst() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 130, sizeof(char)); + return CustOrdHandlInst::get((val)); + } + + PartyDetailsDefinitionRequest518 &custOrderHandlingInst(const CustOrdHandlInst::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 130, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * ExecutorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t executorId() SBE_NOEXCEPT + { + return 5290; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executorEncodingOffset() SBE_NOEXCEPT + { + return 131; + } + + static SBE_CONSTEXPR std::uint64_t executorNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t executorMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t executorMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t executorEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t executor() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 131, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequest518 &executor(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 131, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * IDMShortCodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t iDMShortCodeId() SBE_NOEXCEPT + { + return 36023; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t iDMShortCodeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool iDMShortCodeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= iDMShortCodeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t iDMShortCodeEncodingOffset() SBE_NOEXCEPT + { + return 139; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t iDMShortCodeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t iDMShortCode() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 139, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequest518 &iDMShortCode(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 139, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * NoPartyUpdatesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t noPartyUpdatesId() SBE_NOEXCEPT + { + return 1676; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noPartyUpdatesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noPartyUpdatesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noPartyUpdatesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t noPartyUpdatesEncodingOffset() SBE_NOEXCEPT + { + return 147; + } + + static SBE_CONSTEXPR std::uint8_t noPartyUpdatesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t noPartyUpdatesMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t noPartyUpdatesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t noPartyUpdatesEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint8_t noPartyUpdates() SBE_NOEXCEPT + { + return (std::uint8_t)1; + } + + class NoPartyDetails + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)22); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 22; + m_actingVersion = actingVersion; + 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 22; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoPartyDetails &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * PartyDetailIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t partyDetailIDId() SBE_NOEXCEPT + { + return 1691; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char partyDetailIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char partyDetailIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char partyDetailIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t partyDetailIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *partyDetailID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *partyDetailID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char partyDetailID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for partyDetailID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoPartyDetails &partyDetailID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for partyDetailID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getPartyDetailID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getPartyDetailID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoPartyDetails &putPartyDetailID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 20); + return *this; + } + + std::string getPartyDetailIDAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getPartyDetailIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getPartyDetailIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getPartyDetailIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoPartyDetails &putPartyDetailID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putPartyDetailID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoPartyDetails &putPartyDetailID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putPartyDetailID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t partyDetailIDSourceId() SBE_NOEXCEPT + { + return 1692; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR char partyDetailIDSourceNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char partyDetailIDSourceMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char partyDetailIDSourceMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t partyDetailIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *partyDetailIDSource() const + { + static const std::uint8_t partyDetailIDSourceValues[] = { 67 }; + + return (const char *)partyDetailIDSourceValues; + } + + SBE_NODISCARD char partyDetailIDSource(const std::uint64_t index) const + { + static const std::uint8_t partyDetailIDSourceValues[] = { 67 }; + + return (char)partyDetailIDSourceValues[index]; + } + + std::uint64_t getPartyDetailIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t partyDetailIDSourceValues[] = { 67 }; + std::uint64_t bytesToCopy = length < sizeof(partyDetailIDSourceValues) ? length : sizeof(partyDetailIDSourceValues); + + std::memcpy(dst, partyDetailIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getPartyDetailIDSourceAsString() const + { + static const std::uint8_t PartyDetailIDSourceValues[] = { 67 }; + + return std::string((const char *)PartyDetailIDSourceValues, 1); + } + + std::string getPartyDetailIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getPartyDetailIDSourceAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * PartyDetailRoleMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t partyDetailRoleId() SBE_NOEXCEPT + { + return 1693; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailRoleSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailRoleInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailRoleSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailRoleEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailRoleEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD PartyDetailRole::Value partyDetailRole() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint16_t)); + return PartyDetailRole::get(SBE_LITTLE_ENDIAN_ENCODE_16(val)); + } + + NoPartyDetails &partyDetailRole(const PartyDetailRole::Value value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoPartyDetails writer) + { + builder << '{'; + builder << R"("PartyDetailID": )"; + builder << '"' << + writer.getPartyDetailIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailRole": )"; + builder << '"' << writer.partyDetailRole() << '"'; + + builder << '}'; + + return builder; + } + }; + +private: + NoPartyDetails m_noPartyDetails; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoPartyDetailsId() SBE_NOEXCEPT + { + return 1671; + } + + SBE_NODISCARD inline NoPartyDetails &noPartyDetails() + { + m_noPartyDetails.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noPartyDetails; + } + + NoPartyDetails &noPartyDetailsCount(const std::uint8_t count) + { + m_noPartyDetails.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noPartyDetails; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noPartyDetailsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noPartyDetailsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noPartyDetailsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoTrdRegPublications + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)2); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 2; + m_actingVersion = actingVersion; + 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 + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoTrdRegPublications &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * TrdRegPublicationTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t trdRegPublicationTypeId() SBE_NOEXCEPT + { + return 2669; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t trdRegPublicationTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool trdRegPublicationTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= trdRegPublicationTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t trdRegPublicationTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t trdRegPublicationTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t trdRegPublicationType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); + return (val); + } + + NoTrdRegPublications &trdRegPublicationType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TrdRegPublicationReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t trdRegPublicationReasonId() SBE_NOEXCEPT + { + return 2670; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t trdRegPublicationReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool trdRegPublicationReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= trdRegPublicationReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t trdRegPublicationReasonEncodingOffset() SBE_NOEXCEPT + { + return 1; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t trdRegPublicationReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t trdRegPublicationReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint8_t)); + return (val); + } + + NoTrdRegPublications &trdRegPublicationReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoTrdRegPublications writer) + { + builder << '{'; + builder << R"("TrdRegPublicationType": )"; + builder << +writer.trdRegPublicationType(); + + builder << ", "; + builder << R"("TrdRegPublicationReason": )"; + builder << +writer.trdRegPublicationReason(); + + builder << '}'; + + return builder; + } + }; + +private: + NoTrdRegPublications m_noTrdRegPublications; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoTrdRegPublicationsId() SBE_NOEXCEPT + { + return 2668; + } + + SBE_NODISCARD inline NoTrdRegPublications &noTrdRegPublications() + { + m_noTrdRegPublications.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noTrdRegPublications; + } + + NoTrdRegPublications &noTrdRegPublicationsCount(const std::uint8_t count) + { + m_noTrdRegPublications.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noTrdRegPublications; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noTrdRegPublicationsSinceVersion() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD bool noTrdRegPublicationsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noTrdRegPublicationsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, PartyDetailsDefinitionRequest518 _writer) + { + PartyDetailsDefinitionRequest518 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "PartyDetailsDefinitionRequest518", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("ListUpdateAction": )"; + builder << '"' << writer.listUpdateAction() << '"'; + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("Memo": )"; + builder << '"' << + writer.getMemoAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("AvgPxGroupID": )"; + builder << '"' << + writer.getAvgPxGroupIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SelfMatchPreventionID": )"; + builder << +writer.selfMatchPreventionID(); + + builder << ", "; + builder << R"("CmtaGiveupCD": )"; + builder << '"' << writer.cmtaGiveupCD() << '"'; + + builder << ", "; + builder << R"("CustOrderCapacity": )"; + builder << '"' << writer.custOrderCapacity() << '"'; + + builder << ", "; + builder << R"("ClearingAccountType": )"; + builder << '"' << writer.clearingAccountType() << '"'; + + builder << ", "; + builder << R"("SelfMatchPreventionInstruction": )"; + builder << '"' << writer.selfMatchPreventionInstruction() << '"'; + + builder << ", "; + builder << R"("AvgPxIndicator": )"; + builder << '"' << writer.avgPxIndicator() << '"'; + + builder << ", "; + builder << R"("ClearingTradePriceType": )"; + builder << '"' << writer.clearingTradePriceType() << '"'; + + builder << ", "; + builder << R"("CustOrderHandlingInst": )"; + builder << '"' << writer.custOrderHandlingInst() << '"'; + + builder << ", "; + builder << R"("Executor": )"; + builder << +writer.executor(); + + builder << ", "; + builder << R"("IDMShortCode": )"; + builder << +writer.iDMShortCode(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoPartyDetails": [)"; + writer.noPartyDetails().forEach([&](NoPartyDetails& noPartyDetails) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noPartyDetails; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoTrdRegPublications": [)"; + writer.noTrdRegPublications().forEach([&](NoTrdRegPublications& noTrdRegPublications) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noTrdRegPublications; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailsDefinitionRequestAck519.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailsDefinitionRequestAck519.h new file mode 100644 index 000000000..acd937500 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailsDefinitionRequestAck519.h @@ -0,0 +1,3132 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_PARTYDETAILSDEFINITIONREQUESTACK519_H_ +#define _ILINKBINARY_PARTYDETAILSDEFINITIONREQUESTACK519_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 PartyDetailsDefinitionRequestAck519 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + PartyDetailsDefinitionRequestAck519() = default; + + PartyDetailsDefinitionRequestAck519( + 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_actingVersion(actingVersion) + { + } + + PartyDetailsDefinitionRequestAck519(char *buffer, const std::uint64_t bufferLength) : + PartyDetailsDefinitionRequestAck519(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + PartyDetailsDefinitionRequestAck519( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + PartyDetailsDefinitionRequestAck519(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)159; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)519; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "CY"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + PartyDetailsDefinitionRequestAck519 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = PartyDetailsDefinitionRequestAck519(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + PartyDetailsDefinitionRequestAck519 &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 = PartyDetailsDefinitionRequestAck519( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + PartyDetailsDefinitionRequestAck519 &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 = PartyDetailsDefinitionRequestAck519(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + PartyDetailsDefinitionRequestAck519 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + PartyDetailsDefinitionRequestAck519 &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 * MemoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t memoId() SBE_NOEXCEPT + { + return 5149; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t memoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool memoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= memoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t memoEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char memoNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char memoMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char memoMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t memoEncodingLength() SBE_NOEXCEPT + { + return 75; + } + + static SBE_CONSTEXPR std::uint64_t memoLength() SBE_NOEXCEPT + { + return 75; + } + + SBE_NODISCARD const char *memo() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *memo() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char memo(const std::uint64_t index) const + { + if (index >= 75) + { + throw std::runtime_error("index out of range for memo [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + PartyDetailsDefinitionRequestAck519 &memo(const std::uint64_t index, const char value) + { + if (index >= 75) + { + throw std::runtime_error("index out of range for memo [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getMemo(char *const dst, const std::uint64_t length) const + { + if (length > 75) + { + throw std::runtime_error("length too large for getMemo [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + PartyDetailsDefinitionRequestAck519 &putMemo(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 75); + return *this; + } + + std::string getMemoAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 75 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getMemoAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMemoAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getMemoAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 75 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + PartyDetailsDefinitionRequestAck519 &putMemo(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 75) + { + throw std::runtime_error("string too large for putMemo [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 75; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + PartyDetailsDefinitionRequestAck519 &putMemo(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 75) + { + throw std::runtime_error("string too large for putMemo [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 75; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * AvgPxGroupIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t avgPxGroupIDId() SBE_NOEXCEPT + { + return 1731; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t avgPxGroupIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool avgPxGroupIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= avgPxGroupIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxGroupIDEncodingOffset() SBE_NOEXCEPT + { + return 87; + } + + static SBE_CONSTEXPR char avgPxGroupIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char avgPxGroupIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char avgPxGroupIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t avgPxGroupIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t avgPxGroupIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *avgPxGroupID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 87; + } + + SBE_NODISCARD char *avgPxGroupID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 87; + } + + SBE_NODISCARD char avgPxGroupID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for avgPxGroupID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 87 + (index * 1), sizeof(char)); + return (val); + } + + PartyDetailsDefinitionRequestAck519 &avgPxGroupID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for avgPxGroupID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 87 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getAvgPxGroupID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getAvgPxGroupID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 87, sizeof(char) * static_cast(length)); + return length; + } + + PartyDetailsDefinitionRequestAck519 &putAvgPxGroupID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 87, src, sizeof(char) * 20); + return *this; + } + + std::string getAvgPxGroupIDAsString() const + { + const char *buffer = m_buffer + m_offset + 87; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getAvgPxGroupIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getAvgPxGroupIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getAvgPxGroupIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 87; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + PartyDetailsDefinitionRequestAck519 &putAvgPxGroupID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putAvgPxGroupID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 87, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 87 + start] = 0; + } + + return *this; + } + #else + PartyDetailsDefinitionRequestAck519 &putAvgPxGroupID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putAvgPxGroupID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 87, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 87 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 107; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 107, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequestAck519 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 107, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 115; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 115, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequestAck519 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 115, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SelfMatchPreventionIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t selfMatchPreventionIDId() SBE_NOEXCEPT + { + return 2362; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool selfMatchPreventionIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= selfMatchPreventionIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionIDEncodingOffset() SBE_NOEXCEPT + { + return 123; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t selfMatchPreventionIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t selfMatchPreventionID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 123, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequestAck519 &selfMatchPreventionID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 123, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PartyDetailRequestStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t partyDetailRequestStatusId() SBE_NOEXCEPT + { + return 1878; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailRequestStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailRequestStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailRequestStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailRequestStatusEncodingOffset() SBE_NOEXCEPT + { + return 131; + } + + static SBE_CONSTEXPR std::uint8_t partyDetailRequestStatusNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t partyDetailRequestStatusMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t partyDetailRequestStatusMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t partyDetailRequestStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t partyDetailRequestStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 131, sizeof(std::uint8_t)); + return (val); + } + + PartyDetailsDefinitionRequestAck519 &partyDetailRequestStatus(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 131, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CustOrderCapacityMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t custOrderCapacityId() SBE_NOEXCEPT + { + return 582; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t custOrderCapacitySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool custOrderCapacityInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= custOrderCapacitySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderCapacityEncodingOffset() SBE_NOEXCEPT + { + return 132; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderCapacityEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CustOrderCapacity::Value custOrderCapacity() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 132, sizeof(std::uint8_t)); + return CustOrderCapacity::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &custOrderCapacity(const CustOrderCapacity::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 132, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ClearingAccountTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t clearingAccountTypeId() SBE_NOEXCEPT + { + return 1816; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearingAccountTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clearingAccountTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clearingAccountTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingAccountTypeEncodingOffset() SBE_NOEXCEPT + { + return 133; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingAccountTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ClearingAcctType::Value clearingAccountType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 133, sizeof(std::uint8_t)); + return ClearingAcctType::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &clearingAccountType(const ClearingAcctType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 133, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SelfMatchPreventionInstructionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t selfMatchPreventionInstructionId() SBE_NOEXCEPT + { + return 8000; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t selfMatchPreventionInstructionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool selfMatchPreventionInstructionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= selfMatchPreventionInstructionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionInstructionEncodingOffset() SBE_NOEXCEPT + { + return 134; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionInstructionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SMPI::Value selfMatchPreventionInstruction() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 134, sizeof(char)); + return SMPI::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &selfMatchPreventionInstruction(const SMPI::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 134, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * AvgPxIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t avgPxIndicatorId() SBE_NOEXCEPT + { + return 819; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t avgPxIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool avgPxIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= avgPxIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 135; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD AvgPxInd::Value avgPxIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 135, sizeof(std::uint8_t)); + return AvgPxInd::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &avgPxIndicator(const AvgPxInd::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 135, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ClearingTradePriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t clearingTradePriceTypeId() SBE_NOEXCEPT + { + return 1598; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearingTradePriceTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clearingTradePriceTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clearingTradePriceTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingTradePriceTypeEncodingOffset() SBE_NOEXCEPT + { + return 136; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingTradePriceTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SLEDS::Value clearingTradePriceType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 136, sizeof(std::uint8_t)); + return SLEDS::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &clearingTradePriceType(const SLEDS::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 136, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CmtaGiveupCDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cmtaGiveupCDId() SBE_NOEXCEPT + { + return 9708; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cmtaGiveupCDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cmtaGiveupCDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cmtaGiveupCDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cmtaGiveupCDEncodingOffset() SBE_NOEXCEPT + { + return 137; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cmtaGiveupCDEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CmtaGiveUpCD::Value cmtaGiveupCD() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 137, sizeof(char)); + return CmtaGiveUpCD::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &cmtaGiveupCD(const CmtaGiveUpCD::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 137, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * CustOrderHandlingInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t custOrderHandlingInstId() SBE_NOEXCEPT + { + return 1031; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t custOrderHandlingInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool custOrderHandlingInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= custOrderHandlingInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderHandlingInstEncodingOffset() SBE_NOEXCEPT + { + return 138; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderHandlingInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CustOrdHandlInst::Value custOrderHandlingInst() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 138, sizeof(char)); + return CustOrdHandlInst::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &custOrderHandlingInst(const CustOrdHandlInst::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 138, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * NoPartyUpdatesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t noPartyUpdatesId() SBE_NOEXCEPT + { + return 1676; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noPartyUpdatesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noPartyUpdatesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noPartyUpdatesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t noPartyUpdatesEncodingOffset() SBE_NOEXCEPT + { + return 139; + } + + static SBE_CONSTEXPR std::uint8_t noPartyUpdatesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t noPartyUpdatesMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t noPartyUpdatesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t noPartyUpdatesEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint8_t noPartyUpdates() SBE_NOEXCEPT + { + return (std::uint8_t)1; + } + + SBE_NODISCARD static const char * ListUpdateActionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t listUpdateActionId() SBE_NOEXCEPT + { + return 1324; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t listUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool listUpdateActionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= listUpdateActionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t listUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 139; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t listUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ListUpdAct::Value listUpdateAction() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 139, sizeof(char)); + return ListUpdAct::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &listUpdateAction(const ListUpdAct::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 139, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * PartyDetailDefinitionStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t partyDetailDefinitionStatusId() SBE_NOEXCEPT + { + return 1879; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailDefinitionStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailDefinitionStatusInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailDefinitionStatusSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailDefinitionStatusEncodingOffset() SBE_NOEXCEPT + { + return 140; + } + + static SBE_CONSTEXPR std::uint8_t partyDetailDefinitionStatusNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t partyDetailDefinitionStatusMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t partyDetailDefinitionStatusMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t partyDetailDefinitionStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t partyDetailDefinitionStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 140, sizeof(std::uint8_t)); + return (val); + } + + PartyDetailsDefinitionRequestAck519 &partyDetailDefinitionStatus(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 140, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ExecutorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t executorId() SBE_NOEXCEPT + { + return 5290; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executorEncodingOffset() SBE_NOEXCEPT + { + return 141; + } + + static SBE_CONSTEXPR std::uint64_t executorNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t executorMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t executorMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t executorEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t executor() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 141, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequestAck519 &executor(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 141, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * IDMShortCodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t iDMShortCodeId() SBE_NOEXCEPT + { + return 36023; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t iDMShortCodeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool iDMShortCodeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= iDMShortCodeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t iDMShortCodeEncodingOffset() SBE_NOEXCEPT + { + return 149; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t iDMShortCodeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t iDMShortCode() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 149, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsDefinitionRequestAck519 &iDMShortCode(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 149, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 157; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 157, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 157, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 158; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 158, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + PartyDetailsDefinitionRequestAck519 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 158, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoPartyDetails + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)22); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 22; + m_actingVersion = actingVersion; + 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 22; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoPartyDetails &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * PartyDetailIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t partyDetailIDId() SBE_NOEXCEPT + { + return 1691; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char partyDetailIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char partyDetailIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char partyDetailIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t partyDetailIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *partyDetailID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *partyDetailID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char partyDetailID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for partyDetailID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoPartyDetails &partyDetailID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for partyDetailID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getPartyDetailID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getPartyDetailID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoPartyDetails &putPartyDetailID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 20); + return *this; + } + + std::string getPartyDetailIDAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getPartyDetailIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getPartyDetailIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getPartyDetailIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoPartyDetails &putPartyDetailID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putPartyDetailID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoPartyDetails &putPartyDetailID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putPartyDetailID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t partyDetailIDSourceId() SBE_NOEXCEPT + { + return 1692; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR char partyDetailIDSourceNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char partyDetailIDSourceMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char partyDetailIDSourceMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t partyDetailIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *partyDetailIDSource() const + { + static const std::uint8_t partyDetailIDSourceValues[] = { 67 }; + + return (const char *)partyDetailIDSourceValues; + } + + SBE_NODISCARD char partyDetailIDSource(const std::uint64_t index) const + { + static const std::uint8_t partyDetailIDSourceValues[] = { 67 }; + + return (char)partyDetailIDSourceValues[index]; + } + + std::uint64_t getPartyDetailIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t partyDetailIDSourceValues[] = { 67 }; + std::uint64_t bytesToCopy = length < sizeof(partyDetailIDSourceValues) ? length : sizeof(partyDetailIDSourceValues); + + std::memcpy(dst, partyDetailIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getPartyDetailIDSourceAsString() const + { + static const std::uint8_t PartyDetailIDSourceValues[] = { 67 }; + + return std::string((const char *)PartyDetailIDSourceValues, 1); + } + + std::string getPartyDetailIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getPartyDetailIDSourceAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * PartyDetailRoleMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t partyDetailRoleId() SBE_NOEXCEPT + { + return 1693; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailRoleSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailRoleInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailRoleSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailRoleEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailRoleEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD PartyDetailRole::Value partyDetailRole() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint16_t)); + return PartyDetailRole::get(SBE_LITTLE_ENDIAN_ENCODE_16(val)); + } + + NoPartyDetails &partyDetailRole(const PartyDetailRole::Value value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoPartyDetails writer) + { + builder << '{'; + builder << R"("PartyDetailID": )"; + builder << '"' << + writer.getPartyDetailIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailRole": )"; + builder << '"' << writer.partyDetailRole() << '"'; + + builder << '}'; + + return builder; + } + }; + +private: + NoPartyDetails m_noPartyDetails; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoPartyDetailsId() SBE_NOEXCEPT + { + return 1671; + } + + SBE_NODISCARD inline NoPartyDetails &noPartyDetails() + { + m_noPartyDetails.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noPartyDetails; + } + + NoPartyDetails &noPartyDetailsCount(const std::uint8_t count) + { + m_noPartyDetails.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noPartyDetails; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noPartyDetailsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noPartyDetailsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noPartyDetailsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoTrdRegPublications + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)2); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 2; + m_actingVersion = actingVersion; + 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 + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoTrdRegPublications &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * TrdRegPublicationTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t trdRegPublicationTypeId() SBE_NOEXCEPT + { + return 2669; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t trdRegPublicationTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool trdRegPublicationTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= trdRegPublicationTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t trdRegPublicationTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t trdRegPublicationTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t trdRegPublicationType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); + return (val); + } + + NoTrdRegPublications &trdRegPublicationType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TrdRegPublicationReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t trdRegPublicationReasonId() SBE_NOEXCEPT + { + return 2670; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t trdRegPublicationReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool trdRegPublicationReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= trdRegPublicationReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t trdRegPublicationReasonEncodingOffset() SBE_NOEXCEPT + { + return 1; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t trdRegPublicationReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t trdRegPublicationReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint8_t)); + return (val); + } + + NoTrdRegPublications &trdRegPublicationReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoTrdRegPublications writer) + { + builder << '{'; + builder << R"("TrdRegPublicationType": )"; + builder << +writer.trdRegPublicationType(); + + builder << ", "; + builder << R"("TrdRegPublicationReason": )"; + builder << +writer.trdRegPublicationReason(); + + builder << '}'; + + return builder; + } + }; + +private: + NoTrdRegPublications m_noTrdRegPublications; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoTrdRegPublicationsId() SBE_NOEXCEPT + { + return 2668; + } + + SBE_NODISCARD inline NoTrdRegPublications &noTrdRegPublications() + { + m_noTrdRegPublications.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noTrdRegPublications; + } + + NoTrdRegPublications &noTrdRegPublicationsCount(const std::uint8_t count) + { + m_noTrdRegPublications.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noTrdRegPublications; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noTrdRegPublicationsSinceVersion() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD bool noTrdRegPublicationsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noTrdRegPublicationsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, PartyDetailsDefinitionRequestAck519 _writer) + { + PartyDetailsDefinitionRequestAck519 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "PartyDetailsDefinitionRequestAck519", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("Memo": )"; + builder << '"' << + writer.getMemoAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("AvgPxGroupID": )"; + builder << '"' << + writer.getAvgPxGroupIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SelfMatchPreventionID": )"; + builder << +writer.selfMatchPreventionID(); + + builder << ", "; + builder << R"("PartyDetailRequestStatus": )"; + builder << +writer.partyDetailRequestStatus(); + + builder << ", "; + builder << R"("CustOrderCapacity": )"; + builder << '"' << writer.custOrderCapacity() << '"'; + + builder << ", "; + builder << R"("ClearingAccountType": )"; + builder << '"' << writer.clearingAccountType() << '"'; + + builder << ", "; + builder << R"("SelfMatchPreventionInstruction": )"; + builder << '"' << writer.selfMatchPreventionInstruction() << '"'; + + builder << ", "; + builder << R"("AvgPxIndicator": )"; + builder << '"' << writer.avgPxIndicator() << '"'; + + builder << ", "; + builder << R"("ClearingTradePriceType": )"; + builder << '"' << writer.clearingTradePriceType() << '"'; + + builder << ", "; + builder << R"("CmtaGiveupCD": )"; + builder << '"' << writer.cmtaGiveupCD() << '"'; + + builder << ", "; + builder << R"("CustOrderHandlingInst": )"; + builder << '"' << writer.custOrderHandlingInst() << '"'; + + builder << ", "; + builder << R"("ListUpdateAction": )"; + builder << '"' << writer.listUpdateAction() << '"'; + + builder << ", "; + builder << R"("PartyDetailDefinitionStatus": )"; + builder << +writer.partyDetailDefinitionStatus(); + + builder << ", "; + builder << R"("Executor": )"; + builder << +writer.executor(); + + builder << ", "; + builder << R"("IDMShortCode": )"; + builder << +writer.iDMShortCode(); + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoPartyDetails": [)"; + writer.noPartyDetails().forEach([&](NoPartyDetails& noPartyDetails) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noPartyDetails; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoTrdRegPublications": [)"; + writer.noTrdRegPublications().forEach([&](NoTrdRegPublications& noTrdRegPublications) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noTrdRegPublications; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailsListReport538.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailsListReport538.h new file mode 100644 index 000000000..b4c6d2a56 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailsListReport538.h @@ -0,0 +1,2916 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_PARTYDETAILSLISTREPORT538_H_ +#define _ILINKBINARY_PARTYDETAILSLISTREPORT538_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 PartyDetailsListReport538 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + PartyDetailsListReport538() = default; + + PartyDetailsListReport538( + 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_actingVersion(actingVersion) + { + } + + PartyDetailsListReport538(char *buffer, const std::uint64_t bufferLength) : + PartyDetailsListReport538(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + PartyDetailsListReport538( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + PartyDetailsListReport538(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)93; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)538; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "CG"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + PartyDetailsListReport538 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = PartyDetailsListReport538(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + PartyDetailsListReport538 &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 = PartyDetailsListReport538( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + PartyDetailsListReport538 &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 = PartyDetailsListReport538(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + PartyDetailsListReport538 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + PartyDetailsListReport538 &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 * AvgPxGroupIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t avgPxGroupIDId() SBE_NOEXCEPT + { + return 1731; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t avgPxGroupIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool avgPxGroupIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= avgPxGroupIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxGroupIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR char avgPxGroupIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char avgPxGroupIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char avgPxGroupIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t avgPxGroupIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t avgPxGroupIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *avgPxGroupID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char *avgPxGroupID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 12; + } + + SBE_NODISCARD char avgPxGroupID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for avgPxGroupID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 12 + (index * 1), sizeof(char)); + return (val); + } + + PartyDetailsListReport538 &avgPxGroupID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for avgPxGroupID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 12 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getAvgPxGroupID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getAvgPxGroupID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 12, sizeof(char) * static_cast(length)); + return length; + } + + PartyDetailsListReport538 &putAvgPxGroupID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 20); + return *this; + } + + std::string getAvgPxGroupIDAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getAvgPxGroupIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getAvgPxGroupIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getAvgPxGroupIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + PartyDetailsListReport538 &putAvgPxGroupID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putAvgPxGroupID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + PartyDetailsListReport538 &putAvgPxGroupID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putAvgPxGroupID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 12, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 32; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 32, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsListReport538 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PartyDetailsListReportIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t partyDetailsListReportIDId() SBE_NOEXCEPT + { + return 1510; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailsListReportIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailsListReportIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= partyDetailsListReportIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailsListReportIDEncodingOffset() SBE_NOEXCEPT + { + return 40; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReportIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReportIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReportIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyDetailsListReportIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyDetailsListReportID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 40, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsListReport538 &partyDetailsListReportID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 40, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 48; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 48, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsListReport538 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 48, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SelfMatchPreventionIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t selfMatchPreventionIDId() SBE_NOEXCEPT + { + return 2362; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool selfMatchPreventionIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= selfMatchPreventionIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionIDEncodingOffset() SBE_NOEXCEPT + { + return 56; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t selfMatchPreventionIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t selfMatchPreventionIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t selfMatchPreventionID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 56, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsListReport538 &selfMatchPreventionID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 56, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * TotNumPartiesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t totNumPartiesId() SBE_NOEXCEPT + { + return 1512; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNumPartiesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool totNumPartiesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= totNumPartiesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNumPartiesEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + static SBE_CONSTEXPR std::uint16_t totNumPartiesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t totNumPartiesMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t totNumPartiesMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t totNumPartiesEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t totNumParties() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + PartyDetailsListReport538 &totNumParties(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestResultMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestResultId() SBE_NOEXCEPT + { + return 1511; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestResultSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestResultInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestResultSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestResultEncodingOffset() SBE_NOEXCEPT + { + return 66; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestResultEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ReqResult::Value requestResult() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t)); + return ReqResult::get((val)); + } + + PartyDetailsListReport538 &requestResult(const ReqResult::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 66, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LastFragmentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastFragmentId() SBE_NOEXCEPT + { + return 893; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastFragmentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastFragmentInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastFragmentSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastFragmentEncodingOffset() SBE_NOEXCEPT + { + return 67; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastFragmentEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value lastFragment() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 67, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + PartyDetailsListReport538 &lastFragment(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 67, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CustOrderCapacityMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t custOrderCapacityId() SBE_NOEXCEPT + { + return 582; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t custOrderCapacitySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool custOrderCapacityInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= custOrderCapacitySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderCapacityEncodingOffset() SBE_NOEXCEPT + { + return 68; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderCapacityEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CustOrderCapacity::Value custOrderCapacity() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 68, sizeof(std::uint8_t)); + return CustOrderCapacity::get((val)); + } + + PartyDetailsListReport538 &custOrderCapacity(const CustOrderCapacity::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 68, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ClearingAccountTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t clearingAccountTypeId() SBE_NOEXCEPT + { + return 1816; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearingAccountTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clearingAccountTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clearingAccountTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingAccountTypeEncodingOffset() SBE_NOEXCEPT + { + return 69; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingAccountTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ClearingAcctType::Value clearingAccountType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 69, sizeof(std::uint8_t)); + return ClearingAcctType::get((val)); + } + + PartyDetailsListReport538 &clearingAccountType(const ClearingAcctType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 69, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SelfMatchPreventionInstructionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t selfMatchPreventionInstructionId() SBE_NOEXCEPT + { + return 8000; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t selfMatchPreventionInstructionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool selfMatchPreventionInstructionInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= selfMatchPreventionInstructionSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionInstructionEncodingOffset() SBE_NOEXCEPT + { + return 70; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t selfMatchPreventionInstructionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SMPI::Value selfMatchPreventionInstruction() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 70, sizeof(char)); + return SMPI::get((val)); + } + + PartyDetailsListReport538 &selfMatchPreventionInstruction(const SMPI::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 70, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * AvgPxIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t avgPxIndicatorId() SBE_NOEXCEPT + { + return 819; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t avgPxIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool avgPxIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= avgPxIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 71; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t avgPxIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD AvgPxInd::Value avgPxIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 71, sizeof(std::uint8_t)); + return AvgPxInd::get((val)); + } + + PartyDetailsListReport538 &avgPxIndicator(const AvgPxInd::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 71, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ClearingTradePriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t clearingTradePriceTypeId() SBE_NOEXCEPT + { + return 1598; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearingTradePriceTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool clearingTradePriceTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= clearingTradePriceTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingTradePriceTypeEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearingTradePriceTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SLEDS::Value clearingTradePriceType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 72, sizeof(std::uint8_t)); + return SLEDS::get((val)); + } + + PartyDetailsListReport538 &clearingTradePriceType(const SLEDS::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 72, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * CmtaGiveupCDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cmtaGiveupCDId() SBE_NOEXCEPT + { + return 9708; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cmtaGiveupCDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cmtaGiveupCDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cmtaGiveupCDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cmtaGiveupCDEncodingOffset() SBE_NOEXCEPT + { + return 73; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cmtaGiveupCDEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CmtaGiveUpCD::Value cmtaGiveupCD() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 73, sizeof(char)); + return CmtaGiveUpCD::get((val)); + } + + PartyDetailsListReport538 &cmtaGiveupCD(const CmtaGiveUpCD::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 73, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * CustOrderHandlingInstMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t custOrderHandlingInstId() SBE_NOEXCEPT + { + return 1031; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t custOrderHandlingInstSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool custOrderHandlingInstInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= custOrderHandlingInstSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderHandlingInstEncodingOffset() SBE_NOEXCEPT + { + return 74; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t custOrderHandlingInstEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD CustOrdHandlInst::Value custOrderHandlingInst() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 74, sizeof(char)); + return CustOrdHandlInst::get((val)); + } + + PartyDetailsListReport538 &custOrderHandlingInst(const CustOrdHandlInst::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 74, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * ExecutorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t executorId() SBE_NOEXCEPT + { + return 5290; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t executorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool executorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= executorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t executorEncodingOffset() SBE_NOEXCEPT + { + return 75; + } + + static SBE_CONSTEXPR std::uint64_t executorNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t executorMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t executorMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t executorEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t executor() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 75, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsListReport538 &executor(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 75, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * IDMShortCodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t iDMShortCodeId() SBE_NOEXCEPT + { + return 36023; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t iDMShortCodeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool iDMShortCodeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= iDMShortCodeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t iDMShortCodeEncodingOffset() SBE_NOEXCEPT + { + return 83; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t iDMShortCodeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t iDMShortCodeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t iDMShortCode() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 83, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + PartyDetailsListReport538 &iDMShortCode(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 83, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 91; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 91, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + PartyDetailsListReport538 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 91, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 92; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 92, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + PartyDetailsListReport538 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 92, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoPartyDetails + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)22); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 22; + m_actingVersion = actingVersion; + 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 22; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoPartyDetails &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * PartyDetailIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t partyDetailIDId() SBE_NOEXCEPT + { + return 1691; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char partyDetailIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char partyDetailIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char partyDetailIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t partyDetailIDEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailIDLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *partyDetailID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *partyDetailID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char partyDetailID(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for partyDetailID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoPartyDetails &partyDetailID(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for partyDetailID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getPartyDetailID(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getPartyDetailID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoPartyDetails &putPartyDetailID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 20); + return *this; + } + + std::string getPartyDetailIDAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getPartyDetailIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getPartyDetailIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getPartyDetailIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoPartyDetails &putPartyDetailID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putPartyDetailID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoPartyDetails &putPartyDetailID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putPartyDetailID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t partyDetailIDSourceId() SBE_NOEXCEPT + { + return 1692; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR char partyDetailIDSourceNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char partyDetailIDSourceMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char partyDetailIDSourceMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t partyDetailIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *partyDetailIDSource() const + { + static const std::uint8_t partyDetailIDSourceValues[] = { 67 }; + + return (const char *)partyDetailIDSourceValues; + } + + SBE_NODISCARD char partyDetailIDSource(const std::uint64_t index) const + { + static const std::uint8_t partyDetailIDSourceValues[] = { 67 }; + + return (char)partyDetailIDSourceValues[index]; + } + + std::uint64_t getPartyDetailIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t partyDetailIDSourceValues[] = { 67 }; + std::uint64_t bytesToCopy = length < sizeof(partyDetailIDSourceValues) ? length : sizeof(partyDetailIDSourceValues); + + std::memcpy(dst, partyDetailIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getPartyDetailIDSourceAsString() const + { + static const std::uint8_t PartyDetailIDSourceValues[] = { 67 }; + + return std::string((const char *)PartyDetailIDSourceValues, 1); + } + + std::string getPartyDetailIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getPartyDetailIDSourceAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * PartyDetailRoleMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t partyDetailRoleId() SBE_NOEXCEPT + { + return 1693; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyDetailRoleSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyDetailRoleInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyDetailRoleSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailRoleEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyDetailRoleEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD PartyDetailRole::Value partyDetailRole() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint16_t)); + return PartyDetailRole::get(SBE_LITTLE_ENDIAN_ENCODE_16(val)); + } + + NoPartyDetails &partyDetailRole(const PartyDetailRole::Value value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoPartyDetails writer) + { + builder << '{'; + builder << R"("PartyDetailID": )"; + builder << '"' << + writer.getPartyDetailIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailRole": )"; + builder << '"' << writer.partyDetailRole() << '"'; + + builder << '}'; + + return builder; + } + }; + +private: + NoPartyDetails m_noPartyDetails; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoPartyDetailsId() SBE_NOEXCEPT + { + return 1671; + } + + SBE_NODISCARD inline NoPartyDetails &noPartyDetails() + { + m_noPartyDetails.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noPartyDetails; + } + + NoPartyDetails &noPartyDetailsCount(const std::uint8_t count) + { + m_noPartyDetails.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noPartyDetails; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noPartyDetailsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noPartyDetailsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noPartyDetailsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoTrdRegPublications + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)2); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 2; + m_actingVersion = actingVersion; + 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 + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoTrdRegPublications &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * TrdRegPublicationTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t trdRegPublicationTypeId() SBE_NOEXCEPT + { + return 2669; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t trdRegPublicationTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool trdRegPublicationTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= trdRegPublicationTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t trdRegPublicationTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationTypeMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t trdRegPublicationTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t trdRegPublicationType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); + return (val); + } + + NoTrdRegPublications &trdRegPublicationType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * TrdRegPublicationReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t trdRegPublicationReasonId() SBE_NOEXCEPT + { + return 2670; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t trdRegPublicationReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool trdRegPublicationReasonInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= trdRegPublicationReasonSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t trdRegPublicationReasonEncodingOffset() SBE_NOEXCEPT + { + return 1; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t trdRegPublicationReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t trdRegPublicationReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t trdRegPublicationReason() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint8_t)); + return (val); + } + + NoTrdRegPublications &trdRegPublicationReason(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoTrdRegPublications writer) + { + builder << '{'; + builder << R"("TrdRegPublicationType": )"; + builder << +writer.trdRegPublicationType(); + + builder << ", "; + builder << R"("TrdRegPublicationReason": )"; + builder << +writer.trdRegPublicationReason(); + + builder << '}'; + + return builder; + } + }; + +private: + NoTrdRegPublications m_noTrdRegPublications; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoTrdRegPublicationsId() SBE_NOEXCEPT + { + return 2668; + } + + SBE_NODISCARD inline NoTrdRegPublications &noTrdRegPublications() + { + m_noTrdRegPublications.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noTrdRegPublications; + } + + NoTrdRegPublications &noTrdRegPublicationsCount(const std::uint8_t count) + { + m_noTrdRegPublications.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noTrdRegPublications; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noTrdRegPublicationsSinceVersion() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD bool noTrdRegPublicationsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noTrdRegPublicationsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, PartyDetailsListReport538 _writer) + { + PartyDetailsListReport538 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "PartyDetailsListReport538", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("AvgPxGroupID": )"; + builder << '"' << + writer.getAvgPxGroupIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("PartyDetailsListReportID": )"; + builder << +writer.partyDetailsListReportID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SelfMatchPreventionID": )"; + builder << +writer.selfMatchPreventionID(); + + builder << ", "; + builder << R"("TotNumParties": )"; + builder << +writer.totNumParties(); + + builder << ", "; + builder << R"("RequestResult": )"; + builder << '"' << writer.requestResult() << '"'; + + builder << ", "; + builder << R"("LastFragment": )"; + builder << '"' << writer.lastFragment() << '"'; + + builder << ", "; + builder << R"("CustOrderCapacity": )"; + builder << '"' << writer.custOrderCapacity() << '"'; + + builder << ", "; + builder << R"("ClearingAccountType": )"; + builder << '"' << writer.clearingAccountType() << '"'; + + builder << ", "; + builder << R"("SelfMatchPreventionInstruction": )"; + builder << '"' << writer.selfMatchPreventionInstruction() << '"'; + + builder << ", "; + builder << R"("AvgPxIndicator": )"; + builder << '"' << writer.avgPxIndicator() << '"'; + + builder << ", "; + builder << R"("ClearingTradePriceType": )"; + builder << '"' << writer.clearingTradePriceType() << '"'; + + builder << ", "; + builder << R"("CmtaGiveupCD": )"; + builder << '"' << writer.cmtaGiveupCD() << '"'; + + builder << ", "; + builder << R"("CustOrderHandlingInst": )"; + builder << '"' << writer.custOrderHandlingInst() << '"'; + + builder << ", "; + builder << R"("Executor": )"; + builder << +writer.executor(); + + builder << ", "; + builder << R"("IDMShortCode": )"; + builder << +writer.iDMShortCode(); + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoPartyDetails": [)"; + writer.noPartyDetails().forEach([&](NoPartyDetails& noPartyDetails) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noPartyDetails; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoTrdRegPublications": [)"; + writer.noTrdRegPublications().forEach([&](NoTrdRegPublications& noTrdRegPublications) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noTrdRegPublications; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailsListRequest537.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailsListRequest537.h new file mode 100644 index 000000000..36c7e3840 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/PartyDetailsListRequest537.h @@ -0,0 +1,1605 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_PARTYDETAILSLISTREQUEST537_H_ +#define _ILINKBINARY_PARTYDETAILSLISTREQUEST537_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 PartyDetailsListRequest537 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + PartyDetailsListRequest537() = default; + + PartyDetailsListRequest537( + 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_actingVersion(actingVersion) + { + } + + PartyDetailsListRequest537(char *buffer, const std::uint64_t bufferLength) : + PartyDetailsListRequest537(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + PartyDetailsListRequest537( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + PartyDetailsListRequest537(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)20; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "CF"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + PartyDetailsListRequest537 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = PartyDetailsListRequest537(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + PartyDetailsListRequest537 &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 = PartyDetailsListRequest537( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + PartyDetailsListRequest537 &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 = PartyDetailsListRequest537(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + PartyDetailsListRequest537 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + PartyDetailsListRequest537 &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 * SeqNumMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 16; + } + + static SBE_CONSTEXPR std::uint32_t seqNumNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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 + 16, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + PartyDetailsListRequest537 &seqNum(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); + return *this; + } + + class NoRequestingPartyIDs + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)7); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 7; + m_actingVersion = actingVersion; + 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 7; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoRequestingPartyIDs &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * RequestingPartyIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestingPartyIDId() SBE_NOEXCEPT + { + return 1658; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestingPartyIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestingPartyIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= requestingPartyIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestingPartyIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char requestingPartyIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char requestingPartyIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char requestingPartyIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t requestingPartyIDEncodingLength() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::uint64_t requestingPartyIDLength() SBE_NOEXCEPT + { + return 5; + } + + SBE_NODISCARD const char *requestingPartyID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *requestingPartyID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char requestingPartyID(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for requestingPartyID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoRequestingPartyIDs &requestingPartyID(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for requestingPartyID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getRequestingPartyID(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getRequestingPartyID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoRequestingPartyIDs &putRequestingPartyID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 5); + return *this; + } + + std::string getRequestingPartyIDAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getRequestingPartyIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getRequestingPartyIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getRequestingPartyIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoRequestingPartyIDs &putRequestingPartyID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putRequestingPartyID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoRequestingPartyIDs &putRequestingPartyID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putRequestingPartyID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * RequestingPartyIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestingPartyIDSourceId() SBE_NOEXCEPT + { + return 1659; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestingPartyIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestingPartyIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= requestingPartyIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestingPartyIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR char requestingPartyIDSourceNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char requestingPartyIDSourceMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char requestingPartyIDSourceMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t requestingPartyIDSourceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD char requestingPartyIDSource() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 5, sizeof(char)); + return (val); + } + + NoRequestingPartyIDs &requestingPartyIDSource(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 5, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * RequestingPartyRoleMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestingPartyRoleId() SBE_NOEXCEPT + { + return 1660; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestingPartyRoleSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestingPartyRoleInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= requestingPartyRoleSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestingPartyRoleEncodingOffset() SBE_NOEXCEPT + { + return 6; + } + + static SBE_CONSTEXPR char requestingPartyRoleNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char requestingPartyRoleMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char requestingPartyRoleMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t requestingPartyRoleEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD char requestingPartyRole() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 6, sizeof(char)); + return (val); + } + + NoRequestingPartyIDs &requestingPartyRole(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 6, &val, sizeof(char)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoRequestingPartyIDs writer) + { + builder << '{'; + builder << R"("RequestingPartyID": )"; + builder << '"' << + writer.getRequestingPartyIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("RequestingPartyIDSource": )"; + if (std::isprint(writer.requestingPartyIDSource())) + { + builder << '"' << (char)writer.requestingPartyIDSource() << '"'; + } + else + { + builder << (int)writer.requestingPartyIDSource(); + } + + builder << ", "; + builder << R"("RequestingPartyRole": )"; + if (std::isprint(writer.requestingPartyRole())) + { + builder << '"' << (char)writer.requestingPartyRole() << '"'; + } + else + { + builder << (int)writer.requestingPartyRole(); + } + + builder << '}'; + + return builder; + } + }; + +private: + NoRequestingPartyIDs m_noRequestingPartyIDs; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoRequestingPartyIDsId() SBE_NOEXCEPT + { + return 1657; + } + + SBE_NODISCARD inline NoRequestingPartyIDs &noRequestingPartyIDs() + { + m_noRequestingPartyIDs.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noRequestingPartyIDs; + } + + NoRequestingPartyIDs &noRequestingPartyIDsCount(const std::uint8_t count) + { + m_noRequestingPartyIDs.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noRequestingPartyIDs; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noRequestingPartyIDsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noRequestingPartyIDsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noRequestingPartyIDsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoPartyIDs + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)11); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 11; + m_actingVersion = actingVersion; + 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 11; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoPartyIDs &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * PartyIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t partyIDId() SBE_NOEXCEPT + { + return 448; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t partyIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t partyIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t partyID() 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); + } + + NoPartyIDs &partyID(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 * PartyIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t partyIDSourceId() SBE_NOEXCEPT + { + return 447; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR char partyIDSourceNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char partyIDSourceMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char partyIDSourceMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t partyIDSourceEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD char partyIDSource() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(char)); + return (val); + } + + NoPartyIDs &partyIDSource(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * PartyRoleMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t partyRoleId() SBE_NOEXCEPT + { + return 452; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t partyRoleSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool partyRoleInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= partyRoleSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t partyRoleEncodingOffset() SBE_NOEXCEPT + { + return 9; + } + + static SBE_CONSTEXPR std::uint16_t partyRoleNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t partyRoleMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t partyRoleMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t partyRoleEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t partyRole() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 9, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoPartyIDs &partyRole(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 9, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoPartyIDs writer) + { + builder << '{'; + builder << R"("PartyID": )"; + builder << +writer.partyID(); + + builder << ", "; + builder << R"("PartyIDSource": )"; + if (std::isprint(writer.partyIDSource())) + { + builder << '"' << (char)writer.partyIDSource() << '"'; + } + else + { + builder << (int)writer.partyIDSource(); + } + + builder << ", "; + builder << R"("PartyRole": )"; + builder << +writer.partyRole(); + + builder << '}'; + + return builder; + } + }; + +private: + NoPartyIDs m_noPartyIDs; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoPartyIDsId() SBE_NOEXCEPT + { + return 453; + } + + SBE_NODISCARD inline NoPartyIDs &noPartyIDs() + { + m_noPartyIDs.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noPartyIDs; + } + + NoPartyIDs &noPartyIDsCount(const std::uint8_t count) + { + m_noPartyIDs.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noPartyIDs; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noPartyIDsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noPartyIDsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noPartyIDsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, PartyDetailsListRequest537 _writer) + { + PartyDetailsListRequest537 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "PartyDetailsListRequest537", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SeqNum": )"; + builder << +writer.seqNum(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoRequestingPartyIDs": [)"; + writer.noRequestingPartyIDs().forEach([&](NoRequestingPartyIDs& noRequestingPartyIDs) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noRequestingPartyIDs; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoPartyIDs": [)"; + writer.noPartyIDs().forEach([&](NoPartyIDs& noPartyIDs) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noPartyIDs; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteAckStatus.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteAckStatus.h new file mode 100644 index 000000000..0c396ddb5 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteAckStatus.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_QUOTEACKSTATUS_H_ +#define _ILINKBINARY_QUOTEACKSTATUS_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class QuoteAckStatus +{ +public: + enum Value + { + Accepted = (std::uint8_t)0, + Rejected = (std::uint8_t)5, + NULL_VALUE = (std::uint8_t)255 + }; + + static QuoteAckStatus::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return Accepted; + case 5: return Rejected; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum QuoteAckStatus [E103]"); + } + + static const char* c_str(const QuoteAckStatus::Value value) + { + switch (value) + { + case Accepted: return "Accepted"; + case Rejected: return "Rejected"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum QuoteAckStatus [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, QuoteAckStatus::Value m) + { + return os << QuoteAckStatus::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteCancel528.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteCancel528.h new file mode 100644 index 000000000..77f7b8512 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteCancel528.h @@ -0,0 +1,2201 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_QUOTECANCEL528_H_ +#define _ILINKBINARY_QUOTECANCEL528_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 QuoteCancel528 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + QuoteCancel528() = default; + + QuoteCancel528( + 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_actingVersion(actingVersion) + { + } + + QuoteCancel528(char *buffer, const std::uint64_t bufferLength) : + QuoteCancel528(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + QuoteCancel528( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + QuoteCancel528(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)52; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)528; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "Z"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + QuoteCancel528 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = QuoteCancel528(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + QuoteCancel528 &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 = QuoteCancel528( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + QuoteCancel528 &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 = QuoteCancel528(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + QuoteCancel528 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + QuoteCancel528 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + QuoteCancel528 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + QuoteCancel528 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + QuoteCancel528 &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; + } + + QuoteCancel528 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancel528 &putSenderID(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + QuoteCancel528 &putSenderID(const std::string& str) + { + const 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 (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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + QuoteCancel528 &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; + } + + QuoteCancel528 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 41, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 41; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 41; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancel528 &putLocation(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 41 + start] = 0; + } + + return *this; + } + #else + QuoteCancel528 &putLocation(const std::string& str) + { + const 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 (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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + QuoteCancel528 "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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t quoteCancelTypeId() SBE_NOEXCEPT + { + return 298; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteCancelTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + 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; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteCancelTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD QuoteCxlTyp::Value quoteCancelType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 50, sizeof(std::uint8_t)); + return QuoteCxlTyp::get((val)); + } + + QuoteCancel528 "eCancelType(const QuoteCxlTyp::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 * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 51; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 51, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + QuoteCancel528 &liquidityFlag(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_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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)10); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 10; + m_actingVersion = actingVersion; + 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 10; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoQuoteEntries &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return (char)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; + } + + std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + 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 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 (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoQuoteEntries &putSecurityGroup(const std::string& str) + { + const 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 (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 6; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 6, 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 + 6, &val, sizeof(std::int32_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoQuoteEntries writer) + { + builder << '{'; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << '}'; + + return builder; + } + }; + +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 + } + + class NoQuoteSets + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)10); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 10; + m_actingVersion = actingVersion; + 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 10; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoQuoteSets &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * BidSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t bidSizeId() SBE_NOEXCEPT + { + return 134; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t bidSizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool bidSizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= bidSizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t bidSizeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t bidSizeNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t bidSizeMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t bidSizeMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t bidSizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t bidSize() 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); + } + + NoQuoteSets &bidSize(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 * OfferSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t offerSizeId() SBE_NOEXCEPT + { + return 135; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t offerSizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool offerSizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= offerSizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t offerSizeEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::uint32_t offerSizeNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t offerSizeMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t offerSizeMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t offerSizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t offerSize() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoQuoteSets &offerSize(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteSetIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 8; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)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 + 8, 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 + 8, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoQuoteSets writer) + { + builder << '{'; + builder << R"("BidSize": )"; + builder << +writer.bidSize(); + + builder << ", "; + builder << R"("OfferSize": )"; + builder << +writer.offerSize(); + + builder << ", "; + builder << R"("QuoteSetID": )"; + builder << +writer.quoteSetID(); + + builder << '}'; + + return builder; + } + }; + +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, QuoteCancel528 _writer) + { + QuoteCancel528 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "QuoteCancel528", )"; + 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"("QuoteCancelType": )"; + builder << '"' << writer.quoteCancelType() << '"'; + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteEntries": [)"; + writer.noQuoteEntries().forEach([&](NoQuoteEntries& noQuoteEntries) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteEntries; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteSets": [)"; + writer.noQuoteSets().forEach([&](NoQuoteSets& noQuoteSets) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteSets; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteCancelAck547.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteCancelAck547.h new file mode 100644 index 000000000..0e8fa9d0d --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteCancelAck547.h @@ -0,0 +1,3240 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_QUOTECANCELACK547_H_ +#define _ILINKBINARY_QUOTECANCELACK547_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 QuoteCancelAck547 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + QuoteCancelAck547() = default; + + QuoteCancelAck547( + 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_actingVersion(actingVersion) + { + } + + QuoteCancelAck547(char *buffer, const std::uint64_t bufferLength) : + QuoteCancelAck547(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + QuoteCancelAck547( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + QuoteCancelAck547(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)340; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)547; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "b"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + QuoteCancelAck547 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = QuoteCancelAck547(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + QuoteCancelAck547 &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 = QuoteCancelAck547( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + QuoteCancelAck547 &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 = QuoteCancelAck547(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + QuoteCancelAck547 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + QuoteCancelAck547 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + QuoteCancelAck547 &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; + } + + QuoteCancelAck547 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelAck547 &putText(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 256; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + QuoteCancelAck547 &putText(const std::string& str) + { + const 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 (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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + QuoteCancelAck547 &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; + } + + QuoteCancelAck547 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelAck547 &putSenderID(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + QuoteCancelAck547 &putSenderID(const std::string& str) + { + const 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 (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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + QuoteCancelAck547 &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 * RequestTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestTimeId() SBE_NOEXCEPT + { + return 5979; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimeEncodingOffset() SBE_NOEXCEPT + { + return 296; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTime() 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); + } + + QuoteCancelAck547 &requestTime(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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + QuoteCancelAck547 &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 * CancelledSymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t cancelledSymbolId() SBE_NOEXCEPT + { + return 9774; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cancelledSymbolSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool cancelledSymbolInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cancelledSymbolSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cancelledSymbolEncodingOffset() SBE_NOEXCEPT + { + return 312; + } + + static SBE_CONSTEXPR char cancelledSymbolNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char cancelledSymbolMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char cancelledSymbolMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t cancelledSymbolEncodingLength() SBE_NOEXCEPT + { + return 6; + } + + static SBE_CONSTEXPR std::uint64_t cancelledSymbolLength() SBE_NOEXCEPT + { + return 6; + } + + SBE_NODISCARD const char *cancelledSymbol() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 312; + } + + SBE_NODISCARD char *cancelledSymbol() SBE_NOEXCEPT + { + return m_buffer + m_offset + 312; + } + + SBE_NODISCARD char cancelledSymbol(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cancelledSymbol [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 312 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelAck547 &cancelledSymbol(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cancelledSymbol [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 312 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getCancelledSymbol(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getCancelledSymbol [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 312, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelAck547 &putCancelledSymbol(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 312, src, sizeof(char) * 6); + return *this; + } + + std::string getCancelledSymbolAsString() const + { + const char *buffer = m_buffer + m_offset + 312; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getCancelledSymbolAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCancelledSymbolAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getCancelledSymbolAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 312; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelAck547 &putCancelledSymbol(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCancelledSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 312, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 312 + start] = 0; + } + + return *this; + } + #else + QuoteCancelAck547 &putCancelledSymbol(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCancelledSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 312, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 312 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 318; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 318; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 318; + } + + 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 + 318 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelAck547 &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 + 318 + (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 + 318, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelAck547 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 318, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 318; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 318; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelAck547 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 318, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 318 + start] = 0; + } + + return *this; + } + #else + QuoteCancelAck547 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 318, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 318 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * QuoteIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 323; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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 + 323, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + QuoteCancelAck547 "eID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 323, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 327; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)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 + 327, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + QuoteCancelAck547 "eRejectReason(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 327, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 329; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() 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); + } + + QuoteCancelAck547 &delayDuration(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 * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 331; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 331, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + QuoteCancelAck547 &manualOrderIndicator(const ManualOrdIndReq::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 * QuoteStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 332; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD QuoteCxlStatus::Value quoteStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 332, sizeof(std::uint8_t)); + return QuoteCxlStatus::get((val)); + } + + QuoteCancelAck547 "eStatus(const QuoteCxlStatus::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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t noProcessedEntriesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)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); + } + + QuoteCancelAck547 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 BooleanFlag::Value mMProtectionReset() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 334, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + QuoteCancelAck547 &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 * UnsolicitedCancelTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t unsolicitedCancelTypeId() SBE_NOEXCEPT + { + return 9775; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t unsolicitedCancelTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool unsolicitedCancelTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= unsolicitedCancelTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t unsolicitedCancelTypeEncodingOffset() SBE_NOEXCEPT + { + return 335; + } + + static SBE_CONSTEXPR char unsolicitedCancelTypeNullValue() SBE_NOEXCEPT + { + return (char)48; + } + + static SBE_CONSTEXPR char unsolicitedCancelTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char unsolicitedCancelTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t unsolicitedCancelTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD char unsolicitedCancelType() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 335, sizeof(char)); + return (val); + } + + QuoteCancelAck547 &unsolicitedCancelType(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 335, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 336; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 336, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + QuoteCancelAck547 &splitMsg(const SplitMsg::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 * TotNoQuoteEntriesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 337; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t totNoQuoteEntriesMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)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 + 337, sizeof(std::uint8_t)); + return (val); + } + + QuoteCancelAck547 &totNoQuoteEntries(const std::uint8_t 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 * LiquidityFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 338; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t liquidityFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanNULL::Value liquidityFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 338, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + QuoteCancelAck547 &liquidityFlag(const BooleanNULL::Value 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 2; + } + + 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 BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + if (m_actingVersion < 2) + { + return BooleanFlag::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 339, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + QuoteCancelAck547 &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; + } + + class NoQuoteEntries + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)9); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 9; + m_actingVersion = actingVersion; + 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 9; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoQuoteEntries &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * QuoteEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t quoteEntryIDMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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 + 0, 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 + 0, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 4; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 4, 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 + 4, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteEntryRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 8; + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t quoteEntryRejectReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)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 + 8, 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 + 8, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoQuoteEntries writer) + { + builder << '{'; + builder << R"("QuoteEntryID": )"; + builder << +writer.quoteEntryID(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("QuoteEntryRejectReason": )"; + builder << +writer.quoteEntryRejectReason(); + + builder << '}'; + + return builder; + } + }; + +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 + } + + class NoQuoteSets + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)4); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 4; + m_actingVersion = actingVersion; + 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 + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoQuoteSets &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * QuoteSetIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteSetIDMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)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; + } + + SBE_NODISCARD static const char * QuoteErrorCodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t quoteErrorCodeId() SBE_NOEXCEPT + { + return 9030; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteErrorCodeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteErrorCodeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteErrorCodeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteErrorCodeEncodingOffset() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint16_t quoteErrorCodeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t quoteErrorCodeMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteErrorCodeMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t quoteErrorCodeEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t quoteErrorCode() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 2, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoQuoteSets "eErrorCode(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 2, &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 << ", "; + builder << R"("QuoteErrorCode": )"; + builder << +writer.quoteErrorCode(); + + builder << '}'; + + return builder; + } + }; + +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, QuoteCancelAck547 _writer) + { + QuoteCancelAck547 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "QuoteCancelAck547", )"; + 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"("RequestTime": )"; + builder << +writer.requestTime(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("CancelledSymbol": )"; + builder << '"' << + writer.getCancelledSymbolAsJsonEscapedString().c_str() << '"'; + + 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"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("QuoteStatus": )"; + builder << '"' << writer.quoteStatus() << '"'; + + builder << ", "; + builder << R"("NoProcessedEntries": )"; + builder << +writer.noProcessedEntries(); + + builder << ", "; + builder << R"("MMProtectionReset": )"; + builder << '"' << writer.mMProtectionReset() << '"'; + + builder << ", "; + builder << R"("UnsolicitedCancelType": )"; + if (std::isprint(writer.unsolicitedCancelType())) + { + builder << '"' << (char)writer.unsolicitedCancelType() << '"'; + } + else + { + builder << (int)writer.unsolicitedCancelType(); + } + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("TotNoQuoteEntries": )"; + builder << +writer.totNoQuoteEntries(); + + builder << ", "; + builder << R"("LiquidityFlag": )"; + builder << '"' << writer.liquidityFlag() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteEntries": [)"; + writer.noQuoteEntries().forEach([&](NoQuoteEntries& noQuoteEntries) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteEntries; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoQuoteSets": [)"; + writer.noQuoteSets().forEach([&](NoQuoteSets& noQuoteSets) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteSets; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteCxlStatus.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteCxlStatus.h new file mode 100644 index 000000000..6152a408b --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteCxlStatus.h @@ -0,0 +1,147 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_QUOTECXLSTATUS_H_ +#define _ILINKBINARY_QUOTECXLSTATUS_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class QuoteCxlStatus +{ +public: + enum Value + { + CancelperInstrument = (std::uint8_t)1, + CancelperInstrumentgroup = (std::uint8_t)3, + Cancelallquotes = (std::uint8_t)4, + Rejected = (std::uint8_t)5, + CancelperQuoteSet = (std::uint8_t)100, + NULL_VALUE = (std::uint8_t)255 + }; + + static QuoteCxlStatus::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return CancelperInstrument; + case 3: return CancelperInstrumentgroup; + case 4: return Cancelallquotes; + case 5: return Rejected; + case 100: return CancelperQuoteSet; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum QuoteCxlStatus [E103]"); + } + + static const char* c_str(const QuoteCxlStatus::Value value) + { + switch (value) + { + case CancelperInstrument: return "CancelperInstrument"; + case CancelperInstrumentgroup: return "CancelperInstrumentgroup"; + case Cancelallquotes: return "Cancelallquotes"; + case Rejected: return "Rejected"; + case CancelperQuoteSet: return "CancelperQuoteSet"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum QuoteCxlStatus [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, QuoteCxlStatus::Value m) + { + return os << QuoteCxlStatus::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteCxlTyp.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteCxlTyp.h new file mode 100644 index 000000000..0acdf5c59 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteCxlTyp.h @@ -0,0 +1,144 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_QUOTECXLTYP_H_ +#define _ILINKBINARY_QUOTECXLTYP_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class QuoteCxlTyp +{ +public: + enum Value + { + CancelperInstrument = (std::uint8_t)1, + CancelperInstrumentgroup = (std::uint8_t)3, + Cancelallquotes = (std::uint8_t)4, + CancelperQuoteSet = (std::uint8_t)100, + NULL_VALUE = (std::uint8_t)255 + }; + + static QuoteCxlTyp::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return CancelperInstrument; + case 3: return CancelperInstrumentgroup; + case 4: return Cancelallquotes; + case 100: return CancelperQuoteSet; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum QuoteCxlTyp [E103]"); + } + + static const char* c_str(const QuoteCxlTyp::Value value) + { + switch (value) + { + case CancelperInstrument: return "CancelperInstrument"; + case CancelperInstrumentgroup: return "CancelperInstrumentgroup"; + case Cancelallquotes: return "Cancelallquotes"; + case CancelperQuoteSet: return "CancelperQuoteSet"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum QuoteCxlTyp [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, QuoteCxlTyp::Value m) + { + return os << QuoteCxlTyp::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteTyp.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteTyp.h new file mode 100644 index 000000000..553a4dadd --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/QuoteTyp.h @@ -0,0 +1,135 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_QUOTETYP_H_ +#define _ILINKBINARY_QUOTETYP_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class QuoteTyp +{ +public: + enum Value + { + Tradeable = (std::uint8_t)1, + NULL_VALUE = (std::uint8_t)255 + }; + + static QuoteTyp::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return Tradeable; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum QuoteTyp [E103]"); + } + + static const char* c_str(const QuoteTyp::Value value) + { + switch (value) + { + case Tradeable: return "Tradeable"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum QuoteTyp [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, QuoteTyp::Value m) + { + return os << QuoteTyp::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/README.txt b/src/lib/orderman_v2/actors/gateway/ilink3/generated/README.txt new file mode 100644 index 000000000..f9fe40900 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/README.txt @@ -0,0 +1,5 @@ +To re-generate these templates download +https://github.com/real-logic/simple-binary-encoding 20c0369b9593e0a0c89394feada3cab19a36c38e +Follow the c++ build instructions to build using cmake. +See gocode/sbe-tool script for how to actually run the tool on a new schema. Change sbe.target.language to cpp and run with -s ilinkbinary.xml + diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/RFQSide.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/RFQSide.h new file mode 100644 index 000000000..24e3483c5 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/RFQSide.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_RFQSIDE_H_ +#define _ILINKBINARY_RFQSIDE_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class RFQSide +{ +public: + enum Value + { + Buy = (std::uint8_t)1, + Sell = (std::uint8_t)2, + Cross = (std::uint8_t)8, + NULL_VALUE = (std::uint8_t)255 + }; + + static RFQSide::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return Buy; + case 2: return Sell; + case 8: return Cross; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum RFQSide [E103]"); + } + + static const char* c_str(const RFQSide::Value value) + { + switch (value) + { + case Buy: return "Buy"; + case Sell: return "Sell"; + case Cross: return "Cross"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum RFQSide [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, RFQSide::Value m) + { + return os << RFQSide::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ReqResult.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ReqResult.h new file mode 100644 index 000000000..f720012a4 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ReqResult.h @@ -0,0 +1,144 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_REQRESULT_H_ +#define _ILINKBINARY_REQRESULT_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class ReqResult +{ +public: + enum Value + { + ValidRequest = (std::uint8_t)0, + NoDataFoundThatMatchedSelectionCriteria = (std::uint8_t)2, + NotAuthorizedtoRetrieveData = (std::uint8_t)3, + DataTemporarilyUnavailable = (std::uint8_t)4, + NULL_VALUE = (std::uint8_t)255 + }; + + static ReqResult::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return ValidRequest; + case 2: return NoDataFoundThatMatchedSelectionCriteria; + case 3: return NotAuthorizedtoRetrieveData; + case 4: return DataTemporarilyUnavailable; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum ReqResult [E103]"); + } + + static const char* c_str(const ReqResult::Value value) + { + switch (value) + { + case ValidRequest: return "ValidRequest"; + case NoDataFoundThatMatchedSelectionCriteria: return "NoDataFoundThatMatchedSelectionCriteria"; + case NotAuthorizedtoRetrieveData: return "NotAuthorizedtoRetrieveData"; + case DataTemporarilyUnavailable: return "DataTemporarilyUnavailable"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ReqResult [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, ReqResult::Value m) + { + return os << ReqResult::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/RequestForQuote543.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/RequestForQuote543.h new file mode 100644 index 000000000..fcaf7a670 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/RequestForQuote543.h @@ -0,0 +1,1628 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_REQUESTFORQUOTE543_H_ +#define _ILINKBINARY_REQUESTFORQUOTE543_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 RequestForQuote543 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + RequestForQuote543() = default; + + RequestForQuote543( + 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_actingVersion(actingVersion) + { + } + + RequestForQuote543(char *buffer, const std::uint64_t bufferLength) : + RequestForQuote543(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + RequestForQuote543( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + RequestForQuote543(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)55; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)543; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "R"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + RequestForQuote543 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = RequestForQuote543(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + RequestForQuote543 &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 = RequestForQuote543( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + RequestForQuote543 &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 = RequestForQuote543(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + RequestForQuote543 &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 * QuoteReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 8; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForQuote543 "eReqID(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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + RequestForQuote543 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + RequestForQuote543 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + RequestForQuote543 &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; + } + + RequestForQuote543 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + RequestForQuote543 &putSenderID(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + RequestForQuote543 &putSenderID(const std::string& str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 41; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 41, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForQuote543 &sendingTimeEpoch(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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + RequestForQuote543 &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; + } + + RequestForQuote543 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 49, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 49; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 49; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + RequestForQuote543 &putLocation(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #else + RequestForQuote543 &putLocation(const std::string& str) + { + const 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 (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * QuoteTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t quoteTypeId() SBE_NOEXCEPT + { + return 537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteTypeEncodingOffset() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD QuoteTyp::Value quoteType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 54, sizeof(std::uint8_t)); + return QuoteTyp::get((val)); + } + + RequestForQuote543 "eType(const QuoteTyp::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 54, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoRelatedSym + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)9); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 9; + m_actingVersion = actingVersion; + 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 9; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoRelatedSym &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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); + } + + NoRelatedSym &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 * OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 4; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyNullValue() SBE_NOEXCEPT + { + return 4294967295; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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 + 4, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoRelatedSym &orderQty(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD RFQSide::Value side() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint8_t)); + return RFQSide::get((val)); + } + + NoRelatedSym &side(const RFQSide::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoRelatedSym writer) + { + builder << '{'; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("Side": )"; + builder << '"' << writer.side() << '"'; + + builder << '}'; + + return builder; + } + }; + +private: + NoRelatedSym m_noRelatedSym; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoRelatedSymId() SBE_NOEXCEPT + { + return 146; + } + + SBE_NODISCARD inline NoRelatedSym &noRelatedSym() + { + m_noRelatedSym.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noRelatedSym; + } + + NoRelatedSym &noRelatedSymCount(const std::uint8_t count) + { + m_noRelatedSym.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noRelatedSym; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noRelatedSymSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noRelatedSymInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noRelatedSymSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, RequestForQuote543 _writer) + { + RequestForQuote543 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "RequestForQuote543", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("QuoteReqID": )"; + builder << +writer.quoteReqID(); + + 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"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteType": )"; + builder << '"' << writer.quoteType() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoRelatedSym": [)"; + writer.noRelatedSym().forEach([&](NoRelatedSym& noRelatedSym) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noRelatedSym; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/RequestForQuoteAck546.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/RequestForQuoteAck546.h new file mode 100644 index 000000000..68afdd016 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/RequestForQuoteAck546.h @@ -0,0 +1,2077 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_REQUESTFORQUOTEACK546_H_ +#define _ILINKBINARY_REQUESTFORQUOTEACK546_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 RequestForQuoteAck546 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + RequestForQuoteAck546() = default; + + RequestForQuoteAck546( + 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_actingVersion(actingVersion) + { + } + + RequestForQuoteAck546(char *buffer, const std::uint64_t bufferLength) : + RequestForQuoteAck546(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + RequestForQuoteAck546( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + RequestForQuoteAck546(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)350; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)546; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "b"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + RequestForQuoteAck546 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = RequestForQuoteAck546(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + RequestForQuoteAck546 &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 = RequestForQuoteAck546( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + RequestForQuoteAck546 &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 = RequestForQuoteAck546(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + RequestForQuoteAck546 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + RequestForQuoteAck546 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + RequestForQuoteAck546 &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; + } + + RequestForQuoteAck546 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + RequestForQuoteAck546 &putText(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 256; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + RequestForQuoteAck546 &putText(const std::string& str) + { + const 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 (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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + RequestForQuoteAck546 &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; + } + + RequestForQuoteAck546 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + RequestForQuoteAck546 &putSenderID(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + RequestForQuoteAck546 &putSenderID(const std::string& str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * ExchangeQuoteReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t exchangeQuoteReqIDId() SBE_NOEXCEPT + { + return 9770; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exchangeQuoteReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exchangeQuoteReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= exchangeQuoteReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exchangeQuoteReqIDEncodingOffset() SBE_NOEXCEPT + { + return 288; + } + + static SBE_CONSTEXPR char exchangeQuoteReqIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char exchangeQuoteReqIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char exchangeQuoteReqIDMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t exchangeQuoteReqIDEncodingLength() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint64_t exchangeQuoteReqIDLength() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD const char *exchangeQuoteReqID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 288; + } + + SBE_NODISCARD char *exchangeQuoteReqID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 288; + } + + SBE_NODISCARD char exchangeQuoteReqID(const std::uint64_t index) const + { + if (index >= 17) + { + throw std::runtime_error("index out of range for exchangeQuoteReqID [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 288 + (index * 1), sizeof(char)); + return (val); + } + + RequestForQuoteAck546 &exchangeQuoteReqID(const std::uint64_t index, const char value) + { + if (index >= 17) + { + throw std::runtime_error("index out of range for exchangeQuoteReqID [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 288 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getExchangeQuoteReqID(char *const dst, const std::uint64_t length) const + { + if (length > 17) + { + throw std::runtime_error("length too large for getExchangeQuoteReqID [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 288, sizeof(char) * static_cast(length)); + return length; + } + + RequestForQuoteAck546 &putExchangeQuoteReqID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 288, src, sizeof(char) * 17); + return *this; + } + + std::string getExchangeQuoteReqIDAsString() const + { + const char *buffer = m_buffer + m_offset + 288; + size_t length = 0; + + for (; length < 17 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getExchangeQuoteReqIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getExchangeQuoteReqIDAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getExchangeQuoteReqIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 288; + size_t length = 0; + + for (; length < 17 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + RequestForQuoteAck546 &putExchangeQuoteReqID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 17) + { + throw std::runtime_error("string too large for putExchangeQuoteReqID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 288, str.data(), srcLength); + for (size_t start = srcLength; start < 17; ++start) + { + m_buffer[m_offset + 288 + start] = 0; + } + + return *this; + } + #else + RequestForQuoteAck546 &putExchangeQuoteReqID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 17) + { + throw std::runtime_error("string too large for putExchangeQuoteReqID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 288, str.c_str(), srcLength); + for (size_t start = srcLength; start < 17; ++start) + { + m_buffer[m_offset + 288 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 305; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 305, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForQuoteAck546 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 305, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestTimeId() SBE_NOEXCEPT + { + return 5979; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimeEncodingOffset() SBE_NOEXCEPT + { + return 313; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimeMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 313, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForQuoteAck546 &requestTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 313, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 321; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 321, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForQuoteAck546 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 321, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 329; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t quoteReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 329, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RequestForQuoteAck546 "eReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 329, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 337; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 337; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 337; + } + + 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 + 337 + (index * 1), sizeof(char)); + return (val); + } + + RequestForQuoteAck546 &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 + 337 + (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 + 337, sizeof(char) * static_cast(length)); + return length; + } + + RequestForQuoteAck546 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 337, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 337; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 337; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + RequestForQuoteAck546 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 337, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 337 + start] = 0; + } + + return *this; + } + #else + RequestForQuoteAck546 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 337, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 337 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * QuoteRejectReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 342; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t quoteRejectReasonMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)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 + 342, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + RequestForQuoteAck546 "eRejectReason(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 342, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 344; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 344, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + RequestForQuoteAck546 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 344, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * QuoteStatusMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 346; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD QuoteAckStatus::Value quoteStatus() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 346, sizeof(std::uint8_t)); + return QuoteAckStatus::get((val)); + } + + RequestForQuoteAck546 "eStatus(const QuoteAckStatus::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 346, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 347; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 347, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + RequestForQuoteAck546 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 347, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 348; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 348, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + RequestForQuoteAck546 &splitMsg(const SplitMsg::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 * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t possRetransFlagId() SBE_NOEXCEPT + { + return 9765; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t possRetransFlagSinceVersion() SBE_NOEXCEPT + { + return 2; + } + + 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 349; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + if (m_actingVersion < 2) + { + return BooleanFlag::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 349, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + RequestForQuoteAck546 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 349, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, RequestForQuoteAck546 _writer) + { + RequestForQuoteAck546 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "RequestForQuoteAck546", )"; + 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"("ExchangeQuoteReqID": )"; + builder << '"' << + writer.getExchangeQuoteReqIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("RequestTime": )"; + builder << +writer.requestTime(); + + 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"("QuoteRejectReason": )"; + builder << +writer.quoteRejectReason(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("QuoteStatus": )"; + builder << '"' << writer.quoteStatus() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/Retransmission509.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/Retransmission509.h new file mode 100644 index 000000000..d2cdf990f --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/Retransmission509.h @@ -0,0 +1,793 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_RETRANSMISSION509_H_ +#define _ILINKBINARY_RETRANSMISSION509_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 Retransmission509 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + Retransmission509() = default; + + Retransmission509( + 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_actingVersion(actingVersion) + { + } + + Retransmission509(char *buffer, const std::uint64_t bufferLength) : + Retransmission509(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + Retransmission509( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + Retransmission509(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)31; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)509; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "Retransmission"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + Retransmission509 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = Retransmission509(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + Retransmission509 &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 = Retransmission509( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + Retransmission509 &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 = Retransmission509(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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 * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Retransmission509 &uUID(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 * LastUUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastUUIDId() SBE_NOEXCEPT + { + return 39017; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastUUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastUUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastUUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastUUIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t lastUUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t lastUUID() 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); + } + + Retransmission509 &lastUUID(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 * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Retransmission509 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * FromSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fromSeqNoId() SBE_NOEXCEPT + { + return 39018; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fromSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fromSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= fromSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fromSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fromSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fromSeqNo() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + Retransmission509 &fromSeqNo(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MsgCountMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t msgCountId() SBE_NOEXCEPT + { + return 39019; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t msgCountSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool msgCountInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= msgCountSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t msgCountEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::uint16_t msgCountNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t msgCountMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t msgCountMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t msgCountEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t msgCount() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + Retransmission509 &msgCount(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 30; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 30, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + Retransmission509 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 30, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, Retransmission509 _writer) + { + Retransmission509 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "Retransmission509", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("LastUUID": )"; + builder << +writer.lastUUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("FromSeqNo": )"; + builder << +writer.fromSeqNo(); + + builder << ", "; + builder << R"("MsgCount": )"; + builder << +writer.msgCount(); + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/RetransmitReject510.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/RetransmitReject510.h new file mode 100644 index 000000000..c75af84b2 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/RetransmitReject510.h @@ -0,0 +1,929 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_RETRANSMITREJECT510_H_ +#define _ILINKBINARY_RETRANSMITREJECT510_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 RetransmitReject510 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + RetransmitReject510() = default; + + RetransmitReject510( + 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_actingVersion(actingVersion) + { + } + + RetransmitReject510(char *buffer, const std::uint64_t bufferLength) : + RetransmitReject510(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + RetransmitReject510( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + RetransmitReject510(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)75; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)510; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "RetransmitReject"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + RetransmitReject510 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = RetransmitReject510(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + RetransmitReject510 &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 = RetransmitReject510( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + RetransmitReject510 &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 = RetransmitReject510(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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 * ReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t reasonId() SBE_NOEXCEPT + { + return 39011; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool reasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reasonEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char reasonNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char reasonMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char reasonMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t reasonEncodingLength() SBE_NOEXCEPT + { + return 48; + } + + static SBE_CONSTEXPR std::uint64_t reasonLength() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD const char *reason() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *reason() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char reason(const std::uint64_t index) const + { + if (index >= 48) + { + throw std::runtime_error("index out of range for reason [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + RetransmitReject510 &reason(const std::uint64_t index, const char value) + { + if (index >= 48) + { + throw std::runtime_error("index out of range for reason [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getReason(char *const dst, const std::uint64_t length) const + { + if (length > 48) + { + throw std::runtime_error("length too large for getReason [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + RetransmitReject510 &putReason(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 48); + return *this; + } + + std::string getReasonAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 48 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getReasonAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getReasonAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getReasonAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 48 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + RetransmitReject510 &putReason(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 48) + { + throw std::runtime_error("string too large for putReason [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 48; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + RetransmitReject510 &putReason(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 48) + { + throw std::runtime_error("string too large for putReason [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 48; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 48; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 48, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RetransmitReject510 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 48, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * LastUUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastUUIDId() SBE_NOEXCEPT + { + return 39017; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastUUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastUUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastUUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastUUIDEncodingOffset() SBE_NOEXCEPT + { + return 56; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t lastUUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t lastUUID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 56, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RetransmitReject510 &lastUUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 56, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RetransmitReject510 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ErrorCodesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesId() SBE_NOEXCEPT + { + return 39012; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t errorCodesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool errorCodesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= errorCodesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t errorCodesEncodingOffset() SBE_NOEXCEPT + { + return 72; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t errorCodesEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t errorCodes() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 72, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + RetransmitReject510 &errorCodes(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 72, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 74; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 74, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + RetransmitReject510 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 74, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, RetransmitReject510 _writer) + { + RetransmitReject510 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "RetransmitReject510", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("Reason": )"; + builder << '"' << + writer.getReasonAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("LastUUID": )"; + builder << +writer.lastUUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("ErrorCodes": )"; + builder << +writer.errorCodes(); + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/RetransmitRequest508.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/RetransmitRequest508.h new file mode 100644 index 000000000..ff8889a1a --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/RetransmitRequest508.h @@ -0,0 +1,730 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_RETRANSMITREQUEST508_H_ +#define _ILINKBINARY_RETRANSMITREQUEST508_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 RetransmitRequest508 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + RetransmitRequest508() = default; + + RetransmitRequest508( + 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_actingVersion(actingVersion) + { + } + + RetransmitRequest508(char *buffer, const std::uint64_t bufferLength) : + RetransmitRequest508(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + RetransmitRequest508( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + RetransmitRequest508(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)30; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)508; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "RetransmitRequest"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + RetransmitRequest508 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = RetransmitRequest508(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + RetransmitRequest508 &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 = RetransmitRequest508( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + RetransmitRequest508 &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 = RetransmitRequest508(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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 * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RetransmitRequest508 &uUID(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 * LastUUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t lastUUIDId() SBE_NOEXCEPT + { + return 39017; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastUUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastUUIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= lastUUIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastUUIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDNullValue() SBE_NOEXCEPT + { + return 0xffffffffffffffffL; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t lastUUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t lastUUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t lastUUID() 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); + } + + RetransmitRequest508 &lastUUID(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 * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + RetransmitRequest508 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * FromSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t fromSeqNoId() SBE_NOEXCEPT + { + return 39018; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t fromSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool fromSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= fromSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t fromSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t fromSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t fromSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t fromSeqNo() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + RetransmitRequest508 &fromSeqNo(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char * MsgCountMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t msgCountId() SBE_NOEXCEPT + { + return 39019; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t msgCountSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool msgCountInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= msgCountSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t msgCountEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::uint16_t msgCountNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t msgCountMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t msgCountMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t msgCountEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t msgCount() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + RetransmitRequest508 &msgCount(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, RetransmitRequest508 _writer) + { + RetransmitRequest508 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "RetransmitRequest508", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("LastUUID": )"; + builder << +writer.lastUUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("FromSeqNo": )"; + builder << +writer.fromSeqNo(); + + builder << ", "; + builder << R"("MsgCount": )"; + builder << +writer.msgCount(); + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/SLEDS.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SLEDS.h new file mode 100644 index 000000000..567eaf2c3 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SLEDS.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SLEDS_H_ +#define _ILINKBINARY_SLEDS_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class SLEDS +{ +public: + enum Value + { + TradeClearingatExecutionPrice = (std::uint8_t)0, + TradeClearingatAlternateClearingPrice = (std::uint8_t)1, + NULL_VALUE = (std::uint8_t)255 + }; + + static SLEDS::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return TradeClearingatExecutionPrice; + case 1: return TradeClearingatAlternateClearingPrice; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum SLEDS [E103]"); + } + + static const char* c_str(const SLEDS::Value value) + { + switch (value) + { + case TradeClearingatExecutionPrice: return "TradeClearingatExecutionPrice"; + case TradeClearingatAlternateClearingPrice: return "TradeClearingatAlternateClearingPrice"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum SLEDS [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, SLEDS::Value m) + { + return os << SLEDS::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/SMPI.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SMPI.h new file mode 100644 index 000000000..6e167e090 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SMPI.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SMPI_H_ +#define _ILINKBINARY_SMPI_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class SMPI +{ +public: + enum Value + { + CancelNewest = (char)78, + CancelOldest = (char)79, + NULL_VALUE = (char)0 + }; + + static SMPI::Value get(const char value) + { + switch (value) + { + case 78: return CancelNewest; + case 79: return CancelOldest; + case 0: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum SMPI [E103]"); + } + + static const char* c_str(const SMPI::Value value) + { + switch (value) + { + case CancelNewest: return "CancelNewest"; + case CancelOldest: return "CancelOldest"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum SMPI [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, SMPI::Value m) + { + return os << SMPI::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/SecRspTyp.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SecRspTyp.h new file mode 100644 index 000000000..1dd205a2e --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SecRspTyp.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SECRSPTYP_H_ +#define _ILINKBINARY_SECRSPTYP_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class SecRspTyp +{ +public: + enum Value + { + AcceptSecurityProposalasis = (std::uint8_t)1, + AcceptSecurityproposalwithrevisionsasindicatedinthemessage = (std::uint8_t)2, + RejectSecurityProposal = (std::uint8_t)5, + NULL_VALUE = (std::uint8_t)255 + }; + + static SecRspTyp::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return AcceptSecurityProposalasis; + case 2: return AcceptSecurityproposalwithrevisionsasindicatedinthemessage; + case 5: return RejectSecurityProposal; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum SecRspTyp [E103]"); + } + + static const char* c_str(const SecRspTyp::Value value) + { + switch (value) + { + case AcceptSecurityProposalasis: return "AcceptSecurityProposalasis"; + case AcceptSecurityproposalwithrevisionsasindicatedinthemessage: return "AcceptSecurityproposalwithrevisionsasindicatedinthemessage"; + case RejectSecurityProposal: return "RejectSecurityProposal"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum SecRspTyp [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, SecRspTyp::Value m) + { + return os << SecRspTyp::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/SecurityDefinitionRequest560.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SecurityDefinitionRequest560.h new file mode 100644 index 000000000..befa86690 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SecurityDefinitionRequest560.h @@ -0,0 +1,2455 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SECURITYDEFINITIONREQUEST560_H_ +#define _ILINKBINARY_SECURITYDEFINITIONREQUEST560_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 SecurityDefinitionRequest560 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + SecurityDefinitionRequest560() = default; + + SecurityDefinitionRequest560( + 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_actingVersion(actingVersion) + { + } + + SecurityDefinitionRequest560(char *buffer, const std::uint64_t bufferLength) : + SecurityDefinitionRequest560(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + SecurityDefinitionRequest560( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + SecurityDefinitionRequest560(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)71; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)560; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "c"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + SecurityDefinitionRequest560 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = SecurityDefinitionRequest560(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + SecurityDefinitionRequest560 &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 = SecurityDefinitionRequest560( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + SecurityDefinitionRequest560 &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 = SecurityDefinitionRequest560(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + SecurityDefinitionRequest560 &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 * SecurityReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t securityReqIDId() SBE_NOEXCEPT + { + return 320; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityReqIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t securityReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t securityReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t securityReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t securityReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t securityReqID() 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); + } + + SecurityDefinitionRequest560 &securityReqID(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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + SecurityDefinitionRequest560 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + SecurityDefinitionRequest560 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + SecurityDefinitionRequest560 &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; + } + + SecurityDefinitionRequest560 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 21, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 21; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 21; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionRequest560 &putSenderID(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionRequest560 &putSenderID(const std::string& str) + { + const 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 (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 21 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityReqTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t securityReqTypeId() SBE_NOEXCEPT + { + return 321; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityReqTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityReqTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityReqTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityReqTypeEncodingOffset() SBE_NOEXCEPT + { + return 41; + } + + static SBE_CONSTEXPR char securityReqTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securityReqTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securityReqTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t securityReqTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t securityReqTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *securityReqType() const + { + static const std::uint8_t securityReqTypeValues[] = { 49 }; + + return (const char *)securityReqTypeValues; + } + + SBE_NODISCARD char securityReqType(const std::uint64_t index) const + { + static const std::uint8_t securityReqTypeValues[] = { 49 }; + + return (char)securityReqTypeValues[index]; + } + + std::uint64_t getSecurityReqType(char *dst, const std::uint64_t length) const + { + static std::uint8_t securityReqTypeValues[] = { 49 }; + std::uint64_t bytesToCopy = length < sizeof(securityReqTypeValues) ? length : sizeof(securityReqTypeValues); + + std::memcpy(dst, securityReqTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getSecurityReqTypeAsString() const + { + static const std::uint8_t SecurityReqTypeValues[] = { 49 }; + + return std::string((const char *)SecurityReqTypeValues, 1); + } + + std::string getSecurityReqTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityReqTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 41; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 41, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + SecurityDefinitionRequest560 &sendingTimeEpoch(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 * SecuritySubTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t securitySubTypeId() SBE_NOEXCEPT + { + return 762; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securitySubTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securitySubTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securitySubTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securitySubTypeEncodingOffset() SBE_NOEXCEPT + { + return 49; + } + + static SBE_CONSTEXPR char securitySubTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securitySubTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securitySubTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t securitySubTypeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t securitySubTypeLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD const char *securitySubType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 49; + } + + SBE_NODISCARD char *securitySubType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 49; + } + + SBE_NODISCARD char securitySubType(const std::uint64_t index) const + { + if (index >= 8) + { + throw std::runtime_error("index out of range for securitySubType [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 49 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionRequest560 &securitySubType(const std::uint64_t index, const char value) + { + if (index >= 8) + { + throw std::runtime_error("index out of range for securitySubType [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 49 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSecuritySubType(char *const dst, const std::uint64_t length) const + { + if (length > 8) + { + throw std::runtime_error("length too large for getSecuritySubType [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 49, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionRequest560 &putSecuritySubType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 49, src, sizeof(char) * 8); + return *this; + } + + std::string getSecuritySubTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 49; + size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSecuritySubTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecuritySubTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSecuritySubTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 49; + size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionRequest560 &putSecuritySubType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putSecuritySubType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 49, str.data(), srcLength); + for (size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionRequest560 &putSecuritySubType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putSecuritySubType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 49, str.c_str(), srcLength); + for (size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 49 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 57; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 57; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 57; + } + + 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 + 57 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionRequest560 &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 + 57 + (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 + 57, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionRequest560 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 57, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 57; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 57; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionRequest560 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 57, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 57 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionRequest560 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 57, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 57 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * StartDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t startDateId() SBE_NOEXCEPT + { + return 916; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t startDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool startDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= startDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t startDateEncodingOffset() SBE_NOEXCEPT + { + return 62; + } + + static SBE_CONSTEXPR std::uint16_t startDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t startDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t startDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t startDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t startDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 62, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + SecurityDefinitionRequest560 &startDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 62, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * EndDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t endDateId() SBE_NOEXCEPT + { + return 917; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t endDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool endDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= endDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t endDateEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + static SBE_CONSTEXPR std::uint16_t endDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t endDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t endDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t endDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t endDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + SecurityDefinitionRequest560 &endDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * MaxNoOfSubstitutionsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t maxNoOfSubstitutionsId() SBE_NOEXCEPT + { + return 37715; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxNoOfSubstitutionsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool maxNoOfSubstitutionsInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= maxNoOfSubstitutionsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxNoOfSubstitutionsEncodingOffset() SBE_NOEXCEPT + { + return 66; + } + + static SBE_CONSTEXPR std::uint8_t maxNoOfSubstitutionsNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t maxNoOfSubstitutionsMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t maxNoOfSubstitutionsMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t maxNoOfSubstitutionsEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t maxNoOfSubstitutions() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t)); + return (val); + } + + SecurityDefinitionRequest560 &maxNoOfSubstitutions(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 66, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SourceRepoIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t sourceRepoIDId() SBE_NOEXCEPT + { + return 5677; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sourceRepoIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sourceRepoIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sourceRepoIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sourceRepoIDEncodingOffset() SBE_NOEXCEPT + { + return 67; + } + + static SBE_CONSTEXPR std::int32_t sourceRepoIDNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t sourceRepoIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t sourceRepoIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t sourceRepoIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t sourceRepoID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 67, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + SecurityDefinitionRequest560 &sourceRepoID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 67, &val, sizeof(std::int32_t)); + return *this; + } + + class NoLegs + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)19); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 19; + m_actingVersion = actingVersion; + 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 19; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoLegs &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * LegSecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legSecurityIDSourceId() SBE_NOEXCEPT + { + return 603; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSecurityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSecurityIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSecurityIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSecurityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char legSecurityIDSourceNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char legSecurityIDSourceMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char legSecurityIDSourceMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t legSecurityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t legSecurityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *legSecurityIDSource() const + { + static const std::uint8_t legSecurityIDSourceValues[] = { 56 }; + + return (const char *)legSecurityIDSourceValues; + } + + SBE_NODISCARD char legSecurityIDSource(const std::uint64_t index) const + { + static const std::uint8_t legSecurityIDSourceValues[] = { 56 }; + + return (char)legSecurityIDSourceValues[index]; + } + + std::uint64_t getLegSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t legSecurityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(legSecurityIDSourceValues) ? length : sizeof(legSecurityIDSourceValues); + + std::memcpy(dst, legSecurityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getLegSecurityIDSourceAsString() const + { + static const std::uint8_t LegSecurityIDSourceValues[] = { 56 }; + + return std::string((const char *)LegSecurityIDSourceValues, 1); + } + + std::string getLegSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLegSecurityIDSourceAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * LegPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legPriceId() SBE_NOEXCEPT + { + return 566; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legPriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legPriceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legPriceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legPriceEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICENULL9 m_legPrice; + +public: + SBE_NODISCARD PRICENULL9 &legPrice() + { + m_legPrice.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_legPrice; + } + + SBE_NODISCARD static const char * LegSecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legSecurityIDId() SBE_NOEXCEPT + { + return 602; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSecurityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSecurityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSecurityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSecurityIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t legSecurityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t legSecurityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legSecurityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * LegOptionDeltaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legOptionDeltaId() SBE_NOEXCEPT + { + return 1017; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legOptionDeltaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legOptionDeltaInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legOptionDeltaSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legOptionDeltaEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + +private: + Decimal32NULL m_legOptionDelta; + +public: + SBE_NODISCARD Decimal32NULL &legOptionDelta() + { + m_legOptionDelta.wrap(m_buffer, m_offset + 12, m_actingVersion, m_bufferLength); + return m_legOptionDelta; + } + + SBE_NODISCARD static const char * LegSideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legSideId() SBE_NOEXCEPT + { + return 624; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value legSide() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + NoLegs &legSide(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LegRatioQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legRatioQtyId() SBE_NOEXCEPT + { + return 623; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legRatioQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legRatioQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legRatioQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legRatioQtyEncodingOffset() SBE_NOEXCEPT + { + return 18; + } + + static SBE_CONSTEXPR std::uint8_t legRatioQtyNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t legRatioQtyMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t legRatioQtyMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t legRatioQtyEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t legRatioQty() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); + return (val); + } + + NoLegs &legRatioQty(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoLegs writer) + { + builder << '{'; + builder << R"("LegPrice": )"; + builder << writer.legPrice(); + + builder << ", "; + builder << R"("LegSecurityID": )"; + builder << +writer.legSecurityID(); + + builder << ", "; + builder << R"("LegOptionDelta": )"; + builder << writer.legOptionDelta(); + + builder << ", "; + builder << R"("LegSide": )"; + builder << '"' << writer.legSide() << '"'; + + builder << ", "; + builder << R"("LegRatioQty": )"; + builder << +writer.legRatioQty(); + + builder << '}'; + + return builder; + } + }; + +private: + NoLegs m_noLegs; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLegsId() SBE_NOEXCEPT + { + return 555; + } + + SBE_NODISCARD inline NoLegs &noLegs() + { + m_noLegs.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + NoLegs &noLegsCount(const std::uint8_t count) + { + m_noLegs.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noLegsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noLegsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noLegsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, SecurityDefinitionRequest560 _writer) + { + SecurityDefinitionRequest560 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "SecurityDefinitionRequest560", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("SecurityReqID": )"; + builder << +writer.securityReqID(); + + 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"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SecuritySubType": )"; + builder << '"' << + writer.getSecuritySubTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("StartDate": )"; + builder << +writer.startDate(); + + builder << ", "; + builder << R"("EndDate": )"; + builder << +writer.endDate(); + + builder << ", "; + builder << R"("MaxNoOfSubstitutions": )"; + builder << +writer.maxNoOfSubstitutions(); + + builder << ", "; + builder << R"("SourceRepoID": )"; + builder << +writer.sourceRepoID(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoLegs": [)"; + writer.noLegs().forEach([&](NoLegs& noLegs) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noLegs; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/SecurityDefinitionResponse561.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SecurityDefinitionResponse561.h new file mode 100644 index 000000000..15ee4101d --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SecurityDefinitionResponse561.h @@ -0,0 +1,4563 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SECURITYDEFINITIONRESPONSE561_H_ +#define _ILINKBINARY_SECURITYDEFINITIONRESPONSE561_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 SecurityDefinitionResponse561 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + SecurityDefinitionResponse561() = default; + + SecurityDefinitionResponse561( + 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_actingVersion(actingVersion) + { + } + + SecurityDefinitionResponse561(char *buffer, const std::uint64_t bufferLength) : + SecurityDefinitionResponse561(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + SecurityDefinitionResponse561( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + SecurityDefinitionResponse561(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)429; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)561; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "d"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + SecurityDefinitionResponse561 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = SecurityDefinitionResponse561(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + SecurityDefinitionResponse561 &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 = SecurityDefinitionResponse561( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + SecurityDefinitionResponse561 &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 = SecurityDefinitionResponse561(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint32_t seqNumMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + 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); + } + + SecurityDefinitionResponse561 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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); + } + + SecurityDefinitionResponse561 &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::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 (char)0; + } + + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return (char)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); + } + + SecurityDefinitionResponse561 &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; + } + + SecurityDefinitionResponse561 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 12, src, sizeof(char) * 256); + return *this; + } + + std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 12; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 12; + size_t length = 0; + + for (; length < 256 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putText(const std::string_view str) + { + const 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 (size_t start = srcLength; start < 256; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putText(const std::string& str) + { + const 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 (size_t start = srcLength; start < 256; ++start) + { + m_buffer[m_offset + 12 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * FinancialInstrumentFullNameMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t financialInstrumentFullNameId() SBE_NOEXCEPT + { + return 2714; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t financialInstrumentFullNameSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool financialInstrumentFullNameInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= financialInstrumentFullNameSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t financialInstrumentFullNameEncodingOffset() SBE_NOEXCEPT + { + return 268; + } + + static SBE_CONSTEXPR char financialInstrumentFullNameNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char financialInstrumentFullNameMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char financialInstrumentFullNameMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t financialInstrumentFullNameEncodingLength() SBE_NOEXCEPT + { + return 35; + } + + static SBE_CONSTEXPR std::uint64_t financialInstrumentFullNameLength() SBE_NOEXCEPT + { + return 35; + } + + SBE_NODISCARD const char *financialInstrumentFullName() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char *financialInstrumentFullName() SBE_NOEXCEPT + { + return m_buffer + m_offset + 268; + } + + SBE_NODISCARD char financialInstrumentFullName(const std::uint64_t index) const + { + if (index >= 35) + { + throw std::runtime_error("index out of range for financialInstrumentFullName [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 268 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionResponse561 &financialInstrumentFullName(const std::uint64_t index, const char value) + { + if (index >= 35) + { + throw std::runtime_error("index out of range for financialInstrumentFullName [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 268 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getFinancialInstrumentFullName(char *const dst, const std::uint64_t length) const + { + if (length > 35) + { + throw std::runtime_error("length too large for getFinancialInstrumentFullName [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 268, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionResponse561 &putFinancialInstrumentFullName(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 268, src, sizeof(char) * 35); + return *this; + } + + std::string getFinancialInstrumentFullNameAsString() const + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 35 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getFinancialInstrumentFullNameAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getFinancialInstrumentFullNameAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getFinancialInstrumentFullNameAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 268; + size_t length = 0; + + for (; length < 35 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putFinancialInstrumentFullName(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 35) + { + throw std::runtime_error("string too large for putFinancialInstrumentFullName [E106]"); + } + + std::memcpy(m_buffer + m_offset + 268, str.data(), srcLength); + for (size_t start = srcLength; start < 35; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putFinancialInstrumentFullName(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 35) + { + throw std::runtime_error("string too large for putFinancialInstrumentFullName [E106]"); + } + + std::memcpy(m_buffer + m_offset + 268, str.c_str(), srcLength); + for (size_t start = srcLength; start < 35; ++start) + { + m_buffer[m_offset + 268 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SenderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 303; + } + + static SBE_CONSTEXPR char senderIDNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char senderIDMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char senderIDMaxValue() SBE_NOEXCEPT + { + return (char)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 + 303; + } + + SBE_NODISCARD char *senderID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 303; + } + + 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 + 303 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionResponse561 &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 + 303 + (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 + 303, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionResponse561 &putSenderID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 303, src, sizeof(char) * 20); + return *this; + } + + std::string getSenderIDAsString() const + { + const char *buffer = m_buffer + m_offset + 303; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSenderIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 303; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putSenderID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 303, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 303 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putSenderID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSenderID [E106]"); + } + + std::memcpy(m_buffer + m_offset + 303, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 303 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t symbolId() SBE_NOEXCEPT + { + return 55; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t symbolSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool symbolInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= symbolSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t symbolEncodingOffset() SBE_NOEXCEPT + { + return 323; + } + + static SBE_CONSTEXPR char symbolNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char symbolMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char symbolMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t symbolEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t symbolLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *symbol() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 323; + } + + SBE_NODISCARD char *symbol() SBE_NOEXCEPT + { + return m_buffer + m_offset + 323; + } + + SBE_NODISCARD char symbol(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 323 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionResponse561 &symbol(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 323 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSymbol(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSymbol [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 323, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionResponse561 &putSymbol(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 323, src, sizeof(char) * 20); + return *this; + } + + std::string getSymbolAsString() const + { + const char *buffer = m_buffer + m_offset + 323; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSymbolAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSymbolAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSymbolAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 323; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putSymbol(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 323, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 323 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putSymbol(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 323, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 323 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * PartyDetailsListReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 343; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t partyDetailsListReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 343, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + SecurityDefinitionResponse561 &partyDetailsListReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 343, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t securityReqIDId() SBE_NOEXCEPT + { + return 320; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityReqIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityReqIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityReqIDEncodingOffset() SBE_NOEXCEPT + { + return 351; + } + + static SBE_CONSTEXPR std::uint64_t securityReqIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t securityReqIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t securityReqIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t securityReqIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t securityReqID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 351, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + SecurityDefinitionResponse561 &securityReqID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 351, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityResponseIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t securityResponseIDId() SBE_NOEXCEPT + { + return 322; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityResponseIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityResponseIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityResponseIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityResponseIDEncodingOffset() SBE_NOEXCEPT + { + return 359; + } + + static SBE_CONSTEXPR std::uint64_t securityResponseIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t securityResponseIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t securityResponseIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t securityResponseIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t securityResponseID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 359, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + SecurityDefinitionResponse561 &securityResponseID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 359, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SendingTimeEpochMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 367; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t sendingTimeEpochMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 367, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + SecurityDefinitionResponse561 &sendingTimeEpoch(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 367, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 375; + } + + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return (char)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 + 375; + } + + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 375; + } + + 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 + 375 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionResponse561 &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 + 375 + (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 + 375, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionResponse561 &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 375, src, sizeof(char) * 6); + return *this; + } + + std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 375; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 375; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putSecurityGroup(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 375, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 375 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putSecurityGroup(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } + + std::memcpy(m_buffer + m_offset + 375, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 375 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t securityTypeId() SBE_NOEXCEPT + { + return 167; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityTypeEncodingOffset() SBE_NOEXCEPT + { + return 381; + } + + static SBE_CONSTEXPR char securityTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securityTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securityTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t securityTypeEncodingLength() SBE_NOEXCEPT + { + return 6; + } + + static SBE_CONSTEXPR std::uint64_t securityTypeLength() SBE_NOEXCEPT + { + return 6; + } + + SBE_NODISCARD const char *securityType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 381; + } + + SBE_NODISCARD char *securityType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 381; + } + + SBE_NODISCARD char securityType(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityType [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 381 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionResponse561 &securityType(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityType [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 381 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSecurityType(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityType [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 381, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionResponse561 &putSecurityType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 381, src, sizeof(char) * 6); + return *this; + } + + std::string getSecurityTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 381; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSecurityTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getSecurityTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 381; + size_t length = 0; + + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putSecurityType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 381, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 381 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putSecurityType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 381, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 381 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * LocationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 387; + } + + static SBE_CONSTEXPR char locationNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char locationMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char locationMaxValue() SBE_NOEXCEPT + { + return (char)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 + 387; + } + + SBE_NODISCARD char *location() SBE_NOEXCEPT + { + return m_buffer + m_offset + 387; + } + + 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 + 387 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionResponse561 &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 + 387 + (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 + 387, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionResponse561 &putLocation(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 387, src, sizeof(char) * 5); + return *this; + } + + std::string getLocationAsString() const + { + const char *buffer = m_buffer + m_offset + 387; + 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 (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getLocationAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 387; + size_t length = 0; + + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putLocation(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 387, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 387 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putLocation(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putLocation [E106]"); + } + + std::memcpy(m_buffer + m_offset + 387, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 387 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + 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 392; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return 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 + 392, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + SecurityDefinitionResponse561 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 392, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * CurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t currencyId() SBE_NOEXCEPT + { + return 15; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t currencySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool currencyInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= currencySinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t currencyEncodingOffset() SBE_NOEXCEPT + { + return 396; + } + + static SBE_CONSTEXPR char currencyNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char currencyMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char currencyMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t currencyEncodingLength() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t currencyLength() SBE_NOEXCEPT + { + return 3; + } + + SBE_NODISCARD const char *currency() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 396; + } + + SBE_NODISCARD char *currency() SBE_NOEXCEPT + { + return m_buffer + m_offset + 396; + } + + SBE_NODISCARD char currency(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for currency [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 396 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionResponse561 ¤cy(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for currency [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 396 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getCurrency(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getCurrency [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 396, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionResponse561 &putCurrency(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 396, src, sizeof(char) * 3); + return *this; + } + + SecurityDefinitionResponse561 &putCurrency( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 396, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 397, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 398, &val2, sizeof(char)); + + return *this; + } + + std::string getCurrencyAsString() const + { + const char *buffer = m_buffer + m_offset + 396; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getCurrencyAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCurrencyAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getCurrencyAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 396; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putCurrency(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putCurrency [E106]"); + } + + std::memcpy(m_buffer + m_offset + 396, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 396 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putCurrency(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putCurrency [E106]"); + } + + std::memcpy(m_buffer + m_offset + 396, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 396 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t securityIDSourceId() SBE_NOEXCEPT + { + return 22; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDSourceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityIDSourceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 399; + } + + static SBE_CONSTEXPR char securityIDSourceNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char securityIDSourceMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char securityIDSourceMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t securityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t securityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *securityIDSource() const + { + static const std::uint8_t securityIDSourceValues[] = { 56 }; + + return (const char *)securityIDSourceValues; + } + + SBE_NODISCARD char securityIDSource(const std::uint64_t index) const + { + static const std::uint8_t securityIDSourceValues[] = { 56 }; + + return (char)securityIDSourceValues[index]; + } + + std::uint64_t getSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t securityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(securityIDSourceValues) ? length : sizeof(securityIDSourceValues); + + std::memcpy(dst, securityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getSecurityIDSourceAsString() const + { + static const std::uint8_t SecurityIDSourceValues[] = { 56 }; + + return std::string((const char *)SecurityIDSourceValues, 1); + } + + std::string getSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityIDSourceAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * MaturityMonthYearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "MonthYear"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t maturityMonthYearId() SBE_NOEXCEPT + { + return 200; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maturityMonthYearSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool maturityMonthYearInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= maturityMonthYearSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maturityMonthYearEncodingOffset() SBE_NOEXCEPT + { + return 399; + } + +private: + MaturityMonthYear m_maturityMonthYear; + +public: + SBE_NODISCARD MaturityMonthYear &maturityMonthYear() + { + m_maturityMonthYear.wrap(m_buffer, m_offset + 399, m_actingVersion, m_bufferLength); + return m_maturityMonthYear; + } + + SBE_NODISCARD static const char * DelayDurationMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationId() SBE_NOEXCEPT + { + return 5904; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t delayDurationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool delayDurationInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= delayDurationSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t delayDurationEncodingOffset() SBE_NOEXCEPT + { + return 404; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t delayDurationMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t delayDurationEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t delayDuration() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 404, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + SecurityDefinitionResponse561 &delayDuration(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 404, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * StartDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t startDateId() SBE_NOEXCEPT + { + return 916; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t startDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool startDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= startDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t startDateEncodingOffset() SBE_NOEXCEPT + { + return 406; + } + + static SBE_CONSTEXPR std::uint16_t startDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t startDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t startDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t startDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t startDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 406, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + SecurityDefinitionResponse561 &startDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 406, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * EndDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t endDateId() SBE_NOEXCEPT + { + return 917; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t endDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool endDateInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= endDateSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t endDateEncodingOffset() SBE_NOEXCEPT + { + return 408; + } + + static SBE_CONSTEXPR std::uint16_t endDateNullValue() SBE_NOEXCEPT + { + return (std::uint16_t)65535; + } + + static SBE_CONSTEXPR std::uint16_t endDateMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t endDateMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t endDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t endDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 408, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + SecurityDefinitionResponse561 &endDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 408, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * MaxNoOfSubstitutionsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t maxNoOfSubstitutionsId() SBE_NOEXCEPT + { + return 37715; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxNoOfSubstitutionsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool maxNoOfSubstitutionsInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= maxNoOfSubstitutionsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxNoOfSubstitutionsEncodingOffset() SBE_NOEXCEPT + { + return 410; + } + + static SBE_CONSTEXPR std::uint8_t maxNoOfSubstitutionsNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t maxNoOfSubstitutionsMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t maxNoOfSubstitutionsMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t maxNoOfSubstitutionsEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t maxNoOfSubstitutions() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 410, sizeof(std::uint8_t)); + return (val); + } + + SecurityDefinitionResponse561 &maxNoOfSubstitutions(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 410, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SourceRepoIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t sourceRepoIDId() SBE_NOEXCEPT + { + return 5677; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sourceRepoIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sourceRepoIDInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= sourceRepoIDSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sourceRepoIDEncodingOffset() SBE_NOEXCEPT + { + return 411; + } + + static SBE_CONSTEXPR std::int32_t sourceRepoIDNullValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::int32_t sourceRepoIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t sourceRepoIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t sourceRepoIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t sourceRepoID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 411, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + SecurityDefinitionResponse561 &sourceRepoID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 411, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * TerminationTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t terminationTypeId() SBE_NOEXCEPT + { + return 788; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t terminationTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool terminationTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= terminationTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t terminationTypeEncodingOffset() SBE_NOEXCEPT + { + return 415; + } + + static SBE_CONSTEXPR char terminationTypeNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char terminationTypeMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char terminationTypeMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t terminationTypeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t terminationTypeLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD const char *terminationType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 415; + } + + SBE_NODISCARD char *terminationType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 415; + } + + SBE_NODISCARD char terminationType(const std::uint64_t index) const + { + if (index >= 8) + { + throw std::runtime_error("index out of range for terminationType [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 415 + (index * 1), sizeof(char)); + return (val); + } + + SecurityDefinitionResponse561 &terminationType(const std::uint64_t index, const char value) + { + if (index >= 8) + { + throw std::runtime_error("index out of range for terminationType [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 415 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getTerminationType(char *const dst, const std::uint64_t length) const + { + if (length > 8) + { + throw std::runtime_error("length too large for getTerminationType [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 415, sizeof(char) * static_cast(length)); + return length; + } + + SecurityDefinitionResponse561 &putTerminationType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 415, src, sizeof(char) * 8); + return *this; + } + + std::string getTerminationTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 415; + size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getTerminationTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTerminationTypeAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getTerminationTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 415; + size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + SecurityDefinitionResponse561 &putTerminationType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putTerminationType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 415, str.data(), srcLength); + for (size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 415 + start] = 0; + } + + return *this; + } + #else + SecurityDefinitionResponse561 &putTerminationType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putTerminationType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 415, str.c_str(), srcLength); + for (size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 415 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * SecurityResponseTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t securityResponseTypeId() SBE_NOEXCEPT + { + return 323; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityResponseTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityResponseTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= securityResponseTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityResponseTypeEncodingOffset() SBE_NOEXCEPT + { + return 423; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityResponseTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SecRspTyp::Value securityResponseType() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 423, sizeof(std::uint8_t)); + return SecRspTyp::get((val)); + } + + SecurityDefinitionResponse561 &securityResponseType(const SecRspTyp::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 423, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * UserDefinedInstrumentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t userDefinedInstrumentId() SBE_NOEXCEPT + { + return 9779; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t userDefinedInstrumentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool userDefinedInstrumentInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= userDefinedInstrumentSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t userDefinedInstrumentEncodingOffset() SBE_NOEXCEPT + { + return 424; + } + + static SBE_CONSTEXPR char userDefinedInstrumentNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char userDefinedInstrumentMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char userDefinedInstrumentMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t userDefinedInstrumentEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t userDefinedInstrumentLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *userDefinedInstrument() const + { + static const std::uint8_t userDefinedInstrumentValues[] = { 89 }; + + return (const char *)userDefinedInstrumentValues; + } + + SBE_NODISCARD char userDefinedInstrument(const std::uint64_t index) const + { + static const std::uint8_t userDefinedInstrumentValues[] = { 89 }; + + return (char)userDefinedInstrumentValues[index]; + } + + std::uint64_t getUserDefinedInstrument(char *dst, const std::uint64_t length) const + { + static std::uint8_t userDefinedInstrumentValues[] = { 89 }; + std::uint64_t bytesToCopy = length < sizeof(userDefinedInstrumentValues) ? length : sizeof(userDefinedInstrumentValues); + + std::memcpy(dst, userDefinedInstrumentValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getUserDefinedInstrumentAsString() const + { + static const std::uint8_t UserDefinedInstrumentValues[] = { 89 }; + + return std::string((const char *)UserDefinedInstrumentValues, 1); + } + + std::string getUserDefinedInstrumentAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getUserDefinedInstrumentAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * ExpirationCycleMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t expirationCycleId() SBE_NOEXCEPT + { + return 827; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t expirationCycleSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool expirationCycleInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= expirationCycleSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expirationCycleEncodingOffset() SBE_NOEXCEPT + { + return 424; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t expirationCycleEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ExpCycle::Value expirationCycle() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 424, sizeof(std::uint8_t)); + return ExpCycle::get((val)); + } + + SecurityDefinitionResponse561 &expirationCycle(const ExpCycle::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 424, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * ManualOrderIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 425; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t manualOrderIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD ManualOrdIndReq::Value manualOrderIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 425, sizeof(std::uint8_t)); + return ManualOrdIndReq::get((val)); + } + + SecurityDefinitionResponse561 &manualOrderIndicator(const ManualOrdIndReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 425, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 426; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 426, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + SecurityDefinitionResponse561 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 426, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * AutoQuoteRequestMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t autoQuoteRequestId() SBE_NOEXCEPT + { + return 9776; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t autoQuoteRequestSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool autoQuoteRequestInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= autoQuoteRequestSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t autoQuoteRequestEncodingOffset() SBE_NOEXCEPT + { + return 427; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t autoQuoteRequestEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value autoQuoteRequest() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 427, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + SecurityDefinitionResponse561 &autoQuoteRequest(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 427, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * PossRetransFlagMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 428; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t possRetransFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD BooleanFlag::Value possRetransFlag() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 428, sizeof(std::uint8_t)); + return BooleanFlag::get((val)); + } + + SecurityDefinitionResponse561 &possRetransFlag(const BooleanFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 428, &val, sizeof(std::uint8_t)); + return *this; + } + + class NoLegs + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 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 = std::numeric_limits::max(); + m_actingVersion = actingVersion; + 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((std::uint16_t)19); + dimensions.numInGroup((std::uint8_t)count); + m_index = std::numeric_limits::max(); + m_count = count; + m_blockLength = 19; + m_actingVersion = actingVersion; + 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 19; + } + + SBE_NODISCARD std::uint64_t sbePosition() const + { + return *m_positionPtr; + } + + 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 + 1 < m_count; + } + + inline NoLegs &next() + { + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short to support next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char * LegPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legPriceId() SBE_NOEXCEPT + { + return 566; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legPriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legPriceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legPriceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legPriceEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICENULL9 m_legPrice; + +public: + SBE_NODISCARD PRICENULL9 &legPrice() + { + m_legPrice.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_legPrice; + } + + SBE_NODISCARD static const char * LegOptionDeltaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legOptionDeltaId() SBE_NOEXCEPT + { + return 1017; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legOptionDeltaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legOptionDeltaInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legOptionDeltaSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legOptionDeltaEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + +private: + Decimal32NULL m_legOptionDelta; + +public: + SBE_NODISCARD Decimal32NULL &legOptionDelta() + { + m_legOptionDelta.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_legOptionDelta; + } + + SBE_NODISCARD static const char * LegSecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legSecurityIDSourceId() SBE_NOEXCEPT + { + return 603; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSecurityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSecurityIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSecurityIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSecurityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + static SBE_CONSTEXPR char legSecurityIDSourceNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char legSecurityIDSourceMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char legSecurityIDSourceMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t legSecurityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t legSecurityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *legSecurityIDSource() const + { + static const std::uint8_t legSecurityIDSourceValues[] = { 56 }; + + return (const char *)legSecurityIDSourceValues; + } + + SBE_NODISCARD char legSecurityIDSource(const std::uint64_t index) const + { + static const std::uint8_t legSecurityIDSourceValues[] = { 56 }; + + return (char)legSecurityIDSourceValues[index]; + } + + std::uint64_t getLegSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t legSecurityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(legSecurityIDSourceValues) ? length : sizeof(legSecurityIDSourceValues); + + std::memcpy(dst, legSecurityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getLegSecurityIDSourceAsString() const + { + static const std::uint8_t LegSecurityIDSourceValues[] = { 56 }; + + return std::string((const char *)LegSecurityIDSourceValues, 1); + } + + std::string getLegSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLegSecurityIDSourceAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 * LegSecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legSecurityIDId() SBE_NOEXCEPT + { + return 602; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSecurityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSecurityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSecurityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSecurityIDEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMinValue() SBE_NOEXCEPT + { + return -2147483647; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMaxValue() SBE_NOEXCEPT + { + return 2147483647; + } + + static SBE_CONSTEXPR std::size_t legSecurityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t legSecurityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legSecurityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 13, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char * LegSideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legSideId() SBE_NOEXCEPT + { + return 624; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SideReq::Value legSide() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); + return SideReq::get((val)); + } + + NoLegs &legSide(const SideReq::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * LegRatioQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t legRatioQtyId() SBE_NOEXCEPT + { + return 623; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legRatioQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legRatioQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legRatioQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legRatioQtyEncodingOffset() SBE_NOEXCEPT + { + return 18; + } + + static SBE_CONSTEXPR std::uint8_t legRatioQtyNullValue() SBE_NOEXCEPT + { + return (std::uint8_t)255; + } + + static SBE_CONSTEXPR std::uint8_t legRatioQtyMinValue() SBE_NOEXCEPT + { + return (std::uint8_t)0; + } + + static SBE_CONSTEXPR std::uint8_t legRatioQtyMaxValue() SBE_NOEXCEPT + { + return (std::uint8_t)254; + } + + static SBE_CONSTEXPR std::size_t legRatioQtyEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t legRatioQty() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); + return (val); + } + + NoLegs &legRatioQty(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, NoLegs writer) + { + builder << '{'; + builder << R"("LegPrice": )"; + builder << writer.legPrice(); + + builder << ", "; + builder << R"("LegOptionDelta": )"; + builder << writer.legOptionDelta(); + + builder << ", "; + builder << R"("LegSecurityID": )"; + builder << +writer.legSecurityID(); + + builder << ", "; + builder << R"("LegSide": )"; + builder << '"' << writer.legSide() << '"'; + + builder << ", "; + builder << R"("LegRatioQty": )"; + builder << +writer.legRatioQty(); + + builder << '}'; + + return builder; + } + }; + +private: + NoLegs m_noLegs; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLegsId() SBE_NOEXCEPT + { + return 555; + } + + SBE_NODISCARD inline NoLegs &noLegs() + { + m_noLegs.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + NoLegs &noLegsCount(const std::uint8_t count) + { + m_noLegs.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noLegsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noLegsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noLegsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, SecurityDefinitionResponse561 _writer) + { + SecurityDefinitionResponse561 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "SecurityDefinitionResponse561", )"; + 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"("FinancialInstrumentFullName": )"; + builder << '"' << + writer.getFinancialInstrumentFullNameAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SenderID": )"; + builder << '"' << + writer.getSenderIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Symbol": )"; + builder << '"' << + writer.getSymbolAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PartyDetailsListReqID": )"; + builder << +writer.partyDetailsListReqID(); + + builder << ", "; + builder << R"("SecurityReqID": )"; + builder << +writer.securityReqID(); + + builder << ", "; + builder << R"("SecurityResponseID": )"; + builder << +writer.securityResponseID(); + + builder << ", "; + builder << R"("SendingTimeEpoch": )"; + builder << +writer.sendingTimeEpoch(); + + builder << ", "; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityType": )"; + builder << '"' << + writer.getSecurityTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Location": )"; + builder << '"' << + writer.getLocationAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("Currency": )"; + builder << '"' << + writer.getCurrencyAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("MaturityMonthYear": )"; + builder << writer.maturityMonthYear(); + + builder << ", "; + builder << R"("DelayDuration": )"; + builder << +writer.delayDuration(); + + builder << ", "; + builder << R"("StartDate": )"; + builder << +writer.startDate(); + + builder << ", "; + builder << R"("EndDate": )"; + builder << +writer.endDate(); + + builder << ", "; + builder << R"("MaxNoOfSubstitutions": )"; + builder << +writer.maxNoOfSubstitutions(); + + builder << ", "; + builder << R"("SourceRepoID": )"; + builder << +writer.sourceRepoID(); + + builder << ", "; + builder << R"("TerminationType": )"; + builder << '"' << + writer.getTerminationTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityResponseType": )"; + builder << '"' << writer.securityResponseType() << '"'; + + builder << ", "; + builder << R"("ExpirationCycle": )"; + builder << '"' << writer.expirationCycle() << '"'; + + builder << ", "; + builder << R"("ManualOrderIndicator": )"; + builder << '"' << writer.manualOrderIndicator() << '"'; + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << ", "; + builder << R"("AutoQuoteRequest": )"; + builder << '"' << writer.autoQuoteRequest() << '"'; + + builder << ", "; + builder << R"("PossRetransFlag": )"; + builder << '"' << writer.possRetransFlag() << '"'; + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoLegs": [)"; + writer.noLegs().forEach([&](NoLegs& noLegs) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noLegs; + }); + builder << ']'; + } + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/Sequence506.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/Sequence506.h new file mode 100644 index 000000000..56931de27 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/Sequence506.h @@ -0,0 +1,622 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SEQUENCE506_H_ +#define _ILINKBINARY_SEQUENCE506_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 Sequence506 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + Sequence506() = default; + + Sequence506( + 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_actingVersion(actingVersion) + { + } + + Sequence506(char *buffer, const std::uint64_t bufferLength) : + Sequence506(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + Sequence506( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + Sequence506(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)14; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)506; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "Sequence"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + Sequence506 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = Sequence506(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + Sequence506 &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 = Sequence506( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + Sequence506 &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 = Sequence506(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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 * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 0; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Sequence506 &uUID(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 * NextSeqNoMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t nextSeqNoId() SBE_NOEXCEPT + { + return 39013; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t nextSeqNoSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool nextSeqNoInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= nextSeqNoSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t nextSeqNoEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoMinValue() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint32_t nextSeqNoMaxValue() SBE_NOEXCEPT + { + return 4294967294; + } + + static SBE_CONSTEXPR std::size_t nextSeqNoEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t nextSeqNo() 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); + } + + Sequence506 &nextSeqNo(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 * FaultToleranceIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t faultToleranceIndicatorId() SBE_NOEXCEPT + { + return 39010; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t faultToleranceIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool faultToleranceIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= faultToleranceIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t faultToleranceIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD FTI::Value faultToleranceIndicator() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint8_t)); + return FTI::get((val)); + } + + Sequence506 &faultToleranceIndicator(const FTI::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char * KeepAliveIntervalLapsedMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t keepAliveIntervalLapsedId() SBE_NOEXCEPT + { + return 39016; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t keepAliveIntervalLapsedSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool keepAliveIntervalLapsedInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= keepAliveIntervalLapsedSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t keepAliveIntervalLapsedEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t keepAliveIntervalLapsedEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD KeepAliveLapsed::Value keepAliveIntervalLapsed() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::uint8_t)); + return KeepAliveLapsed::get((val)); + } + + Sequence506 &keepAliveIntervalLapsed(const KeepAliveLapsed::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 13, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, Sequence506 _writer) + { + Sequence506 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "Sequence506", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("NextSeqNo": )"; + builder << +writer.nextSeqNo(); + + builder << ", "; + builder << R"("FaultToleranceIndicator": )"; + builder << '"' << writer.faultToleranceIndicator() << '"'; + + builder << ", "; + builder << R"("KeepAliveIntervalLapsed": )"; + builder << '"' << writer.keepAliveIntervalLapsed() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ShortSaleType.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ShortSaleType.h new file mode 100644 index 000000000..3d5cd5f8f --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ShortSaleType.h @@ -0,0 +1,144 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SHORTSALETYPE_H_ +#define _ILINKBINARY_SHORTSALETYPE_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class ShortSaleType +{ +public: + enum Value + { + LongSell = (std::uint8_t)0, + ShortSaleWithNoExemptionSESH = (std::uint8_t)1, + ShortSaleWithExemptionSSEX = (std::uint8_t)2, + UndisclosedSellInformationNotAvailableUNDI = (std::uint8_t)3, + NULL_VALUE = (std::uint8_t)255 + }; + + static ShortSaleType::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return LongSell; + case 1: return ShortSaleWithNoExemptionSESH; + case 2: return ShortSaleWithExemptionSSEX; + case 3: return UndisclosedSellInformationNotAvailableUNDI; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum ShortSaleType [E103]"); + } + + static const char* c_str(const ShortSaleType::Value value) + { + switch (value) + { + case LongSell: return "LongSell"; + case ShortSaleWithNoExemptionSESH: return "ShortSaleWithNoExemptionSESH"; + case ShortSaleWithExemptionSSEX: return "ShortSaleWithExemptionSSEX"; + case UndisclosedSellInformationNotAvailableUNDI: return "UndisclosedSellInformationNotAvailableUNDI"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum ShortSaleType [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, ShortSaleType::Value m) + { + return os << ShortSaleType::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/SideNULL.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SideNULL.h new file mode 100644 index 000000000..4dd1c5daa --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SideNULL.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SIDENULL_H_ +#define _ILINKBINARY_SIDENULL_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class SideNULL +{ +public: + enum Value + { + Buy = (std::uint8_t)1, + Sell = (std::uint8_t)2, + NULL_VALUE = (std::uint8_t)255 + }; + + static SideNULL::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return Buy; + case 2: return Sell; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum SideNULL [E103]"); + } + + static const char* c_str(const SideNULL::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 SideNULL [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, SideNULL::Value m) + { + return os << SideNULL::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/SideReq.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SideReq.h new file mode 100644 index 000000000..1314cf4b3 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SideReq.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SIDEREQ_H_ +#define _ILINKBINARY_SIDEREQ_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class SideReq +{ +public: + enum Value + { + Buy = (std::uint8_t)1, + Sell = (std::uint8_t)2, + NULL_VALUE = (std::uint8_t)255 + }; + + static SideReq::Value get(const std::uint8_t value) + { + switch (value) + { + case 1: return Buy; + case 2: return Sell; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum SideReq [E103]"); + } + + static const char* c_str(const SideReq::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 SideReq [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, SideReq::Value m) + { + return os << SideReq::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/SideTimeInForce.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SideTimeInForce.h new file mode 100644 index 000000000..6a0392efa --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SideTimeInForce.h @@ -0,0 +1,138 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SIDETIMEINFORCE_H_ +#define _ILINKBINARY_SIDETIMEINFORCE_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class SideTimeInForce +{ +public: + enum Value + { + Day = (std::uint8_t)0, + FAK = (std::uint8_t)3, + NULL_VALUE = (std::uint8_t)255 + }; + + static SideTimeInForce::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return Day; + case 3: return FAK; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum SideTimeInForce [E103]"); + } + + static const char* c_str(const SideTimeInForce::Value value) + { + switch (value) + { + case Day: return "Day"; + case FAK: return "FAK"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum SideTimeInForce [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, SideTimeInForce::Value m) + { + return os << SideTimeInForce::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/SplitMsg.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SplitMsg.h new file mode 100644 index 000000000..271bd9f4c --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/SplitMsg.h @@ -0,0 +1,141 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_SPLITMSG_H_ +#define _ILINKBINARY_SPLITMSG_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class SplitMsg +{ +public: + enum Value + { + SplitMessageDelayed = (std::uint8_t)0, + OutofOrderMessageDelayed = (std::uint8_t)1, + CompleteMessageDelayed = (std::uint8_t)2, + NULL_VALUE = (std::uint8_t)255 + }; + + static SplitMsg::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return SplitMessageDelayed; + case 1: return OutofOrderMessageDelayed; + case 2: return CompleteMessageDelayed; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum SplitMsg [E103]"); + } + + static const char* c_str(const SplitMsg::Value value) + { + switch (value) + { + case SplitMessageDelayed: return "SplitMessageDelayed"; + case OutofOrderMessageDelayed: return "OutofOrderMessageDelayed"; + case CompleteMessageDelayed: return "CompleteMessageDelayed"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum SplitMsg [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, SplitMsg::Value m) + { + return os << SplitMsg::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/Terminate507.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/Terminate507.h new file mode 100644 index 000000000..8388af624 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/Terminate507.h @@ -0,0 +1,851 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_TERMINATE507_H_ +#define _ILINKBINARY_TERMINATE507_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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 "OrderStatus.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 Terminate507 +{ +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_actingVersion = 0; + + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } + +public: + 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; + }; + + Terminate507() = default; + + Terminate507( + 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_actingVersion(actingVersion) + { + } + + Terminate507(char *buffer, const std::uint64_t bufferLength) : + Terminate507(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } + + Terminate507( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + Terminate507(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return (std::uint16_t)67; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return (std::uint16_t)507; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return (std::uint16_t)8; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return (std::uint16_t)2; + } + + SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT + { + return "Terminate"; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + Terminate507 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = Terminate507(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } + + Terminate507 &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 = Terminate507( + buffer, + offset + MessageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } + + Terminate507 &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 = Terminate507(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } + + 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 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 * ReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t reasonId() SBE_NOEXCEPT + { + return 39011; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool reasonInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reasonSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reasonEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char reasonNullValue() SBE_NOEXCEPT + { + return (char)0; + } + + static SBE_CONSTEXPR char reasonMinValue() SBE_NOEXCEPT + { + return (char)32; + } + + static SBE_CONSTEXPR char reasonMaxValue() SBE_NOEXCEPT + { + return (char)126; + } + + static SBE_CONSTEXPR std::size_t reasonEncodingLength() SBE_NOEXCEPT + { + return 48; + } + + static SBE_CONSTEXPR std::uint64_t reasonLength() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD const char *reason() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *reason() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char reason(const std::uint64_t index) const + { + if (index >= 48) + { + throw std::runtime_error("index out of range for reason [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + Terminate507 &reason(const std::uint64_t index, const char value) + { + if (index >= 48) + { + throw std::runtime_error("index out of range for reason [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getReason(char *const dst, const std::uint64_t length) const + { + if (length > 48) + { + throw std::runtime_error("length too large for getReason [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + Terminate507 &putReason(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 48); + return *this; + } + + std::string getReasonAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 48 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getReasonAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getReasonAsString(); + + for (auto c = s.cbegin(); c != s.cend(); c++) + { + 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 + std::string_view getReasonAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 48 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + Terminate507 &putReason(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 48) + { + throw std::runtime_error("string too large for putReason [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 48; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + Terminate507 &putReason(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 48) + { + throw std::runtime_error("string too large for putReason [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 48; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 48; + } + + static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + 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 + 48, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Terminate507 &uUID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 48, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT + { + return 39002; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= requestTimestampSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT + { + return 56; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT + { + return 0x0L; + } + + static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT + { + return 0xfffffffffffffffeL; + } + + static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 56, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + Terminate507 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 56, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char * ErrorCodesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + return ""; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesId() SBE_NOEXCEPT + { + return 39012; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t errorCodesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool errorCodesInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= errorCodesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t errorCodesEncodingOffset() SBE_NOEXCEPT + { + return 64; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesMinValue() SBE_NOEXCEPT + { + return (std::uint16_t)0; + } + + static SBE_CONSTEXPR std::uint16_t errorCodesMaxValue() SBE_NOEXCEPT + { + return (std::uint16_t)65534; + } + + static SBE_CONSTEXPR std::size_t errorCodesEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t errorCodes() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + Terminate507 &errorCodes(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::EPOCH: return ""; + case MetaAttribute::TIME_UNIT: return ""; + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + } + + 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 66; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t)); + return SplitMsg::get((val)); + } + + Terminate507 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 66, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& builder, Terminate507 _writer) + { + Terminate507 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "Terminate507", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("Reason": )"; + builder << '"' << + writer.getReasonAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("UUID": )"; + builder << +writer.uUID(); + + builder << ", "; + builder << R"("RequestTimestamp": )"; + builder << +writer.requestTimestamp(); + + builder << ", "; + builder << R"("ErrorCodes": )"; + builder << +writer.errorCodes(); + + builder << ", "; + builder << R"("SplitMsg": )"; + builder << '"' << writer.splitMsg() << '"'; + + builder << '}'; + + return builder; + } +}; +} +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/TimeInForce.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/TimeInForce.h new file mode 100644 index 000000000..7f2631e92 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/TimeInForce.h @@ -0,0 +1,147 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_TIMEINFORCE_H_ +#define _ILINKBINARY_TIMEINFORCE_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class TimeInForce +{ +public: + enum Value + { + Day = (std::uint8_t)0, + GoodTillCancel = (std::uint8_t)1, + FillAndKill = (std::uint8_t)3, + FillOrKill = (std::uint8_t)4, + GoodTillDate = (std::uint8_t)6, + NULL_VALUE = (std::uint8_t)255 + }; + + static TimeInForce::Value get(const std::uint8_t value) + { + switch (value) + { + case 0: return Day; + case 1: return GoodTillCancel; + case 3: return FillAndKill; + case 4: return FillOrKill; + case 6: return GoodTillDate; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum TimeInForce [E103]"); + } + + static const char* c_str(const TimeInForce::Value value) + { + switch (value) + { + case Day: return "Day"; + case GoodTillCancel: return "GoodTillCancel"; + case FillAndKill: return "FillAndKill"; + case FillOrKill: return "FillOrKill"; + case GoodTillDate: return "GoodTillDate"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum TimeInForce [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, TimeInForce::Value m) + { + return os << TimeInForce::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/TradeAddendum.h b/src/lib/orderman_v2/actors/gateway/ilink3/generated/TradeAddendum.h new file mode 100644 index 000000000..5eed6d46f --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/TradeAddendum.h @@ -0,0 +1,144 @@ +/* Generated SBE (Simple Binary Encoding) message codec */ +#ifndef _ILINKBINARY_TRADEADDENDUM_H_ +#define _ILINKBINARY_TRADEADDENDUM_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 +# include +# include +# include +#endif + +#if __cplusplus >= 201103L +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept +#else +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT +#endif + +#if __cplusplus >= 201703L +# 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 + +#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)() + + +namespace iLinkBinary { + +class TradeAddendum +{ +public: + enum Value + { + PartiallyFilled = (std::uint8_t)4, + Filled = (std::uint8_t)5, + TradeCancel = (std::uint8_t)100, + TradeCorrection = (std::uint8_t)101, + NULL_VALUE = (std::uint8_t)255 + }; + + static TradeAddendum::Value get(const std::uint8_t value) + { + switch (value) + { + case 4: return PartiallyFilled; + case 5: return Filled; + case 100: return TradeCancel; + case 101: return TradeCorrection; + case 255: return NULL_VALUE; + } + + throw std::runtime_error("unknown value for enum TradeAddendum [E103]"); + } + + static const char* c_str(const TradeAddendum::Value value) + { + switch (value) + { + case PartiallyFilled: return "PartiallyFilled"; + case Filled: return "Filled"; + case TradeCancel: return "TradeCancel"; + case TradeCorrection: return "TradeCorrection"; + case NULL_VALUE: return "NULL_VALUE"; + } + + throw std::runtime_error("unknown value for enum TradeAddendum [E103]:"); + } + + template + friend std::basic_ostream& operator<<( + std::basic_ostream& os, TradeAddendum::Value m) + { + return os << TradeAddendum::c_str(m); + } +}; + +} + +#endif diff --git a/src/lib/orderman_v2/actors/gateway/ilink3/generated/ilinkbinary.xml b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ilinkbinary.xml new file mode 100644 index 000000000..02a2a85cd --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/ilink3/generated/ilinkbinary.xml @@ -0,0 +1,1564 @@ + + + + + IDEMPOTENT + 2 + 0 + 3 + 1 + 2 + RECOVERABLE + 0 + 8 + I + 4 + C + 5 + F + CME-1-SHA-256 + + + 8 + + 3 + 5 + 1 + 4 + U + U + C + 0 + 8 + C + 8 + 1 + + + + + + + + + + + + + + + + + + + + Y + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -9 + + + + -9 + + + + + + + + + + + + + + + + + 0 + 1 + 3 + + + 0 + 1 + + + 0 + 1 + + + 0 + 1 + + + G + S + + + C + D + G + H + W + Y + + + 1 + 2 + 3 + 4 + + + A + B + C + D + E + F + G + Z + + + 1 + 2 + + + A + P + + + 8 + 9 + 100 + 103 + 104 + 105 + 106 + 107 + 108 + + + G + H + + + 0 + 2 + + + 0 + 1 + + + 0 + 1 + + + A + D + + + 0 + 1 + + + 0 + 1 + + + 2 + 4 + + + 0 + 1 + + + 1 + 7 + 9 + 10 + 100 + + + 0 + 1 + 6 + + + 100 + 101 + + + 100 + 101 + + + 1 + 3 + 100 + + + 0 + 1 + 6 + + + 0 + 1 + + + 1 + 2 + + + G + H + + + 4 + 5 + + + 0 + 1 + 2 + 4 + 5 + 8 + C + U + + + 1 + 2 + 4 + K + + + 1 + 2 + 3 + 4 + K + + + 1 + 24 + 96 + 118 + 1000 + + + 0 + 5 + + + 1 + 3 + 4 + 5 + 100 + + + 1 + 3 + 4 + 100 + + + 1 + + + 1 + 2 + 8 + + + 0 + 2 + 3 + 4 + + + 0 + 1 + + + N + O + + + 1 + 2 + 5 + + + 0 + 1 + 2 + 3 + + + 1 + 2 + + + 1 + 2 + + + 0 + 3 + + + 0 + 1 + 2 + + + 0 + 1 + 3 + 4 + 6 + + + 4 + 5 + 100 + 101 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 917c3ee909b4c953af808d8f7915319cbf042097 Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Mon, 30 Dec 2019 16:49:58 -0500 Subject: [PATCH 3/4] Update SecureLogon for ilink3 --- src/lib/utils/SecureLogon.cpp | 40 +++++---------------------------- src/lib/utils/SecureLogon.h | 42 ++++++++++++++++++++++++----------- 2 files changed, 34 insertions(+), 48 deletions(-) diff --git a/src/lib/utils/SecureLogon.cpp b/src/lib/utils/SecureLogon.cpp index 62a24e00f..b5b65d191 100644 --- a/src/lib/utils/SecureLogon.cpp +++ b/src/lib/utils/SecureLogon.cpp @@ -94,42 +94,12 @@ std::tuple load_session_keys(const string& session) { bts_assert_msg(false, error); } -LogonData calculate_hmac( - const std::string& session_id, - const std::string& msg_seq_num, - const std::string& sender_comp_id, - const std::string& sender_sub_id, - const std::string& sending_time, - const std::string& target_sub_id, - const std::string& heartbeat_interval, - const std::string& sender_location_id, - const std::string& last_seq_num, - const std::string& application_system_name, - const std::string& application_system_version, - const std::string& application_system_vendor - ) { +LogonData calculate_hmac(const std::string& session_id, const std::vector& values) { string canonical; - canonical += msg_seq_num; - canonical += '\n'; - canonical += sender_comp_id; - canonical += '\n'; - canonical += sender_sub_id; - canonical += '\n'; - canonical += sending_time; - canonical += '\n'; - canonical += target_sub_id; - canonical += '\n'; - canonical += heartbeat_interval; - canonical += '\n'; - canonical += sender_location_id; - canonical += '\n'; - canonical += last_seq_num; - canonical += '\n'; - canonical += application_system_name; - canonical += '\n'; - canonical += application_system_version; - canonical += '\n'; - canonical += application_system_vendor; + for (const auto& v : values) { + canonical += v; + canonical += '\n'; + } string secret_key, access_id; std::tie(access_id, secret_key) = load_session_keys(session_id); diff --git a/src/lib/utils/SecureLogon.h b/src/lib/utils/SecureLogon.h index 7e5376349..6eacc16c1 100644 --- a/src/lib/utils/SecureLogon.h +++ b/src/lib/utils/SecureLogon.h @@ -1,5 +1,6 @@ #pragma once #include +#include namespace bts { namespace glbx { @@ -10,20 +11,35 @@ struct LogonData { std::string canonical; }; + +LogonData calculate_hmac(const std::string& session_id, const std::vector&); + +template LogonData calculate_hmac( - const std::string& session_id, - const std::string& msg_seq_num, - const std::string& sender_comp_id, - const std::string& sender_sub_id, - const std::string& sending_time, - const std::string& target_sub_id, - const std::string& heartbeat_interval, - const std::string& sender_location_id, - const std::string& last_seq_num, - const std::string& application_system_name, - const std::string& application_system_version, - const std::string& application_system_vendor - ); + const std::string& session_id, + Ts... inputs) { + return calculate_hmac(session_id, std::vector { inputs... }); +} + +// CME FIX +// session_id, +// msg_seq_num, +// sender_comp_id, +// sender_sub_id, +// sending_time, +// target_sub_id, +// heartbeat_interval, +// sender_location_id, +// last_seq_num, +// application_system_name, +// application_system_version, +// application_system_vendor + +// CME ilink3 +// RequestTimestamp +// UUID +// SessionID +// FirmID } } From f5ae6559eee54356317d9edab030cfdcc3850d5d Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Tue, 31 Dec 2019 11:40:26 -0500 Subject: [PATCH 4/4] Add default_venue_observer so I don't need a nullptr --- .../orderman_v2/actors/gateway/IVenueObserver.cpp | 15 +++++++++++++++ .../orderman_v2/actors/gateway/IVenueObserver.h | 3 +++ 2 files changed, 18 insertions(+) create mode 100644 src/lib/orderman_v2/actors/gateway/IVenueObserver.cpp diff --git a/src/lib/orderman_v2/actors/gateway/IVenueObserver.cpp b/src/lib/orderman_v2/actors/gateway/IVenueObserver.cpp new file mode 100644 index 000000000..a8ceb2a50 --- /dev/null +++ b/src/lib/orderman_v2/actors/gateway/IVenueObserver.cpp @@ -0,0 +1,15 @@ +#include "IVenueObserver.h" +namespace bts { +namespace orderman_v2 { + struct SilentVenueObserver : public IVenueObserver { + void on_venue_login_success(std::vector const &) override { } + void on_venue_login_failure() override { } + void on_venue_disconnect() override { } + void on_venue_exe_report(const ExecReport &) override { } + void on_venue_error(VenueError const &) override { } + }; + IVenueObserver& default_venue_observer() { + static SilentVenueObserver svo; + return svo; + } +}} \ No newline at end of file diff --git a/src/lib/orderman_v2/actors/gateway/IVenueObserver.h b/src/lib/orderman_v2/actors/gateway/IVenueObserver.h index b9b98379e..75c88d9b6 100644 --- a/src/lib/orderman_v2/actors/gateway/IVenueObserver.h +++ b/src/lib/orderman_v2/actors/gateway/IVenueObserver.h @@ -1,4 +1,5 @@ #pragma once +#include "lib/orderman_v2/common.h" // OrderKey namespace bts { namespace orderman_v2 { @@ -36,5 +37,7 @@ class IVenueObserver { virtual void on_venue_error(VenueError const &) = 0; }; +IVenueObserver& default_venue_observer(); + } // namespace orderman_v2 } // namespace bts