diff --git a/docker/linux b/docker/linux index 30707087b..56c61231f 160000 --- a/docker/linux +++ b/docker/linux @@ -1 +1 @@ -Subproject commit 30707087b8635186218f6cce32d62d0a22c5a583 +Subproject commit 56c61231f38261f275e0b26baae70622c760dc33 diff --git a/externals b/externals index 768cfa0f9..4d96613ca 160000 --- a/externals +++ b/externals @@ -1 +1 @@ -Subproject commit 768cfa0f9b0ce18eead344a5b66e10c558fec26d +Subproject commit 4d96613ca8a088e2bfb682fa1879592b3439779a diff --git a/src/lib/orderman/actors/ilink3/ILink3Utils.cpp b/src/lib/orderman/actors/ilink3/ILink3Utils.cpp index 9bba8d3dd..cc7846fd3 100644 --- a/src/lib/orderman/actors/ilink3/ILink3Utils.cpp +++ b/src/lib/orderman/actors/ilink3/ILink3Utils.cpp @@ -162,9 +162,9 @@ map_cust_cti(api::orderman::CTICode code) { case CTI_CODE_CTI_CODE1: return CustOrderCapacity::Membertradingfortheirownaccount; case CTI_CODE_CTI_CODE2: - return CustOrderCapacity::Clearingfirmtradingforitsproprietaryaccount; + return CustOrderCapacity::Memberfirmtradingforitsproprietaryaccount; case CTI_CODE_CTI_CODE3: - return CustOrderCapacity::Membertradingforanothermember; + return CustOrderCapacity::Membertradingforanothermemberornonmember; case CTI_CODE_CTI_CODE4: return CustOrderCapacity::Allother; default: diff --git a/src/lib/orderman/actors/ilink3/generated/AvgPxInd.h b/src/lib/orderman/actors/ilink3/generated/AvgPxInd.h index c93ac57d4..5a0677067 100644 --- a/src/lib/orderman/actors/ilink3/generated/AvgPxInd.h +++ b/src/lib/orderman/actors/ilink3/generated/AvgPxInd.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class AvgPxInd @@ -127,8 +63,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, AvgPxInd::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, AvgPxInd::Value m) { return os << AvgPxInd::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/BooleanFlag.h b/src/lib/orderman/actors/ilink3/generated/BooleanFlag.h index 1faff88e8..b361cc5ea 100644 --- a/src/lib/orderman/actors/ilink3/generated/BooleanFlag.h +++ b/src/lib/orderman/actors/ilink3/generated/BooleanFlag.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class BooleanFlag @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, BooleanFlag::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, BooleanFlag::Value m) { return os << BooleanFlag::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/BooleanNULL.h b/src/lib/orderman/actors/ilink3/generated/BooleanNULL.h index 866ed6b42..3c28c3df2 100644 --- a/src/lib/orderman/actors/ilink3/generated/BooleanNULL.h +++ b/src/lib/orderman/actors/ilink3/generated/BooleanNULL.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class BooleanNULL @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, BooleanNULL::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, BooleanNULL::Value m) { return os << BooleanNULL::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/BusinessReject521.h b/src/lib/orderman/actors/ilink3/generated/BusinessReject521.h index 2ef903b00..5db006073 100644 --- a/src/lib/orderman/actors/ilink3/generated/BusinessReject521.h +++ b/src/lib/orderman/actors/ilink3/generated/BusinessReject521.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(330); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(521); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = BusinessReject521(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + BusinessReject521 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - BusinessReject521 &putText(const std::string& str) + BusinessReject521 &putText(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 256) @@ -874,7 +881,7 @@ public: return *this; } #else - BusinessReject521 &putSenderID(const std::string& str) + BusinessReject521 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1293,7 +1300,7 @@ public: return *this; } #else - BusinessReject521 &putLocation(const std::string& str) + BusinessReject521 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -1724,7 +1731,7 @@ public: return *this; } #else - BusinessReject521 &putRefMsgType(const std::string& str) + BusinessReject521 &putRefMsgType(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 2) @@ -1932,11 +1939,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, BusinessReject521 _writer) +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); + BusinessReject521 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "BusinessReject521", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/ClearingAcctType.h b/src/lib/orderman/actors/ilink3/generated/ClearingAcctType.h index 0b145a7b2..ae3006427 100644 --- a/src/lib/orderman/actors/ilink3/generated/ClearingAcctType.h +++ b/src/lib/orderman/actors/ilink3/generated/ClearingAcctType.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class ClearingAcctType @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, ClearingAcctType::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, ClearingAcctType::Value m) { return os << ClearingAcctType::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/CmtaGiveUpCD.h b/src/lib/orderman/actors/ilink3/generated/CmtaGiveUpCD.h index 79f25bf02..3a96a4b98 100644 --- a/src/lib/orderman/actors/ilink3/generated/CmtaGiveUpCD.h +++ b/src/lib/orderman/actors/ilink3/generated/CmtaGiveUpCD.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class CmtaGiveUpCD @@ -96,7 +32,7 @@ public: { GiveUp = static_cast(71), SGXoffset = static_cast(83), - NULL_VALUE = static_cast(0) + NULL_VALUE = static_cast(0x00) }; static CmtaGiveUpCD::Value get(const char value) @@ -105,7 +41,7 @@ public: { case static_cast(71): return GiveUp; case static_cast(83): return SGXoffset; - case static_cast(0): return NULL_VALUE; + case static_cast(0x00): return NULL_VALUE; } throw std::runtime_error("unknown value for enum CmtaGiveUpCD [E103]"); @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, CmtaGiveUpCD::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, CmtaGiveUpCD::Value m) { return os << CmtaGiveUpCD::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/CustOrdHandlInst.h b/src/lib/orderman/actors/ilink3/generated/CustOrdHandlInst.h index 1ce5ed826..40e7598f4 100644 --- a/src/lib/orderman/actors/ilink3/generated/CustOrdHandlInst.h +++ b/src/lib/orderman/actors/ilink3/generated/CustOrdHandlInst.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class CustOrdHandlInst @@ -100,7 +36,7 @@ public: AlgoEngine = static_cast(72), DeskElectronic = static_cast(87), ClientElectronic = static_cast(89), - NULL_VALUE = static_cast(0) + NULL_VALUE = static_cast(48) }; static CustOrdHandlInst::Value get(const char value) @@ -113,7 +49,7 @@ public: case static_cast(72): return AlgoEngine; case static_cast(87): return DeskElectronic; case static_cast(89): return ClientElectronic; - case static_cast(0): return NULL_VALUE; + case static_cast(48): return NULL_VALUE; } throw std::runtime_error("unknown value for enum CustOrdHandlInst [E103]"); @@ -136,8 +72,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, CustOrdHandlInst::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, CustOrdHandlInst::Value m) { return os << CustOrdHandlInst::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/CustOrderCapacity.h b/src/lib/orderman/actors/ilink3/generated/CustOrderCapacity.h index cfdc79846..524f0a634 100644 --- a/src/lib/orderman/actors/ilink3/generated/CustOrderCapacity.h +++ b/src/lib/orderman/actors/ilink3/generated/CustOrderCapacity.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class CustOrderCapacity @@ -95,8 +31,8 @@ public: enum Value { Membertradingfortheirownaccount = static_cast(1), - Clearingfirmtradingforitsproprietaryaccount = static_cast(2), - Membertradingforanothermember = static_cast(3), + Memberfirmtradingforitsproprietaryaccount = static_cast(2), + Membertradingforanothermemberornonmember = static_cast(3), Allother = static_cast(4), NULL_VALUE = static_cast(255) }; @@ -106,8 +42,8 @@ public: switch (value) { case static_cast(1): return Membertradingfortheirownaccount; - case static_cast(2): return Clearingfirmtradingforitsproprietaryaccount; - case static_cast(3): return Membertradingforanothermember; + case static_cast(2): return Memberfirmtradingforitsproprietaryaccount; + case static_cast(3): return Membertradingforanothermemberornonmember; case static_cast(4): return Allother; case static_cast(255): return NULL_VALUE; } @@ -120,8 +56,8 @@ public: switch (value) { case Membertradingfortheirownaccount: return "Membertradingfortheirownaccount"; - case Clearingfirmtradingforitsproprietaryaccount: return "Clearingfirmtradingforitsproprietaryaccount"; - case Membertradingforanothermember: return "Membertradingforanothermember"; + case Memberfirmtradingforitsproprietaryaccount: return "Memberfirmtradingforitsproprietaryaccount"; + case Membertradingforanothermemberornonmember: return "Membertradingforanothermemberornonmember"; case Allother: return "Allother"; case NULL_VALUE: return "NULL_VALUE"; } @@ -130,8 +66,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, CustOrderCapacity::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, CustOrderCapacity::Value m) { return os << CustOrderCapacity::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/DATA.h b/src/lib/orderman/actors/ilink3/generated/DATA.h index 7c672d510..2fdbfdba7 100644 --- a/src/lib/orderman/actors/ilink3/generated/DATA.h +++ b/src/lib/orderman/actors/ilink3/generated/DATA.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static const char *lengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT @@ -324,8 +324,8 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, DATA writer) +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, DATA writer) { builder << '{'; builder << R"("length": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/DKReason.h b/src/lib/orderman/actors/ilink3/generated/DKReason.h index 53d9e7bce..2be28325d 100644 --- a/src/lib/orderman/actors/ilink3/generated/DKReason.h +++ b/src/lib/orderman/actors/ilink3/generated/DKReason.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class DKReason @@ -102,7 +38,7 @@ public: CalculationDifference = static_cast(70), NoMatchingExecutionReport = static_cast(71), Other = static_cast(90), - NULL_VALUE = static_cast(0) + NULL_VALUE = static_cast(48) }; static DKReason::Value get(const char value) @@ -117,7 +53,7 @@ public: case static_cast(70): return CalculationDifference; case static_cast(71): return NoMatchingExecutionReport; case static_cast(90): return Other; - case static_cast(0): return NULL_VALUE; + case static_cast(48): return NULL_VALUE; } throw std::runtime_error("unknown value for enum DKReason [E103]"); @@ -142,8 +78,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, DKReason::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, DKReason::Value m) { return os << DKReason::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/Decimal32NULL.h b/src/lib/orderman/actors/ilink3/generated/Decimal32NULL.h index 539277a71..f936295e2 100644 --- a/src/lib/orderman/actors/ilink3/generated/Decimal32NULL.h +++ b/src/lib/orderman/actors/ilink3/generated/Decimal32NULL.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT @@ -338,8 +338,8 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, Decimal32NULL writer) +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, Decimal32NULL writer) { builder << '{'; builder << R"("mantissa": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/Decimal64NULL.h b/src/lib/orderman/actors/ilink3/generated/Decimal64NULL.h index 2469e5d9c..ef20dc82e 100644 --- a/src/lib/orderman/actors/ilink3/generated/Decimal64NULL.h +++ b/src/lib/orderman/actors/ilink3/generated/Decimal64NULL.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT @@ -213,7 +213,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT { - return 0; + return 6; } SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT @@ -255,6 +255,11 @@ public: SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT { + if (m_actingVersion < 6) + { + return INT64_C(9223372036854775807); + } + std::int64_t val; std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); return SBE_LITTLE_ENDIAN_ENCODE_64(val); @@ -283,7 +288,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT { - return 0; + return 6; } SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT @@ -325,6 +330,11 @@ public: SBE_NODISCARD std::int8_t exponent() const SBE_NOEXCEPT { + if (m_actingVersion < 6) + { + return static_cast(127); + } + std::int8_t val; std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::int8_t)); return (val); @@ -338,8 +348,8 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, Decimal64NULL writer) +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, Decimal64NULL writer) { builder << '{'; builder << R"("mantissa": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/Establish503.h b/src/lib/orderman/actors/ilink3/generated/Establish503.h index 100231850..261b92fac 100644 --- a/src/lib/orderman/actors/ilink3/generated/Establish503.h +++ b/src/lib/orderman/actors/ilink3/generated/Establish503.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(132); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(503); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = Establish503(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + Establish503 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -651,7 +658,7 @@ public: return *this; } #else - Establish503 &putHMACSignature(const std::string& str) + Establish503 &putHMACSignature(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 32) @@ -857,7 +864,7 @@ public: return *this; } #else - Establish503 &putAccessKeyID(const std::string& str) + Establish503 &putAccessKeyID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1063,7 +1070,7 @@ public: return *this; } #else - Establish503 &putTradingSystemName(const std::string& str) + Establish503 &putTradingSystemName(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 30) @@ -1269,7 +1276,7 @@ public: return *this; } #else - Establish503 &putTradingSystemVersion(const std::string& str) + Establish503 &putTradingSystemVersion(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 10) @@ -1475,7 +1482,7 @@ public: return *this; } #else - Establish503 &putTradingSystemVendor(const std::string& str) + Establish503 &putTradingSystemVendor(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 10) @@ -1909,7 +1916,7 @@ public: return *this; } #else - Establish503 &putSession(const std::string& str) + Establish503 &putSession(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 3) @@ -2115,7 +2122,7 @@ public: return *this; } #else - Establish503 &putFirm(const std::string& str) + Establish503 &putFirm(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -2367,7 +2374,7 @@ public: } #endif - Establish503 &putCredentials(const std::string& str) + Establish503 &putCredentials(const std::string &str) { if (str.length() > 65534) { @@ -2388,11 +2395,16 @@ public: #endif template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, Establish503 _writer) +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); + Establish503 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "Establish503", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/EstablishmentAck504.h b/src/lib/orderman/actors/ilink3/generated/EstablishmentAck504.h index 5db99608d..9e319239b 100644 --- a/src/lib/orderman/actors/ilink3/generated/EstablishmentAck504.h +++ b/src/lib/orderman/actors/ilink3/generated/EstablishmentAck504.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(38); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(504); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = EstablishmentAck504(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + EstablishmentAck504 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -962,11 +969,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, EstablishmentAck504 _writer) +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); + EstablishmentAck504 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "EstablishmentAck504", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/EstablishmentReject505.h b/src/lib/orderman/actors/ilink3/generated/EstablishmentReject505.h index 138a041aa..5b81b904f 100644 --- a/src/lib/orderman/actors/ilink3/generated/EstablishmentReject505.h +++ b/src/lib/orderman/actors/ilink3/generated/EstablishmentReject505.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(72); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(505); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = EstablishmentReject505(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + EstablishmentReject505 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -526,7 +533,7 @@ public: return *this; } #else - EstablishmentReject505 &putReason(const std::string& str) + EstablishmentReject505 &putReason(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 48) @@ -955,11 +962,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, EstablishmentReject505 _writer) +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); + EstablishmentReject505 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "EstablishmentReject505", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/ExecAckStatus.h b/src/lib/orderman/actors/ilink3/generated/ExecAckStatus.h index ac884cb70..f9506386d 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecAckStatus.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecAckStatus.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class ExecAckStatus @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, ExecAckStatus::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, ExecAckStatus::Value m) { return os << ExecAckStatus::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/ExecInst.h b/src/lib/orderman/actors/ilink3/generated/ExecInst.h index 47a26fa09..e1595c161 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecInst.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecInst.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } ExecInst &clear() @@ -433,8 +433,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, ExecInst writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, ExecInst writer) { builder << '['; bool atLeastOne = false; diff --git a/src/lib/orderman/actors/ilink3/generated/ExecMode.h b/src/lib/orderman/actors/ilink3/generated/ExecMode.h index 6cb430f84..bb894e61d 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecMode.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecMode.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class ExecMode @@ -96,7 +32,7 @@ public: { Aggressive = static_cast(65), Passive = static_cast(80), - NULL_VALUE = static_cast(0) + NULL_VALUE = static_cast(0x00) }; static ExecMode::Value get(const char value) @@ -105,7 +41,7 @@ public: { case static_cast(65): return Aggressive; case static_cast(80): return Passive; - case static_cast(0): return NULL_VALUE; + case static_cast(0x00): return NULL_VALUE; } throw std::runtime_error("unknown value for enum ExecMode [E103]"); @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, ExecMode::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, ExecMode::Value m) { return os << ExecMode::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/ExecReason.h b/src/lib/orderman/actors/ilink3/generated/ExecReason.h index 749be985a..7a95e048a 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecReason.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecReason.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class ExecReason @@ -103,6 +39,9 @@ public: CancelFromRiskManagementAPI = static_cast(106), SelfMatchPreventionNewestOrderCancelled = static_cast(107), Cancelduetovolquotedoptionorderrestedqtylessthanminordersize = static_cast(108), + CancelRFCOrder = static_cast(109), + CancelUponContractExpiration = static_cast(110), + SystemCancel = static_cast(111), NULL_VALUE = static_cast(255) }; @@ -119,6 +58,9 @@ public: case static_cast(106): return CancelFromRiskManagementAPI; case static_cast(107): return SelfMatchPreventionNewestOrderCancelled; case static_cast(108): return Cancelduetovolquotedoptionorderrestedqtylessthanminordersize; + case static_cast(109): return CancelRFCOrder; + case static_cast(110): return CancelUponContractExpiration; + case static_cast(111): return SystemCancel; case static_cast(255): return NULL_VALUE; } @@ -138,6 +80,9 @@ public: case CancelFromRiskManagementAPI: return "CancelFromRiskManagementAPI"; case SelfMatchPreventionNewestOrderCancelled: return "SelfMatchPreventionNewestOrderCancelled"; case Cancelduetovolquotedoptionorderrestedqtylessthanminordersize: return "Cancelduetovolquotedoptionorderrestedqtylessthanminordersize"; + case CancelRFCOrder: return "CancelRFCOrder"; + case CancelUponContractExpiration: return "CancelUponContractExpiration"; + case SystemCancel: return "SystemCancel"; case NULL_VALUE: return "NULL_VALUE"; } @@ -145,8 +90,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, ExecReason::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, ExecReason::Value m) { return os << ExecReason::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/ExecTypTrdCxl.h b/src/lib/orderman/actors/ilink3/generated/ExecTypTrdCxl.h index 753cdd221..525bdce0f 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecTypTrdCxl.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecTypTrdCxl.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class ExecTypTrdCxl @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, ExecTypTrdCxl::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, ExecTypTrdCxl::Value m) { return os << ExecTypTrdCxl::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionAck539.h b/src/lib/orderman/actors/ilink3/generated/ExecutionAck539.h index 11fbc1c3a..1e5e6b802 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecutionAck539.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionAck539.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(101); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(539); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = ExecutionAck539(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + ExecutionAck539 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -802,7 +809,7 @@ public: return *this; } #else - ExecutionAck539 &putClOrdID(const std::string& str) + ExecutionAck539 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1352,6 +1359,11 @@ public: std::string getSenderIDAsJsonEscapedString() { + if (m_actingVersion < 4) + { + return std::string(""); + } + std::ostringstream oss; std::string s = getSenderIDAsString(); @@ -1414,7 +1426,7 @@ public: return *this; } #else - ExecutionAck539 &putSenderID(const std::string& str) + ExecutionAck539 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1654,6 +1666,11 @@ public: std::string getLocationAsJsonEscapedString() { + if (m_actingVersion < 5) + { + return std::string(""); + } + std::ostringstream oss; std::string s = getLocationAsString(); @@ -1716,7 +1733,7 @@ public: return *this; } #else - ExecutionAck539 &putLocation(const std::string& str) + ExecutionAck539 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -1808,11 +1825,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, ExecutionAck539 _writer) +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); + ExecutionAck539 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "ExecutionAck539", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportCancel534.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportCancel534.h index 63da9f6fa..1f6459986 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecutionReportCancel534.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportCancel534.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(222); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(247); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(534); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(222); + return static_cast(247); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = ExecutionReportCancel534(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + ExecutionReportCancel534 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - ExecutionReportCancel534 &putExecID(const std::string& str) + ExecutionReportCancel534 &putExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 40) @@ -874,7 +881,7 @@ public: return *this; } #else - ExecutionReportCancel534 &putSenderID(const std::string& str) + ExecutionReportCancel534 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1080,7 +1087,7 @@ public: return *this; } #else - ExecutionReportCancel534 &putClOrdID(const std::string& str) + ExecutionReportCancel534 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1877,7 +1884,7 @@ public: return *this; } #else - ExecutionReportCancel534 &putLocation(const std::string& str) + ExecutionReportCancel534 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -3581,12 +3588,602 @@ public: return m_discretionPrice; } + SBE_NODISCARD static const char *ReservationPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t reservationPriceId() SBE_NOEXCEPT + { + return 9562; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservationPriceSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool reservationPriceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reservationPriceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservationPriceEncodingOffset() SBE_NOEXCEPT + { + return 222; + } + +private: + PRICENULL9 m_reservationPrice; + +public: + SBE_NODISCARD PRICENULL9 &reservationPrice() + { + m_reservationPrice.wrap(m_buffer, m_offset + 222, m_actingVersion, m_bufferLength); + return m_reservationPrice; + } + + SBE_NODISCARD static const char *PriorityIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t priorityIndicatorId() SBE_NOEXCEPT + { + return 638; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priorityIndicatorSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool priorityIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priorityIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 230; + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t priorityIndicator() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 230, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportCancel534 &priorityIndicator(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 230, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *OrigOrderUserMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t origOrderUserId() SBE_NOEXCEPT + { + return 9937; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origOrderUserSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool origOrderUserInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origOrderUserSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origOrderUserEncodingOffset() SBE_NOEXCEPT + { + return 231; + } + + static SBE_CONSTEXPR char origOrderUserNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char origOrderUserMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char origOrderUserMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t origOrderUserEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t origOrderUserLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD const char *origOrderUser() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 231; + } + + SBE_NODISCARD char *origOrderUser() SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 231; + } + + SBE_NODISCARD char origOrderUser(const std::uint64_t index) const + { + if (index >= 8) + { + throw std::runtime_error("index out of range for origOrderUser [E104]"); + } + + if (m_actingVersion < 8) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 231 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportCancel534 &origOrderUser(const std::uint64_t index, const char value) + { + if (index >= 8) + { + throw std::runtime_error("index out of range for origOrderUser [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 231 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrigOrderUser(char *const dst, const std::uint64_t length) const + { + if (length > 8) + { + throw std::runtime_error("length too large for getOrigOrderUser [E106]"); + } + + if (m_actingVersion < 8) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 231, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportCancel534 &putOrigOrderUser(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 231, src, sizeof(char) * 8); + return *this; + } + + SBE_NODISCARD std::string getOrigOrderUserAsString() const + { + const char *buffer = m_buffer + m_offset + 231; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrigOrderUserAsJsonEscapedString() + { + if (m_actingVersion < 8) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getOrigOrderUserAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getOrigOrderUserAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 231; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportCancel534 &putOrigOrderUser(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putOrigOrderUser [E106]"); + } + + std::memcpy(m_buffer + m_offset + 231, str.data(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 231 + start] = 0; + } + + return *this; + } + #else + ExecutionReportCancel534 &putOrigOrderUser(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putOrigOrderUser [E106]"); + } + + std::memcpy(m_buffer + m_offset + 231, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 231 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *CancelTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cancelTextId() SBE_NOEXCEPT + { + return 2807; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cancelTextSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool cancelTextInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cancelTextSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cancelTextEncodingOffset() SBE_NOEXCEPT + { + return 239; + } + + static SBE_CONSTEXPR char cancelTextNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char cancelTextMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char cancelTextMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t cancelTextEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t cancelTextLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD const char *cancelText() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 239; + } + + SBE_NODISCARD char *cancelText() SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 239; + } + + SBE_NODISCARD char cancelText(const std::uint64_t index) const + { + if (index >= 8) + { + throw std::runtime_error("index out of range for cancelText [E104]"); + } + + if (m_actingVersion < 8) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 239 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportCancel534 &cancelText(const std::uint64_t index, const char value) + { + if (index >= 8) + { + throw std::runtime_error("index out of range for cancelText [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 239 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getCancelText(char *const dst, const std::uint64_t length) const + { + if (length > 8) + { + throw std::runtime_error("length too large for getCancelText [E106]"); + } + + if (m_actingVersion < 8) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 239, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportCancel534 &putCancelText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 239, src, sizeof(char) * 8); + return *this; + } + + SBE_NODISCARD std::string getCancelTextAsString() const + { + const char *buffer = m_buffer + m_offset + 239; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getCancelTextAsJsonEscapedString() + { + if (m_actingVersion < 8) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getCancelTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCancelTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 239; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportCancel534 &putCancelText(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putCancelText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 239, str.data(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 239 + start] = 0; + } + + return *this; + } + #else + ExecutionReportCancel534 &putCancelText(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putCancelText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 239, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 239 + start] = 0; + } + + return *this; + } + #endif + template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, ExecutionReportCancel534 _writer) +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); + ExecutionReportCancel534 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "ExecutionReportCancel534", )"; builder << R"("sbeTemplateId": )"; @@ -3742,7 +4339,39 @@ friend std::basic_ostream& operator << ( builder << ", "; builder << R"("DiscretionPrice": )"; - builder << writer.discretionPrice(); + if (writer.discretionPriceInActingVersion()) + { + builder << writer.discretionPrice(); + } + else + { + builder << "{}"; + } + + builder << ", "; + builder << R"("ReservationPrice": )"; + if (writer.reservationPriceInActingVersion()) + { + builder << writer.reservationPrice(); + } + else + { + builder << "{}"; + } + + builder << ", "; + builder << R"("PriorityIndicator": )"; + builder << +writer.priorityIndicator(); + + builder << ", "; + builder << R"("OrigOrderUser": )"; + builder << '"' << + writer.getOrigOrderUserAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("CancelText": )"; + builder << '"' << + writer.getCancelTextAsJsonEscapedString().c_str() << '"'; builder << '}'; diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportElimination524.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportElimination524.h index 02f18fbb1..bab8055c5 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecutionReportElimination524.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportElimination524.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(210); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(219); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(524); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(210); + return static_cast(219); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = ExecutionReportElimination524(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + ExecutionReportElimination524 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - ExecutionReportElimination524 &putExecID(const std::string& str) + ExecutionReportElimination524 &putExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 40) @@ -874,7 +881,7 @@ public: return *this; } #else - ExecutionReportElimination524 &putSenderID(const std::string& str) + ExecutionReportElimination524 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1080,7 +1087,7 @@ public: return *this; } #else - ExecutionReportElimination524 &putClOrdID(const std::string& str) + ExecutionReportElimination524 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1877,7 +1884,7 @@ public: return *this; } #else - ExecutionReportElimination524 &putLocation(const std::string& str) + ExecutionReportElimination524 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -3308,12 +3315,140 @@ public: return m_discretionPrice; } + SBE_NODISCARD static const char *ReservationPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t reservationPriceId() SBE_NOEXCEPT + { + return 9562; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservationPriceSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool reservationPriceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reservationPriceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservationPriceEncodingOffset() SBE_NOEXCEPT + { + return 210; + } + +private: + PRICENULL9 m_reservationPrice; + +public: + SBE_NODISCARD PRICENULL9 &reservationPrice() + { + m_reservationPrice.wrap(m_buffer, m_offset + 210, m_actingVersion, m_bufferLength); + return m_reservationPrice; + } + + SBE_NODISCARD static const char *PriorityIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t priorityIndicatorId() SBE_NOEXCEPT + { + return 638; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priorityIndicatorSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool priorityIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priorityIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 218; + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t priorityIndicator() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 218, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportElimination524 &priorityIndicator(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 218, &val, sizeof(std::uint8_t)); + return *this; + } + template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, ExecutionReportElimination524 _writer) +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); + ExecutionReportElimination524 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "ExecutionReportElimination524", )"; builder << R"("sbeTemplateId": )"; @@ -3453,7 +3588,29 @@ friend std::basic_ostream& operator << ( builder << ", "; builder << R"("DiscretionPrice": )"; - builder << writer.discretionPrice(); + if (writer.discretionPriceInActingVersion()) + { + builder << writer.discretionPrice(); + } + else + { + builder << "{}"; + } + + builder << ", "; + builder << R"("ReservationPrice": )"; + if (writer.reservationPriceInActingVersion()) + { + builder << writer.reservationPrice(); + } + else + { + builder << "{}"; + } + + builder << ", "; + builder << R"("PriorityIndicator": )"; + builder << +writer.priorityIndicator(); builder << '}'; diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportModify531.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportModify531.h index 7bd340934..69e2be133 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecutionReportModify531.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportModify531.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(225); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(226); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(531); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(225); + return static_cast(226); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = ExecutionReportModify531(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + ExecutionReportModify531 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - ExecutionReportModify531 &putExecID(const std::string& str) + ExecutionReportModify531 &putExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 40) @@ -874,7 +881,7 @@ public: return *this; } #else - ExecutionReportModify531 &putSenderID(const std::string& str) + ExecutionReportModify531 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1080,7 +1087,7 @@ public: return *this; } #else - ExecutionReportModify531 &putClOrdID(const std::string& str) + ExecutionReportModify531 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1877,7 +1884,7 @@ public: return *this; } #else - ExecutionReportModify531 &putLocation(const std::string& str) + ExecutionReportModify531 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -3589,12 +3596,93 @@ public: return m_discretionPrice; } + SBE_NODISCARD static const char *PriorityIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t priorityIndicatorId() SBE_NOEXCEPT + { + return 638; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priorityIndicatorSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool priorityIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priorityIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 225; + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t priorityIndicator() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 225, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportModify531 &priorityIndicator(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; + } + template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, ExecutionReportModify531 _writer) +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); + ExecutionReportModify531 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "ExecutionReportModify531", )"; builder << R"("sbeTemplateId": )"; @@ -3750,7 +3838,18 @@ friend std::basic_ostream& operator << ( builder << ", "; builder << R"("DiscretionPrice": )"; - builder << writer.discretionPrice(); + if (writer.discretionPriceInActingVersion()) + { + builder << writer.discretionPrice(); + } + else + { + builder << "{}"; + } + + builder << ", "; + builder << R"("PriorityIndicator": )"; + builder << +writer.priorityIndicator(); builder << '}'; diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportNew522.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportNew522.h index 9476b8390..29cf6dad9 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecutionReportNew522.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportNew522.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(217); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(226); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(522); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(217); + return static_cast(226); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = ExecutionReportNew522(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + ExecutionReportNew522 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - ExecutionReportNew522 &putExecID(const std::string& str) + ExecutionReportNew522 &putExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 40) @@ -874,7 +881,7 @@ public: return *this; } #else - ExecutionReportNew522 &putSenderID(const std::string& str) + ExecutionReportNew522 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1080,7 +1087,7 @@ public: return *this; } #else - ExecutionReportNew522 &putClOrdID(const std::string& str) + ExecutionReportNew522 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1877,7 +1884,7 @@ public: return *this; } #else - ExecutionReportNew522 &putLocation(const std::string& str) + ExecutionReportNew522 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -3447,12 +3454,140 @@ public: return m_discretionPrice; } + SBE_NODISCARD static const char *ReservationPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t reservationPriceId() SBE_NOEXCEPT + { + return 9562; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservationPriceSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool reservationPriceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reservationPriceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservationPriceEncodingOffset() SBE_NOEXCEPT + { + return 217; + } + +private: + PRICENULL9 m_reservationPrice; + +public: + SBE_NODISCARD PRICENULL9 &reservationPrice() + { + m_reservationPrice.wrap(m_buffer, m_offset + 217, m_actingVersion, m_bufferLength); + return m_reservationPrice; + } + + SBE_NODISCARD static const char *PriorityIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t priorityIndicatorId() SBE_NOEXCEPT + { + return 638; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priorityIndicatorSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool priorityIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priorityIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 225; + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t priorityIndicator() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 225, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportNew522 &priorityIndicator(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; + } + template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, ExecutionReportNew522 _writer) +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); + ExecutionReportNew522 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "ExecutionReportNew522", )"; builder << R"("sbeTemplateId": )"; @@ -3600,7 +3735,29 @@ friend std::basic_ostream& operator << ( builder << ", "; builder << R"("DiscretionPrice": )"; - builder << writer.discretionPrice(); + if (writer.discretionPriceInActingVersion()) + { + builder << writer.discretionPrice(); + } + else + { + builder << "{}"; + } + + builder << ", "; + builder << R"("ReservationPrice": )"; + if (writer.reservationPriceInActingVersion()) + { + builder << writer.reservationPrice(); + } + else + { + builder << "{}"; + } + + builder << ", "; + builder << R"("PriorityIndicator": )"; + builder << +writer.priorityIndicator(); builder << '}'; diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportPendingCancel564.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportPendingCancel564.h index 020f5c19b..d750eacdb 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecutionReportPendingCancel564.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportPendingCancel564.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(194); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(219); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(564); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(194); + return static_cast(219); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = ExecutionReportPendingCancel564(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + ExecutionReportPendingCancel564 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - ExecutionReportPendingCancel564 &putExecID(const std::string& str) + ExecutionReportPendingCancel564 &putExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 40) @@ -874,7 +881,7 @@ public: return *this; } #else - ExecutionReportPendingCancel564 &putSenderID(const std::string& str) + ExecutionReportPendingCancel564 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1080,7 +1087,7 @@ public: return *this; } #else - ExecutionReportPendingCancel564 &putClOrdID(const std::string& str) + ExecutionReportPendingCancel564 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1688,7 +1695,7 @@ public: return *this; } #else - ExecutionReportPendingCancel564 &putLocation(const std::string& str) + ExecutionReportPendingCancel564 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -3022,12 +3029,602 @@ public: return m_discretionPrice; } + SBE_NODISCARD static const char *ReservationPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t reservationPriceId() SBE_NOEXCEPT + { + return 9562; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservationPriceSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool reservationPriceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reservationPriceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservationPriceEncodingOffset() SBE_NOEXCEPT + { + return 194; + } + +private: + PRICENULL9 m_reservationPrice; + +public: + SBE_NODISCARD PRICENULL9 &reservationPrice() + { + m_reservationPrice.wrap(m_buffer, m_offset + 194, m_actingVersion, m_bufferLength); + return m_reservationPrice; + } + + SBE_NODISCARD static const char *PriorityIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t priorityIndicatorId() SBE_NOEXCEPT + { + return 638; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priorityIndicatorSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool priorityIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priorityIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 202; + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t priorityIndicator() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 202, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportPendingCancel564 &priorityIndicator(const std::uint8_t 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 *OrigOrderUserMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t origOrderUserId() SBE_NOEXCEPT + { + return 9937; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origOrderUserSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool origOrderUserInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origOrderUserSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origOrderUserEncodingOffset() SBE_NOEXCEPT + { + return 203; + } + + static SBE_CONSTEXPR char origOrderUserNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char origOrderUserMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char origOrderUserMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t origOrderUserEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t origOrderUserLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD const char *origOrderUser() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 203; + } + + SBE_NODISCARD char *origOrderUser() SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 203; + } + + SBE_NODISCARD char origOrderUser(const std::uint64_t index) const + { + if (index >= 8) + { + throw std::runtime_error("index out of range for origOrderUser [E104]"); + } + + if (m_actingVersion < 8) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 203 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportPendingCancel564 &origOrderUser(const std::uint64_t index, const char value) + { + if (index >= 8) + { + throw std::runtime_error("index out of range for origOrderUser [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 203 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrigOrderUser(char *const dst, const std::uint64_t length) const + { + if (length > 8) + { + throw std::runtime_error("length too large for getOrigOrderUser [E106]"); + } + + if (m_actingVersion < 8) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 203, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportPendingCancel564 &putOrigOrderUser(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 203, src, sizeof(char) * 8); + return *this; + } + + SBE_NODISCARD std::string getOrigOrderUserAsString() const + { + const char *buffer = m_buffer + m_offset + 203; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrigOrderUserAsJsonEscapedString() + { + if (m_actingVersion < 8) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getOrigOrderUserAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getOrigOrderUserAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 203; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportPendingCancel564 &putOrigOrderUser(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putOrigOrderUser [E106]"); + } + + std::memcpy(m_buffer + m_offset + 203, str.data(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 203 + start] = 0; + } + + return *this; + } + #else + ExecutionReportPendingCancel564 &putOrigOrderUser(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putOrigOrderUser [E106]"); + } + + std::memcpy(m_buffer + m_offset + 203, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 203 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *CancelTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cancelTextId() SBE_NOEXCEPT + { + return 2807; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cancelTextSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool cancelTextInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cancelTextSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cancelTextEncodingOffset() SBE_NOEXCEPT + { + return 211; + } + + static SBE_CONSTEXPR char cancelTextNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char cancelTextMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char cancelTextMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t cancelTextEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t cancelTextLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD const char *cancelText() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 211; + } + + SBE_NODISCARD char *cancelText() SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 211; + } + + SBE_NODISCARD char cancelText(const std::uint64_t index) const + { + if (index >= 8) + { + throw std::runtime_error("index out of range for cancelText [E104]"); + } + + if (m_actingVersion < 8) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 211 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportPendingCancel564 &cancelText(const std::uint64_t index, const char value) + { + if (index >= 8) + { + throw std::runtime_error("index out of range for cancelText [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 211 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getCancelText(char *const dst, const std::uint64_t length) const + { + if (length > 8) + { + throw std::runtime_error("length too large for getCancelText [E106]"); + } + + if (m_actingVersion < 8) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 211, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportPendingCancel564 &putCancelText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 211, src, sizeof(char) * 8); + return *this; + } + + SBE_NODISCARD std::string getCancelTextAsString() const + { + const char *buffer = m_buffer + m_offset + 211; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getCancelTextAsJsonEscapedString() + { + if (m_actingVersion < 8) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getCancelTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCancelTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 211; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportPendingCancel564 &putCancelText(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putCancelText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 211, str.data(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 211 + start] = 0; + } + + return *this; + } + #else + ExecutionReportPendingCancel564 &putCancelText(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putCancelText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 211, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 211 + start] = 0; + } + + return *this; + } + #endif + template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, ExecutionReportPendingCancel564 _writer) +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, ExecutionReportPendingCancel564 _writer) { - ExecutionReportPendingCancel564 writer(_writer.m_buffer, _writer.m_offset, - _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + ExecutionReportPendingCancel564 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "ExecutionReportPendingCancel564", )"; builder << R"("sbeTemplateId": )"; @@ -3149,6 +3746,31 @@ friend std::basic_ostream& operator << ( builder << R"("DiscretionPrice": )"; builder << writer.discretionPrice(); + builder << ", "; + builder << R"("ReservationPrice": )"; + if (writer.reservationPriceInActingVersion()) + { + builder << writer.reservationPrice(); + } + else + { + builder << "{}"; + } + + builder << ", "; + builder << R"("PriorityIndicator": )"; + builder << +writer.priorityIndicator(); + + builder << ", "; + builder << R"("OrigOrderUser": )"; + builder << '"' << + writer.getOrigOrderUserAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("CancelText": )"; + builder << '"' << + writer.getCancelTextAsJsonEscapedString().c_str() << '"'; + builder << '}'; return builder; diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportPendingReplace565.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportPendingReplace565.h index b8918335f..40cb541f7 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecutionReportPendingReplace565.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportPendingReplace565.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(195); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(196); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(565); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(195); + return static_cast(196); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = ExecutionReportPendingReplace565(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + ExecutionReportPendingReplace565 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - ExecutionReportPendingReplace565 &putExecID(const std::string& str) + ExecutionReportPendingReplace565 &putExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 40) @@ -874,7 +881,7 @@ public: return *this; } #else - ExecutionReportPendingReplace565 &putSenderID(const std::string& str) + ExecutionReportPendingReplace565 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1080,7 +1087,7 @@ public: return *this; } #else - ExecutionReportPendingReplace565 &putClOrdID(const std::string& str) + ExecutionReportPendingReplace565 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1688,7 +1695,7 @@ public: return *this; } #else - ExecutionReportPendingReplace565 &putLocation(const std::string& str) + ExecutionReportPendingReplace565 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -3085,12 +3092,93 @@ public: return m_discretionPrice; } + SBE_NODISCARD static const char *PriorityIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t priorityIndicatorId() SBE_NOEXCEPT + { + return 638; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priorityIndicatorSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool priorityIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priorityIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 195; + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t priorityIndicator() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 195, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportPendingReplace565 &priorityIndicator(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; + } + template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, ExecutionReportPendingReplace565 _writer) +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, ExecutionReportPendingReplace565 _writer) { - ExecutionReportPendingReplace565 writer(_writer.m_buffer, _writer.m_offset, - _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + ExecutionReportPendingReplace565 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "ExecutionReportPendingReplace565", )"; builder << R"("sbeTemplateId": )"; @@ -3216,6 +3304,10 @@ friend std::basic_ostream& operator << ( builder << R"("DiscretionPrice": )"; builder << writer.discretionPrice(); + builder << ", "; + builder << R"("PriorityIndicator": )"; + builder << +writer.priorityIndicator(); + builder << '}'; return builder; diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportReject523.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportReject523.h index d21c65dcb..8c5393eda 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecutionReportReject523.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportReject523.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(475); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(483); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(523); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(475); + return static_cast(483); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = ExecutionReportReject523(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + ExecutionReportReject523 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - ExecutionReportReject523 &putText(const std::string& str) + ExecutionReportReject523 &putText(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 256) @@ -874,7 +881,7 @@ public: return *this; } #else - ExecutionReportReject523 &putExecID(const std::string& str) + ExecutionReportReject523 &putExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 40) @@ -1080,7 +1087,7 @@ public: return *this; } #else - ExecutionReportReject523 &putSenderID(const std::string& str) + ExecutionReportReject523 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1286,7 +1293,7 @@ public: return *this; } #else - ExecutionReportReject523 &putClOrdID(const std::string& str) + ExecutionReportReject523 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -2083,7 +2090,7 @@ public: return *this; } #else - ExecutionReportReject523 &putLocation(const std::string& str) + ExecutionReportReject523 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -3724,12 +3731,64 @@ public: return m_discretionPrice; } + SBE_NODISCARD static const char *ReservationPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t reservationPriceId() SBE_NOEXCEPT + { + return 9562; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservationPriceSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool reservationPriceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reservationPriceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservationPriceEncodingOffset() SBE_NOEXCEPT + { + return 475; + } + +private: + PRICENULL9 m_reservationPrice; + +public: + SBE_NODISCARD PRICENULL9 &reservationPrice() + { + m_reservationPrice.wrap(m_buffer, m_offset + 475, m_actingVersion, m_bufferLength); + return m_reservationPrice; + } + template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, ExecutionReportReject523 _writer) +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); + ExecutionReportReject523 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "ExecutionReportReject523", )"; builder << R"("sbeTemplateId": )"; @@ -3886,7 +3945,25 @@ friend std::basic_ostream& operator << ( builder << ", "; builder << R"("DiscretionPrice": )"; - builder << writer.discretionPrice(); + if (writer.discretionPriceInActingVersion()) + { + builder << writer.discretionPrice(); + } + else + { + builder << "{}"; + } + + builder << ", "; + builder << R"("ReservationPrice": )"; + if (writer.reservationPriceInActingVersion()) + { + builder << writer.reservationPrice(); + } + else + { + builder << "{}"; + } builder << '}'; diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportStatus532.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportStatus532.h index 11db28b21..20c2a4399 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecutionReportStatus532.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportStatus532.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(488); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(513); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(532); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(488); + return static_cast(513); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = ExecutionReportStatus532(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + ExecutionReportStatus532 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - ExecutionReportStatus532 &putText(const std::string& str) + ExecutionReportStatus532 &putText(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 256) @@ -874,7 +881,7 @@ public: return *this; } #else - ExecutionReportStatus532 &putExecID(const std::string& str) + ExecutionReportStatus532 &putExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 40) @@ -1080,7 +1087,7 @@ public: return *this; } #else - ExecutionReportStatus532 &putSenderID(const std::string& str) + ExecutionReportStatus532 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1286,7 +1293,7 @@ public: return *this; } #else - ExecutionReportStatus532 &putClOrdID(const std::string& str) + ExecutionReportStatus532 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -2225,7 +2232,7 @@ public: return *this; } #else - ExecutionReportStatus532 &putLocation(const std::string& str) + ExecutionReportStatus532 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -3728,12 +3735,602 @@ public: return m_discretionPrice; } + SBE_NODISCARD static const char *ReservationPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t reservationPriceId() SBE_NOEXCEPT + { + return 9562; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservationPriceSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool reservationPriceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reservationPriceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservationPriceEncodingOffset() SBE_NOEXCEPT + { + return 488; + } + +private: + PRICENULL9 m_reservationPrice; + +public: + SBE_NODISCARD PRICENULL9 &reservationPrice() + { + m_reservationPrice.wrap(m_buffer, m_offset + 488, m_actingVersion, m_bufferLength); + return m_reservationPrice; + } + + SBE_NODISCARD static const char *PriorityIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t priorityIndicatorId() SBE_NOEXCEPT + { + return 638; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priorityIndicatorSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool priorityIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priorityIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 496; + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t priorityIndicator() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 496, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportStatus532 &priorityIndicator(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 496, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *OrigOrderUserMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t origOrderUserId() SBE_NOEXCEPT + { + return 9937; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origOrderUserSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool origOrderUserInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origOrderUserSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origOrderUserEncodingOffset() SBE_NOEXCEPT + { + return 497; + } + + static SBE_CONSTEXPR char origOrderUserNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char origOrderUserMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char origOrderUserMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t origOrderUserEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t origOrderUserLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD const char *origOrderUser() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 497; + } + + SBE_NODISCARD char *origOrderUser() SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 497; + } + + SBE_NODISCARD char origOrderUser(const std::uint64_t index) const + { + if (index >= 8) + { + throw std::runtime_error("index out of range for origOrderUser [E104]"); + } + + if (m_actingVersion < 8) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 497 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportStatus532 &origOrderUser(const std::uint64_t index, const char value) + { + if (index >= 8) + { + throw std::runtime_error("index out of range for origOrderUser [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 497 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrigOrderUser(char *const dst, const std::uint64_t length) const + { + if (length > 8) + { + throw std::runtime_error("length too large for getOrigOrderUser [E106]"); + } + + if (m_actingVersion < 8) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 497, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportStatus532 &putOrigOrderUser(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 497, src, sizeof(char) * 8); + return *this; + } + + SBE_NODISCARD std::string getOrigOrderUserAsString() const + { + const char *buffer = m_buffer + m_offset + 497; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrigOrderUserAsJsonEscapedString() + { + if (m_actingVersion < 8) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getOrigOrderUserAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getOrigOrderUserAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 497; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportStatus532 &putOrigOrderUser(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putOrigOrderUser [E106]"); + } + + std::memcpy(m_buffer + m_offset + 497, str.data(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 497 + start] = 0; + } + + return *this; + } + #else + ExecutionReportStatus532 &putOrigOrderUser(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putOrigOrderUser [E106]"); + } + + std::memcpy(m_buffer + m_offset + 497, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 497 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *CancelTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cancelTextId() SBE_NOEXCEPT + { + return 2807; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cancelTextSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool cancelTextInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cancelTextSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cancelTextEncodingOffset() SBE_NOEXCEPT + { + return 505; + } + + static SBE_CONSTEXPR char cancelTextNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char cancelTextMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char cancelTextMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t cancelTextEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t cancelTextLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD const char *cancelText() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 505; + } + + SBE_NODISCARD char *cancelText() SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 505; + } + + SBE_NODISCARD char cancelText(const std::uint64_t index) const + { + if (index >= 8) + { + throw std::runtime_error("index out of range for cancelText [E104]"); + } + + if (m_actingVersion < 8) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 505 + (index * 1), sizeof(char)); + return (val); + } + + ExecutionReportStatus532 &cancelText(const std::uint64_t index, const char value) + { + if (index >= 8) + { + throw std::runtime_error("index out of range for cancelText [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 505 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getCancelText(char *const dst, const std::uint64_t length) const + { + if (length > 8) + { + throw std::runtime_error("length too large for getCancelText [E106]"); + } + + if (m_actingVersion < 8) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 505, sizeof(char) * static_cast(length)); + return length; + } + + ExecutionReportStatus532 &putCancelText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 505, src, sizeof(char) * 8); + return *this; + } + + SBE_NODISCARD std::string getCancelTextAsString() const + { + const char *buffer = m_buffer + m_offset + 505; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getCancelTextAsJsonEscapedString() + { + if (m_actingVersion < 8) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getCancelTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCancelTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 505; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + ExecutionReportStatus532 &putCancelText(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putCancelText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 505, str.data(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 505 + start] = 0; + } + + return *this; + } + #else + ExecutionReportStatus532 &putCancelText(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putCancelText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 505, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 505 + start] = 0; + } + + return *this; + } + #endif + template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, ExecutionReportStatus532 _writer) +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); + ExecutionReportStatus532 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "ExecutionReportStatus532", )"; builder << R"("sbeTemplateId": )"; @@ -3898,7 +4495,39 @@ friend std::basic_ostream& operator << ( builder << ", "; builder << R"("DiscretionPrice": )"; - builder << writer.discretionPrice(); + if (writer.discretionPriceInActingVersion()) + { + builder << writer.discretionPrice(); + } + else + { + builder << "{}"; + } + + builder << ", "; + builder << R"("ReservationPrice": )"; + if (writer.reservationPriceInActingVersion()) + { + builder << writer.reservationPrice(); + } + else + { + builder << "{}"; + } + + builder << ", "; + builder << R"("PriorityIndicator": )"; + builder << +writer.priorityIndicator(); + + builder << ", "; + builder << R"("OrigOrderUser": )"; + builder << '"' << + writer.getOrigOrderUserAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("CancelText": )"; + builder << '"' << + writer.getCancelTextAsJsonEscapedString().c_str() << '"'; builder << '}'; diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumOutright548.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumOutright548.h index 778e84a85..1070778b1 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumOutright548.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumOutright548.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(222); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(548); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = ExecutionReportTradeAddendumOutright548(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + ExecutionReportTradeAddendumOutright548 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - ExecutionReportTradeAddendumOutright548 &putExecID(const std::string& str) + ExecutionReportTradeAddendumOutright548 &putExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 40) @@ -874,7 +881,7 @@ public: return *this; } #else - ExecutionReportTradeAddendumOutright548 &putSenderID(const std::string& str) + ExecutionReportTradeAddendumOutright548 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1080,7 +1087,7 @@ public: return *this; } #else - ExecutionReportTradeAddendumOutright548 &putClOrdID(const std::string& str) + ExecutionReportTradeAddendumOutright548 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1759,7 +1766,7 @@ public: return *this; } #else - ExecutionReportTradeAddendumOutright548 &putLocation(const std::string& str) + ExecutionReportTradeAddendumOutright548 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -3366,7 +3373,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -3374,8 +3381,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -3384,17 +3390,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -3714,7 +3709,7 @@ public: return *this; } #else - NoFills &putFillExecID(const std::string& str) + NoFills &putFillExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 2) @@ -3804,8 +3799,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoFills writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoFills writer) { builder << '{'; builder << R"("FillPx": )"; @@ -4017,7 +4012,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -4025,8 +4020,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -4035,17 +4029,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -4282,7 +4265,7 @@ public: return *this; } #else - NoOrderEvents &putOrderEventText(const std::string& str) + NoOrderEvents &putOrderEventText(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -4747,8 +4730,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoOrderEvents writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoOrderEvents writer) { builder << '{'; builder << R"("OrderEventPx": )"; @@ -4781,11 +4764,25 @@ public: builder << ", "; builder << R"("ContraGrossTradeAmt": )"; - builder << writer.contraGrossTradeAmt(); + if (writer.contraGrossTradeAmtInActingVersion()) + { + builder << writer.contraGrossTradeAmt(); + } + else + { + builder << "{}"; + } builder << ", "; builder << R"("ContraCalculatedCcyLastQty": )"; - builder << writer.contraCalculatedCcyLastQty(); + if (writer.contraCalculatedCcyLastQtyInActingVersion()) + { + builder << writer.contraCalculatedCcyLastQty(); + } + else + { + builder << "{}"; + } builder << '}'; @@ -4855,11 +4852,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, ExecutionReportTradeAddendumOutright548 _writer) +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); + ExecutionReportTradeAddendumOutright548 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "ExecutionReportTradeAddendumOutright548", )"; builder << R"("sbeTemplateId": )"; @@ -4983,7 +4985,14 @@ friend std::basic_ostream& operator << ( builder << ", "; builder << R"("DiscretionPrice": )"; - builder << writer.discretionPrice(); + if (writer.discretionPriceInActingVersion()) + { + builder << writer.discretionPrice(); + } + else + { + builder << "{}"; + } builder << ", "; builder << R"("TrdType": )"; @@ -5003,29 +5012,51 @@ friend std::basic_ostream& operator << ( builder << ", "; builder << R"("CalculatedCcyLastQty": )"; - builder << writer.calculatedCcyLastQty(); + if (writer.calculatedCcyLastQtyInActingVersion()) + { + builder << writer.calculatedCcyLastQty(); + } + else + { + builder << "{}"; + } builder << ", "; builder << R"("GrossTradeAmt": )"; - builder << writer.grossTradeAmt(); + if (writer.grossTradeAmtInActingVersion()) + { + builder << writer.grossTradeAmt(); + } + else + { + builder << "{}"; + } builder << ", "; builder << R"("BenchmarkPrice": )"; - builder << writer.benchmarkPrice(); + if (writer.benchmarkPriceInActingVersion()) + { + builder << writer.benchmarkPrice(); + } + else + { + builder << "{}"; + } builder << ", "; { bool atLeastOne = false; builder << R"("NoFills": [)"; - writer.noFills().forEach([&](NoFills& noFills) - { - if (atLeastOne) + writer.noFills().forEach( + [&](NoFills &noFills) { - builder << ", "; - } - atLeastOne = true; - builder << noFills; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); builder << ']'; } @@ -5033,15 +5064,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoOrderEvents": [)"; - writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) - { - if (atLeastOne) + writer.noOrderEvents().forEach( + [&](NoOrderEvents &noOrderEvents) { - builder << ", "; - } - atLeastOne = true; - builder << noOrderEvents; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); builder << ']'; } @@ -5052,14 +5084,16 @@ friend std::basic_ostream& operator << ( void skip() { - noFills().forEach([](NoFills e) + auto &noFillsGroup { noFills() }; + while (noFillsGroup.hasNext()) { - e.skip(); - }); - noOrderEvents().forEach([](NoOrderEvents e) + noFillsGroup.next().skip(); + } + auto &noOrderEventsGroup { noOrderEvents() }; + while (noOrderEventsGroup.hasNext()) { - e.skip(); - }); + noOrderEventsGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumSpread549.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumSpread549.h index ef923c73e..821583834 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumSpread549.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumSpread549.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(187); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(549); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = ExecutionReportTradeAddendumSpread549(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + ExecutionReportTradeAddendumSpread549 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - ExecutionReportTradeAddendumSpread549 &putExecID(const std::string& str) + ExecutionReportTradeAddendumSpread549 &putExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 40) @@ -874,7 +881,7 @@ public: return *this; } #else - ExecutionReportTradeAddendumSpread549 &putSenderID(const std::string& str) + ExecutionReportTradeAddendumSpread549 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1080,7 +1087,7 @@ public: return *this; } #else - ExecutionReportTradeAddendumSpread549 &putClOrdID(const std::string& str) + ExecutionReportTradeAddendumSpread549 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1759,7 +1766,7 @@ public: return *this; } #else - ExecutionReportTradeAddendumSpread549 &putLocation(const std::string& str) + ExecutionReportTradeAddendumSpread549 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -3082,7 +3089,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -3090,8 +3097,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -3100,17 +3106,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -3430,7 +3425,7 @@ public: return *this; } #else - NoFills &putFillExecID(const std::string& str) + NoFills &putFillExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 2) @@ -3520,8 +3515,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoFills writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoFills writer) { builder << '{'; builder << R"("FillPx": )"; @@ -3733,7 +3728,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -3741,8 +3736,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -3751,17 +3745,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *LegExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -4300,8 +4283,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoLegs writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoLegs writer) { builder << '{'; builder << R"("LegExecID": )"; @@ -4528,7 +4511,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -4536,8 +4519,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -4546,17 +4528,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -4793,7 +4764,7 @@ public: return *this; } #else - NoOrderEvents &putOrderEventText(const std::string& str) + NoOrderEvents &putOrderEventText(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -5164,8 +5135,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoOrderEvents writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoOrderEvents writer) { builder << '{'; builder << R"("OrderEventPx": )"; @@ -5264,11 +5235,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, ExecutionReportTradeAddendumSpread549 _writer) +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); + ExecutionReportTradeAddendumSpread549 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "ExecutionReportTradeAddendumSpread549", )"; builder << R"("sbeTemplateId": )"; @@ -5406,15 +5382,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoFills": [)"; - writer.noFills().forEach([&](NoFills& noFills) - { - if (atLeastOne) + writer.noFills().forEach( + [&](NoFills &noFills) { - builder << ", "; - } - atLeastOne = true; - builder << noFills; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); builder << ']'; } @@ -5422,15 +5399,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoLegs": [)"; - writer.noLegs().forEach([&](NoLegs& noLegs) - { - if (atLeastOne) + writer.noLegs().forEach( + [&](NoLegs &noLegs) { - builder << ", "; - } - atLeastOne = true; - builder << noLegs; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noLegs; + }); builder << ']'; } @@ -5438,15 +5416,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoOrderEvents": [)"; - writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) - { - if (atLeastOne) + writer.noOrderEvents().forEach( + [&](NoOrderEvents &noOrderEvents) { - builder << ", "; - } - atLeastOne = true; - builder << noOrderEvents; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); builder << ']'; } @@ -5457,18 +5436,21 @@ friend std::basic_ostream& operator << ( void skip() { - noFills().forEach([](NoFills e) + auto &noFillsGroup { noFills() }; + while (noFillsGroup.hasNext()) { - e.skip(); - }); - noLegs().forEach([](NoLegs e) + noFillsGroup.next().skip(); + } + auto &noLegsGroup { noLegs() }; + while (noLegsGroup.hasNext()) { - e.skip(); - }); - noOrderEvents().forEach([](NoOrderEvents e) + noLegsGroup.next().skip(); + } + auto &noOrderEventsGroup { noOrderEvents() }; + while (noOrderEventsGroup.hasNext()) { - e.skip(); - }); + noOrderEventsGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumSpreadLeg550.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumSpreadLeg550.h index bf2c8f8e2..d5917c7f7 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumSpreadLeg550.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeAddendumSpreadLeg550.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(196); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(550); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = ExecutionReportTradeAddendumSpreadLeg550(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + ExecutionReportTradeAddendumSpreadLeg550 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - ExecutionReportTradeAddendumSpreadLeg550 &putExecID(const std::string& str) + ExecutionReportTradeAddendumSpreadLeg550 &putExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 40) @@ -874,7 +881,7 @@ public: return *this; } #else - ExecutionReportTradeAddendumSpreadLeg550 &putSenderID(const std::string& str) + ExecutionReportTradeAddendumSpreadLeg550 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1080,7 +1087,7 @@ public: return *this; } #else - ExecutionReportTradeAddendumSpreadLeg550 &putClOrdID(const std::string& str) + ExecutionReportTradeAddendumSpreadLeg550 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1759,7 +1766,7 @@ public: return *this; } #else - ExecutionReportTradeAddendumSpreadLeg550 &putLocation(const std::string& str) + ExecutionReportTradeAddendumSpreadLeg550 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -2753,7 +2760,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -2761,8 +2768,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -2771,17 +2777,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -3101,7 +3096,7 @@ public: return *this; } #else - NoFills &putFillExecID(const std::string& str) + NoFills &putFillExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 2) @@ -3191,8 +3186,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoFills writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoFills writer) { builder << '{'; builder << R"("FillPx": )"; @@ -3404,7 +3399,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -3412,8 +3407,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -3422,17 +3416,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -3669,7 +3652,7 @@ public: return *this; } #else - NoOrderEvents &putOrderEventText(const std::string& str) + NoOrderEvents &putOrderEventText(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -4040,8 +4023,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoOrderEvents writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoOrderEvents writer) { builder << '{'; builder << R"("OrderEventPx": )"; @@ -4140,11 +4123,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, ExecutionReportTradeAddendumSpreadLeg550 _writer) +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); + ExecutionReportTradeAddendumSpreadLeg550 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "ExecutionReportTradeAddendumSpreadLeg550", )"; builder << R"("sbeTemplateId": )"; @@ -4252,25 +4240,40 @@ friend std::basic_ostream& operator << ( builder << ", "; builder << R"("CalculatedCcyLastQty": )"; - builder << writer.calculatedCcyLastQty(); + if (writer.calculatedCcyLastQtyInActingVersion()) + { + builder << writer.calculatedCcyLastQty(); + } + else + { + builder << "{}"; + } builder << ", "; builder << R"("GrossTradeAmt": )"; - builder << writer.grossTradeAmt(); + if (writer.grossTradeAmtInActingVersion()) + { + builder << writer.grossTradeAmt(); + } + else + { + builder << "{}"; + } builder << ", "; { bool atLeastOne = false; builder << R"("NoFills": [)"; - writer.noFills().forEach([&](NoFills& noFills) - { - if (atLeastOne) + writer.noFills().forEach( + [&](NoFills &noFills) { - builder << ", "; - } - atLeastOne = true; - builder << noFills; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); builder << ']'; } @@ -4278,15 +4281,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoOrderEvents": [)"; - writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) - { - if (atLeastOne) + writer.noOrderEvents().forEach( + [&](NoOrderEvents &noOrderEvents) { - builder << ", "; - } - atLeastOne = true; - builder << noOrderEvents; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); builder << ']'; } @@ -4297,14 +4301,16 @@ friend std::basic_ostream& operator << ( void skip() { - noFills().forEach([](NoFills e) + auto &noFillsGroup { noFills() }; + while (noFillsGroup.hasNext()) { - e.skip(); - }); - noOrderEvents().forEach([](NoOrderEvents e) + noFillsGroup.next().skip(); + } + auto &noOrderEventsGroup { noOrderEvents() }; + while (noOrderEventsGroup.hasNext()) { - e.skip(); - }); + noOrderEventsGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeOutright525.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeOutright525.h index a4df4f22e..367d42400 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeOutright525.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeOutright525.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(276); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(293); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(525); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(276); + return static_cast(293); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = ExecutionReportTradeOutright525(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + ExecutionReportTradeOutright525 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - ExecutionReportTradeOutright525 &putExecID(const std::string& str) + ExecutionReportTradeOutright525 &putExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 40) @@ -874,7 +881,7 @@ public: return *this; } #else - ExecutionReportTradeOutright525 &putSenderID(const std::string& str) + ExecutionReportTradeOutright525 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1080,7 +1087,7 @@ public: return *this; } #else - ExecutionReportTradeOutright525 &putClOrdID(const std::string& str) + ExecutionReportTradeOutright525 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1995,7 +2002,7 @@ public: return *this; } #else - ExecutionReportTradeOutright525 &putLocation(const std::string& str) + ExecutionReportTradeOutright525 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -4224,6 +4231,176 @@ public: return m_benchmarkPrice; } + SBE_NODISCARD static const char *ReservationPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t reservationPriceId() SBE_NOEXCEPT + { + return 9562; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservationPriceSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool reservationPriceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reservationPriceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservationPriceEncodingOffset() SBE_NOEXCEPT + { + return 276; + } + +private: + PRICENULL9 m_reservationPrice; + +public: + SBE_NODISCARD PRICENULL9 &reservationPrice() + { + m_reservationPrice.wrap(m_buffer, m_offset + 276, m_actingVersion, m_bufferLength); + return m_reservationPrice; + } + + SBE_NODISCARD static const char *PriorityIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t priorityIndicatorId() SBE_NOEXCEPT + { + return 638; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priorityIndicatorSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool priorityIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= priorityIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 284; + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t priorityIndicatorMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t priorityIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t priorityIndicator() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 284, sizeof(std::uint8_t)); + return (val); + } + + ExecutionReportTradeOutright525 &priorityIndicator(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 284, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *DisplayLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t displayLimitPriceId() SBE_NOEXCEPT + { + return 9264; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool displayLimitPriceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= displayLimitPriceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 285; + } + +private: + PRICENULL9 m_displayLimitPrice; + +public: + SBE_NODISCARD PRICENULL9 &displayLimitPrice() + { + m_displayLimitPrice.wrap(m_buffer, m_offset + 285, m_actingVersion, m_bufferLength); + return m_displayLimitPrice; + } + class NoFills { private: @@ -4350,7 +4527,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -4358,8 +4535,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -4368,17 +4544,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -4698,7 +4863,7 @@ public: return *this; } #else - NoFills &putFillExecID(const std::string& str) + NoFills &putFillExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 2) @@ -4788,8 +4953,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoFills writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoFills writer) { builder << '{'; builder << R"("FillPx": )"; @@ -5001,7 +5166,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -5009,8 +5174,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -5019,17 +5183,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -5266,7 +5419,7 @@ public: return *this; } #else - NoOrderEvents &putOrderEventText(const std::string& str) + NoOrderEvents &putOrderEventText(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -5655,8 +5808,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoOrderEvents writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoOrderEvents writer) { builder << '{'; builder << R"("OrderEventPx": )"; @@ -5685,11 +5838,25 @@ public: builder << ", "; builder << R"("ContraGrossTradeAmt": )"; - builder << writer.contraGrossTradeAmt(); + if (writer.contraGrossTradeAmtInActingVersion()) + { + builder << writer.contraGrossTradeAmt(); + } + else + { + builder << "{}"; + } builder << ", "; builder << R"("ContraCalculatedCcyLastQty": )"; - builder << writer.contraCalculatedCcyLastQty(); + if (writer.contraCalculatedCcyLastQtyInActingVersion()) + { + builder << writer.contraCalculatedCcyLastQty(); + } + else + { + builder << "{}"; + } builder << '}'; @@ -5759,11 +5926,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, ExecutionReportTradeOutright525 _writer) +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); + ExecutionReportTradeOutright525 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "ExecutionReportTradeOutright525", )"; builder << R"("sbeTemplateId": )"; @@ -5939,7 +6111,14 @@ friend std::basic_ostream& operator << ( builder << ", "; builder << R"("DiscretionPrice": )"; - builder << writer.discretionPrice(); + if (writer.discretionPriceInActingVersion()) + { + builder << writer.discretionPrice(); + } + else + { + builder << "{}"; + } builder << ", "; builder << R"("TrdType": )"; @@ -5959,29 +6138,77 @@ friend std::basic_ostream& operator << ( builder << ", "; builder << R"("CalculatedCcyLastQty": )"; - builder << writer.calculatedCcyLastQty(); + if (writer.calculatedCcyLastQtyInActingVersion()) + { + builder << writer.calculatedCcyLastQty(); + } + else + { + builder << "{}"; + } builder << ", "; builder << R"("GrossTradeAmt": )"; - builder << writer.grossTradeAmt(); + if (writer.grossTradeAmtInActingVersion()) + { + builder << writer.grossTradeAmt(); + } + else + { + builder << "{}"; + } builder << ", "; builder << R"("BenchmarkPrice": )"; - builder << writer.benchmarkPrice(); + if (writer.benchmarkPriceInActingVersion()) + { + builder << writer.benchmarkPrice(); + } + else + { + builder << "{}"; + } + + builder << ", "; + builder << R"("ReservationPrice": )"; + if (writer.reservationPriceInActingVersion()) + { + builder << writer.reservationPrice(); + } + else + { + builder << "{}"; + } + + builder << ", "; + builder << R"("PriorityIndicator": )"; + builder << +writer.priorityIndicator(); + + builder << ", "; + builder << R"("DisplayLimitPrice": )"; + if (writer.displayLimitPriceInActingVersion()) + { + builder << writer.displayLimitPrice(); + } + else + { + builder << "{}"; + } builder << ", "; { bool atLeastOne = false; builder << R"("NoFills": [)"; - writer.noFills().forEach([&](NoFills& noFills) - { - if (atLeastOne) + writer.noFills().forEach( + [&](NoFills &noFills) { - builder << ", "; - } - atLeastOne = true; - builder << noFills; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); builder << ']'; } @@ -5989,15 +6216,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoOrderEvents": [)"; - writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) - { - if (atLeastOne) + writer.noOrderEvents().forEach( + [&](NoOrderEvents &noOrderEvents) { - builder << ", "; - } - atLeastOne = true; - builder << noOrderEvents; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); builder << ']'; } @@ -6008,14 +6236,16 @@ friend std::basic_ostream& operator << ( void skip() { - noFills().forEach([](NoFills e) + auto &noFillsGroup { noFills() }; + while (noFillsGroup.hasNext()) { - e.skip(); - }); - noOrderEvents().forEach([](NoOrderEvents e) + noFillsGroup.next().skip(); + } + auto &noOrderEventsGroup { noOrderEvents() }; + while (noOrderEventsGroup.hasNext()) { - e.skip(); - }); + noOrderEventsGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeSpread526.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeSpread526.h index 94d969bc2..1784c260f 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeSpread526.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeSpread526.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(230); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(526); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = ExecutionReportTradeSpread526(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + ExecutionReportTradeSpread526 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - ExecutionReportTradeSpread526 &putExecID(const std::string& str) + ExecutionReportTradeSpread526 &putExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 40) @@ -874,7 +881,7 @@ public: return *this; } #else - ExecutionReportTradeSpread526 &putSenderID(const std::string& str) + ExecutionReportTradeSpread526 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1080,7 +1087,7 @@ public: return *this; } #else - ExecutionReportTradeSpread526 &putClOrdID(const std::string& str) + ExecutionReportTradeSpread526 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1995,7 +2002,7 @@ public: return *this; } #else - ExecutionReportTradeSpread526 &putLocation(const std::string& str) + ExecutionReportTradeSpread526 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -3727,7 +3734,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -3735,8 +3742,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -3745,17 +3751,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -4075,7 +4070,7 @@ public: return *this; } #else - NoFills &putFillExecID(const std::string& str) + NoFills &putFillExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 2) @@ -4165,8 +4160,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoFills writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoFills writer) { builder << '{'; builder << R"("FillPx": )"; @@ -4378,7 +4373,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -4386,8 +4381,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -4396,17 +4390,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *LegExecIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -4803,8 +4786,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoLegs writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoLegs writer) { builder << '{'; builder << R"("LegExecID": )"; @@ -5023,7 +5006,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -5031,8 +5014,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -5041,17 +5023,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -5288,7 +5259,7 @@ public: return *this; } #else - NoOrderEvents &putOrderEventText(const std::string& str) + NoOrderEvents &putOrderEventText(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -5583,8 +5554,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoOrderEvents writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoOrderEvents writer) { builder << '{'; builder << R"("OrderEventPx": )"; @@ -5679,11 +5650,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, ExecutionReportTradeSpread526 _writer) +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); + ExecutionReportTradeSpread526 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "ExecutionReportTradeSpread526", )"; builder << R"("sbeTemplateId": )"; @@ -5853,15 +5829,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoFills": [)"; - writer.noFills().forEach([&](NoFills& noFills) - { - if (atLeastOne) + writer.noFills().forEach( + [&](NoFills &noFills) { - builder << ", "; - } - atLeastOne = true; - builder << noFills; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); builder << ']'; } @@ -5869,15 +5846,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoLegs": [)"; - writer.noLegs().forEach([&](NoLegs& noLegs) - { - if (atLeastOne) + writer.noLegs().forEach( + [&](NoLegs &noLegs) { - builder << ", "; - } - atLeastOne = true; - builder << noLegs; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noLegs; + }); builder << ']'; } @@ -5885,15 +5863,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoOrderEvents": [)"; - writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) - { - if (atLeastOne) + writer.noOrderEvents().forEach( + [&](NoOrderEvents &noOrderEvents) { - builder << ", "; - } - atLeastOne = true; - builder << noOrderEvents; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); builder << ']'; } @@ -5904,18 +5883,21 @@ friend std::basic_ostream& operator << ( void skip() { - noFills().forEach([](NoFills e) + auto &noFillsGroup { noFills() }; + while (noFillsGroup.hasNext()) { - e.skip(); - }); - noLegs().forEach([](NoLegs e) + noFillsGroup.next().skip(); + } + auto &noLegsGroup { noLegs() }; + while (noLegsGroup.hasNext()) { - e.skip(); - }); - noOrderEvents().forEach([](NoOrderEvents e) + noLegsGroup.next().skip(); + } + auto &noOrderEventsGroup { noOrderEvents() }; + while (noOrderEventsGroup.hasNext()) { - e.skip(); - }); + noOrderEventsGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT diff --git a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeSpreadLeg527.h b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeSpreadLeg527.h index 1c02a1da1..d7c1ede74 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeSpreadLeg527.h +++ b/src/lib/orderman/actors/ilink3/generated/ExecutionReportTradeSpreadLeg527.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(219); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(527); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = ExecutionReportTradeSpreadLeg527(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + ExecutionReportTradeSpreadLeg527 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - ExecutionReportTradeSpreadLeg527 &putExecID(const std::string& str) + ExecutionReportTradeSpreadLeg527 &putExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 40) @@ -874,7 +881,7 @@ public: return *this; } #else - ExecutionReportTradeSpreadLeg527 &putSenderID(const std::string& str) + ExecutionReportTradeSpreadLeg527 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1080,7 +1087,7 @@ public: return *this; } #else - ExecutionReportTradeSpreadLeg527 &putClOrdID(const std::string& str) + ExecutionReportTradeSpreadLeg527 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1782,7 +1789,7 @@ public: return *this; } #else - ExecutionReportTradeSpreadLeg527 &putLocation(const std::string& str) + ExecutionReportTradeSpreadLeg527 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -2969,7 +2976,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -2977,8 +2984,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -2987,17 +2993,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *FillPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -3317,7 +3312,7 @@ public: return *this; } #else - NoFills &putFillExecID(const std::string& str) + NoFills &putFillExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 2) @@ -3407,8 +3402,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoFills writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoFills writer) { builder << '{'; builder << R"("FillPx": )"; @@ -3620,7 +3615,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -3628,8 +3623,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -3638,17 +3632,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *OrderEventPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -3885,7 +3868,7 @@ public: return *this; } #else - NoOrderEvents &putOrderEventText(const std::string& str) + NoOrderEvents &putOrderEventText(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -4180,8 +4163,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoOrderEvents writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoOrderEvents writer) { builder << '{'; builder << R"("OrderEventPx": )"; @@ -4276,11 +4259,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, ExecutionReportTradeSpreadLeg527 _writer) +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); + ExecutionReportTradeSpreadLeg527 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "ExecutionReportTradeSpreadLeg527", )"; builder << R"("sbeTemplateId": )"; @@ -4400,25 +4388,40 @@ friend std::basic_ostream& operator << ( builder << ", "; builder << R"("CalculatedCcyLastQty": )"; - builder << writer.calculatedCcyLastQty(); + if (writer.calculatedCcyLastQtyInActingVersion()) + { + builder << writer.calculatedCcyLastQty(); + } + else + { + builder << "{}"; + } builder << ", "; builder << R"("GrossTradeAmt": )"; - builder << writer.grossTradeAmt(); + if (writer.grossTradeAmtInActingVersion()) + { + builder << writer.grossTradeAmt(); + } + else + { + builder << "{}"; + } builder << ", "; { bool atLeastOne = false; builder << R"("NoFills": [)"; - writer.noFills().forEach([&](NoFills& noFills) - { - if (atLeastOne) + writer.noFills().forEach( + [&](NoFills &noFills) { - builder << ", "; - } - atLeastOne = true; - builder << noFills; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noFills; + }); builder << ']'; } @@ -4426,15 +4429,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoOrderEvents": [)"; - writer.noOrderEvents().forEach([&](NoOrderEvents& noOrderEvents) - { - if (atLeastOne) + writer.noOrderEvents().forEach( + [&](NoOrderEvents &noOrderEvents) { - builder << ", "; - } - atLeastOne = true; - builder << noOrderEvents; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderEvents; + }); builder << ']'; } @@ -4445,14 +4449,16 @@ friend std::basic_ostream& operator << ( void skip() { - noFills().forEach([](NoFills e) + auto &noFillsGroup { noFills() }; + while (noFillsGroup.hasNext()) { - e.skip(); - }); - noOrderEvents().forEach([](NoOrderEvents e) + noFillsGroup.next().skip(); + } + auto &noOrderEventsGroup { noOrderEvents() }; + while (noOrderEventsGroup.hasNext()) { - e.skip(); - }); + noOrderEventsGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT diff --git a/src/lib/orderman/actors/ilink3/generated/ExpCycle.h b/src/lib/orderman/actors/ilink3/generated/ExpCycle.h index 9b4ed2940..f36b1264d 100644 --- a/src/lib/orderman/actors/ilink3/generated/ExpCycle.h +++ b/src/lib/orderman/actors/ilink3/generated/ExpCycle.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class ExpCycle @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, ExpCycle::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, ExpCycle::Value m) { return os << ExpCycle::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/FTI.h b/src/lib/orderman/actors/ilink3/generated/FTI.h index ebdb932e8..9750b78c2 100644 --- a/src/lib/orderman/actors/ilink3/generated/FTI.h +++ b/src/lib/orderman/actors/ilink3/generated/FTI.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class FTI @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, FTI::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, FTI::Value m) { return os << FTI::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/GroupSize.h b/src/lib/orderman/actors/ilink3/generated/GroupSize.h index 65c03a506..194cf92d5 100644 --- a/src/lib/orderman/actors/ilink3/generated/GroupSize.h +++ b/src/lib/orderman/actors/ilink3/generated/GroupSize.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static const char *blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT @@ -338,8 +338,8 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, GroupSize writer) +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, GroupSize writer) { builder << '{'; builder << R"("blockLength": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/KeepAliveLapsed.h b/src/lib/orderman/actors/ilink3/generated/KeepAliveLapsed.h index 56721e9b3..4d103a3e4 100644 --- a/src/lib/orderman/actors/ilink3/generated/KeepAliveLapsed.h +++ b/src/lib/orderman/actors/ilink3/generated/KeepAliveLapsed.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class KeepAliveLapsed @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, KeepAliveLapsed::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, KeepAliveLapsed::Value m) { return os << KeepAliveLapsed::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/ListUpdAct.h b/src/lib/orderman/actors/ilink3/generated/ListUpdAct.h index 3dea9d8fd..6b0db9aca 100644 --- a/src/lib/orderman/actors/ilink3/generated/ListUpdAct.h +++ b/src/lib/orderman/actors/ilink3/generated/ListUpdAct.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class ListUpdAct @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, ListUpdAct::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, ListUpdAct::Value m) { return os << ListUpdAct::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/ManualOrdInd.h b/src/lib/orderman/actors/ilink3/generated/ManualOrdInd.h index b859bfb97..08a5f3898 100644 --- a/src/lib/orderman/actors/ilink3/generated/ManualOrdInd.h +++ b/src/lib/orderman/actors/ilink3/generated/ManualOrdInd.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class ManualOrdInd @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, ManualOrdInd::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, ManualOrdInd::Value m) { return os << ManualOrdInd::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/ManualOrdIndReq.h b/src/lib/orderman/actors/ilink3/generated/ManualOrdIndReq.h index 6c8ab4930..9ee9f76a6 100644 --- a/src/lib/orderman/actors/ilink3/generated/ManualOrdIndReq.h +++ b/src/lib/orderman/actors/ilink3/generated/ManualOrdIndReq.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class ManualOrdIndReq @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, ManualOrdIndReq::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, ManualOrdIndReq::Value m) { return os << ManualOrdIndReq::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/MassActionOrdTyp.h b/src/lib/orderman/actors/ilink3/generated/MassActionOrdTyp.h index df87d4dc4..a5d854b1b 100644 --- a/src/lib/orderman/actors/ilink3/generated/MassActionOrdTyp.h +++ b/src/lib/orderman/actors/ilink3/generated/MassActionOrdTyp.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class MassActionOrdTyp @@ -96,7 +32,7 @@ public: { Limit = static_cast(50), StopLimit = static_cast(52), - NULL_VALUE = static_cast(0) + NULL_VALUE = static_cast(48) }; static MassActionOrdTyp::Value get(const char value) @@ -105,7 +41,7 @@ public: { case static_cast(50): return Limit; case static_cast(52): return StopLimit; - case static_cast(0): return NULL_VALUE; + case static_cast(48): return NULL_VALUE; } throw std::runtime_error("unknown value for enum MassActionOrdTyp [E103]"); @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, MassActionOrdTyp::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, MassActionOrdTyp::Value m) { return os << MassActionOrdTyp::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/MassActionResponse.h b/src/lib/orderman/actors/ilink3/generated/MassActionResponse.h index eca52b837..fe31f60ce 100644 --- a/src/lib/orderman/actors/ilink3/generated/MassActionResponse.h +++ b/src/lib/orderman/actors/ilink3/generated/MassActionResponse.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class MassActionResponse @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, MassActionResponse::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, MassActionResponse::Value m) { return os << MassActionResponse::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/MassActionScope.h b/src/lib/orderman/actors/ilink3/generated/MassActionScope.h index d99de58fc..f0c912359 100644 --- a/src/lib/orderman/actors/ilink3/generated/MassActionScope.h +++ b/src/lib/orderman/actors/ilink3/generated/MassActionScope.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class MassActionScope @@ -133,8 +69,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, MassActionScope::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, MassActionScope::Value m) { return os << MassActionScope::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/MassCancelTIF.h b/src/lib/orderman/actors/ilink3/generated/MassCancelTIF.h index 19df73e07..f1a641c66 100644 --- a/src/lib/orderman/actors/ilink3/generated/MassCancelTIF.h +++ b/src/lib/orderman/actors/ilink3/generated/MassCancelTIF.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class MassCancelTIF @@ -127,8 +63,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, MassCancelTIF::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, MassCancelTIF::Value m) { return os << MassCancelTIF::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/MassCxlReqTyp.h b/src/lib/orderman/actors/ilink3/generated/MassCxlReqTyp.h index b3ca9ba15..692144b0a 100644 --- a/src/lib/orderman/actors/ilink3/generated/MassCxlReqTyp.h +++ b/src/lib/orderman/actors/ilink3/generated/MassCxlReqTyp.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class MassCxlReqTyp @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, MassCxlReqTyp::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, MassCxlReqTyp::Value m) { return os << MassCxlReqTyp::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/MassQuote517.h b/src/lib/orderman/actors/ilink3/generated/MassQuote517.h index d2182a29f..fd63c882f 100644 --- a/src/lib/orderman/actors/ilink3/generated/MassQuote517.h +++ b/src/lib/orderman/actors/ilink3/generated/MassQuote517.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(92); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(123); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(517); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(92); + return static_cast(123); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = MassQuote517(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + MassQuote517 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -802,7 +809,7 @@ public: return *this; } #else - MassQuote517 &putSenderID(const std::string& str) + MassQuote517 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1079,7 +1086,7 @@ public: return *this; } #else - MassQuote517 &putLocation(const std::string& str) + MassQuote517 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -1574,6 +1581,11 @@ public: std::string getReservedAsJsonEscapedString() { + if (m_actingVersion < 5) + { + return std::string(""); + } + std::ostringstream oss; std::string s = getReservedAsString(); @@ -1636,7 +1648,7 @@ public: return *this; } #else - MassQuote517 &putReserved(const std::string& str) + MassQuote517 &putReserved(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 30) @@ -1654,6 +1666,310 @@ public: } #endif + SBE_NODISCARD static const char *Reserved1MetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t reserved1Id() SBE_NOEXCEPT + { + return 5239; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reserved1SinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool reserved1InActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reserved1SinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reserved1EncodingOffset() SBE_NOEXCEPT + { + return 92; + } + + static SBE_CONSTEXPR char reserved1NullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char reserved1MinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char reserved1MaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t reserved1EncodingLength() SBE_NOEXCEPT + { + return 30; + } + + static SBE_CONSTEXPR std::uint64_t reserved1Length() SBE_NOEXCEPT + { + return 30; + } + + SBE_NODISCARD const char *reserved1() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 92; + } + + SBE_NODISCARD char *reserved1() SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 92; + } + + SBE_NODISCARD char reserved1(const std::uint64_t index) const + { + if (index >= 30) + { + throw std::runtime_error("index out of range for reserved1 [E104]"); + } + + if (m_actingVersion < 8) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 92 + (index * 1), sizeof(char)); + return (val); + } + + MassQuote517 &reserved1(const std::uint64_t index, const char value) + { + if (index >= 30) + { + throw std::runtime_error("index out of range for reserved1 [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 92 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getReserved1(char *const dst, const std::uint64_t length) const + { + if (length > 30) + { + throw std::runtime_error("length too large for getReserved1 [E106]"); + } + + if (m_actingVersion < 8) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 92, sizeof(char) * static_cast(length)); + return length; + } + + MassQuote517 &putReserved1(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 92, src, sizeof(char) * 30); + return *this; + } + + SBE_NODISCARD std::string getReserved1AsString() const + { + const char *buffer = m_buffer + m_offset + 92; + std::size_t length = 0; + + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getReserved1AsJsonEscapedString() + { + if (m_actingVersion < 8) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getReserved1AsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getReserved1AsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 92; + std::size_t length = 0; + + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + MassQuote517 &putReserved1(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 30) + { + throw std::runtime_error("string too large for putReserved1 [E106]"); + } + + std::memcpy(m_buffer + m_offset + 92, str.data(), srcLength); + for (std::size_t start = srcLength; start < 30; ++start) + { + m_buffer[m_offset + 92 + start] = 0; + } + + return *this; + } + #else + MassQuote517 &putReserved1(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 30) + { + throw std::runtime_error("string too large for putReserved1 [E106]"); + } + + std::memcpy(m_buffer + m_offset + 92, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 30; ++start) + { + m_buffer[m_offset + 92 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *QuoteEntryOpenMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryOpenId() SBE_NOEXCEPT + { + return 9182; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryOpenSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool quoteEntryOpenInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteEntryOpenSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryOpenEncodingOffset() SBE_NOEXCEPT + { + return 122; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryOpenEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t quoteEntryOpenRaw() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 122, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value quoteEntryOpen() const + { + if (m_actingVersion < 8) + { + return BooleanNULL::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 122, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + MassQuote517 "eEntryOpen(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; + } + class NoQuoteEntries { private: @@ -1780,7 +2096,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -1788,8 +2104,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -1798,17 +2113,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *BidPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -2331,8 +2635,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoQuoteEntries writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoQuoteEntries writer) { builder << '{'; builder << R"("BidPx": )"; @@ -2434,11 +2738,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, MassQuote517 _writer) +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); + MassQuote517 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "MassQuote517", )"; builder << R"("sbeTemplateId": )"; @@ -2499,19 +2808,29 @@ friend std::basic_ostream& operator << ( builder << '"' << writer.getReservedAsJsonEscapedString().c_str() << '"'; + builder << ", "; + builder << R"("Reserved1": )"; + builder << '"' << + writer.getReserved1AsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteEntryOpen": )"; + builder << '"' << writer.quoteEntryOpen() << '"'; + builder << ", "; { bool atLeastOne = false; builder << R"("NoQuoteEntries": [)"; - writer.noQuoteEntries().forEach([&](NoQuoteEntries& noQuoteEntries) - { - if (atLeastOne) + writer.noQuoteEntries().forEach( + [&](NoQuoteEntries &noQuoteEntries) { - builder << ", "; - } - atLeastOne = true; - builder << noQuoteEntries; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteEntries; + }); builder << ']'; } @@ -2522,10 +2841,11 @@ friend std::basic_ostream& operator << ( void skip() { - noQuoteEntries().forEach([](NoQuoteEntries e) + auto &noQuoteEntriesGroup { noQuoteEntries() }; + while (noQuoteEntriesGroup.hasNext()) { - e.skip(); - }); + noQuoteEntriesGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT diff --git a/src/lib/orderman/actors/ilink3/generated/MassQuoteAck545.h b/src/lib/orderman/actors/ilink3/generated/MassQuoteAck545.h index 03bee9a52..9f1d810b1 100644 --- a/src/lib/orderman/actors/ilink3/generated/MassQuoteAck545.h +++ b/src/lib/orderman/actors/ilink3/generated/MassQuoteAck545.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(350); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(351); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(545); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(350); + return static_cast(351); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = MassQuoteAck545(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + MassQuoteAck545 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - MassQuoteAck545 &putText(const std::string& str) + MassQuoteAck545 &putText(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 256) @@ -874,7 +881,7 @@ public: return *this; } #else - MassQuoteAck545 &putSenderID(const std::string& str) + MassQuoteAck545 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1364,7 +1371,7 @@ public: return *this; } #else - MassQuoteAck545 &putLocation(const std::string& str) + MassQuoteAck545 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -2264,6 +2271,79 @@ public: return *this; } + SBE_NODISCARD static const char *QuoteEntryOpenMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryOpenId() SBE_NOEXCEPT + { + return 9182; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryOpenSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool quoteEntryOpenInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteEntryOpenSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryOpenEncodingOffset() SBE_NOEXCEPT + { + return 350; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryOpenEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t quoteEntryOpenRaw() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 350, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value quoteEntryOpen() const + { + if (m_actingVersion < 8) + { + return BooleanNULL::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 350, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + MassQuoteAck545 "eEntryOpen(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 350, &val, sizeof(std::uint8_t)); + return *this; + } + class NoQuoteEntries { private: @@ -2390,7 +2470,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -2398,8 +2478,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -2408,17 +2487,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *QuoteEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -2705,8 +2773,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoQuoteEntries writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoQuoteEntries writer) { builder << '{'; builder << R"("QuoteEntryID": )"; @@ -2792,11 +2860,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, MassQuoteAck545 _writer) +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); + MassQuoteAck545 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "MassQuoteAck545", )"; builder << R"("sbeTemplateId": )"; @@ -2893,19 +2966,24 @@ friend std::basic_ostream& operator << ( builder << R"("DelayToTime": )"; builder << +writer.delayToTime(); + builder << ", "; + builder << R"("QuoteEntryOpen": )"; + builder << '"' << writer.quoteEntryOpen() << '"'; + builder << ", "; { bool atLeastOne = false; builder << R"("NoQuoteEntries": [)"; - writer.noQuoteEntries().forEach([&](NoQuoteEntries& noQuoteEntries) - { - if (atLeastOne) + writer.noQuoteEntries().forEach( + [&](NoQuoteEntries &noQuoteEntries) { - builder << ", "; - } - atLeastOne = true; - builder << noQuoteEntries; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteEntries; + }); builder << ']'; } @@ -2916,10 +2994,11 @@ friend std::basic_ostream& operator << ( void skip() { - noQuoteEntries().forEach([](NoQuoteEntries e) + auto &noQuoteEntriesGroup { noQuoteEntries() }; + while (noQuoteEntriesGroup.hasNext()) { - e.skip(); - }); + noQuoteEntriesGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT diff --git a/src/lib/orderman/actors/ilink3/generated/MassStatusOrdTyp.h b/src/lib/orderman/actors/ilink3/generated/MassStatusOrdTyp.h index 98f9b359c..936dd01a0 100644 --- a/src/lib/orderman/actors/ilink3/generated/MassStatusOrdTyp.h +++ b/src/lib/orderman/actors/ilink3/generated/MassStatusOrdTyp.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class MassStatusOrdTyp @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, MassStatusOrdTyp::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, MassStatusOrdTyp::Value m) { return os << MassStatusOrdTyp::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/MassStatusReqTyp.h b/src/lib/orderman/actors/ilink3/generated/MassStatusReqTyp.h index cd041aca2..5ff457dd3 100644 --- a/src/lib/orderman/actors/ilink3/generated/MassStatusReqTyp.h +++ b/src/lib/orderman/actors/ilink3/generated/MassStatusReqTyp.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class MassStatusReqTyp @@ -96,6 +32,7 @@ public: { Instrument = static_cast(1), InstrumentGroup = static_cast(3), + AllOrders = static_cast(7), MarketSegment = static_cast(100), NULL_VALUE = static_cast(255) }; @@ -106,6 +43,7 @@ public: { case static_cast(1): return Instrument; case static_cast(3): return InstrumentGroup; + case static_cast(7): return AllOrders; case static_cast(100): return MarketSegment; case static_cast(255): return NULL_VALUE; } @@ -119,6 +57,7 @@ public: { case Instrument: return "Instrument"; case InstrumentGroup: return "InstrumentGroup"; + case AllOrders: return "AllOrders"; case MarketSegment: return "MarketSegment"; case NULL_VALUE: return "NULL_VALUE"; } @@ -127,8 +66,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, MassStatusReqTyp::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, MassStatusReqTyp::Value m) { return os << MassStatusReqTyp::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/MassStatusTIF.h b/src/lib/orderman/actors/ilink3/generated/MassStatusTIF.h index da45e4f53..6de553669 100644 --- a/src/lib/orderman/actors/ilink3/generated/MassStatusTIF.h +++ b/src/lib/orderman/actors/ilink3/generated/MassStatusTIF.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class MassStatusTIF @@ -130,8 +66,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, MassStatusTIF::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, MassStatusTIF::Value m) { return os << MassStatusTIF::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/MaturityMonthYear.h b/src/lib/orderman/actors/ilink3/generated/MaturityMonthYear.h index 97c995a75..1b5875d8d 100644 --- a/src/lib/orderman/actors/ilink3/generated/MaturityMonthYear.h +++ b/src/lib/orderman/actors/ilink3/generated/MaturityMonthYear.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static const char *yearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT @@ -478,8 +478,8 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, MaturityMonthYear writer) +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, MaturityMonthYear writer) { builder << '{'; builder << R"("year": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/MessageHeader.h b/src/lib/orderman/actors/ilink3/generated/MessageHeader.h index a0a021bba..0fa76d344 100644 --- a/src/lib/orderman/actors/ilink3/generated/MessageHeader.h +++ b/src/lib/orderman/actors/ilink3/generated/MessageHeader.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static const char *blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT @@ -478,8 +478,8 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, MessageHeader writer) +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, MessageHeader writer) { builder << '{'; builder << R"("blockLength": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/Negotiate500.h b/src/lib/orderman/actors/ilink3/generated/Negotiate500.h index 52afbd4f9..8f7e3488b 100644 --- a/src/lib/orderman/actors/ilink3/generated/Negotiate500.h +++ b/src/lib/orderman/actors/ilink3/generated/Negotiate500.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(76); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(500); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = Negotiate500(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + Negotiate500 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -776,7 +783,7 @@ public: return *this; } #else - Negotiate500 &putHMACSignature(const std::string& str) + Negotiate500 &putHMACSignature(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 32) @@ -982,7 +989,7 @@ public: return *this; } #else - Negotiate500 &putAccessKeyID(const std::string& str) + Negotiate500 &putAccessKeyID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1345,7 +1352,7 @@ public: return *this; } #else - Negotiate500 &putSession(const std::string& str) + Negotiate500 &putSession(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 3) @@ -1551,7 +1558,7 @@ public: return *this; } #else - Negotiate500 &putFirm(const std::string& str) + Negotiate500 &putFirm(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -1732,7 +1739,7 @@ public: } #endif - Negotiate500 &putCredentials(const std::string& str) + Negotiate500 &putCredentials(const std::string &str) { if (str.length() > 65534) { @@ -1753,11 +1760,16 @@ public: #endif template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, Negotiate500 _writer) +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); + Negotiate500 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "Negotiate500", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/NegotiationReject502.h b/src/lib/orderman/actors/ilink3/generated/NegotiationReject502.h index fef10a533..4415f3bfa 100644 --- a/src/lib/orderman/actors/ilink3/generated/NegotiationReject502.h +++ b/src/lib/orderman/actors/ilink3/generated/NegotiationReject502.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(68); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(502); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = NegotiationReject502(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + NegotiationReject502 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -526,7 +533,7 @@ public: return *this; } #else - NegotiationReject502 &putReason(const std::string& str) + NegotiationReject502 &putReason(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 48) @@ -884,11 +891,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NegotiationReject502 _writer) +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); + NegotiationReject502 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "NegotiationReject502", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/NegotiationResponse501.h b/src/lib/orderman/actors/ilink3/generated/NegotiationResponse501.h index 87b5a0ff4..5d78d93e3 100644 --- a/src/lib/orderman/actors/ilink3/generated/NegotiationResponse501.h +++ b/src/lib/orderman/actors/ilink3/generated/NegotiationResponse501.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(32); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(501); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = NegotiationResponse501(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + NegotiationResponse501 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -1107,7 +1114,7 @@ public: } #endif - NegotiationResponse501 &putCredentials(const std::string& str) + NegotiationResponse501 &putCredentials(const std::string &str) { if (str.length() > 65534) { @@ -1128,11 +1135,16 @@ public: #endif template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NegotiationResponse501 _writer) +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); + NegotiationResponse501 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "NegotiationResponse501", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/NewOrderCross544.h b/src/lib/orderman/actors/ilink3/generated/NewOrderCross544.h index b8fe9e2b4..26f3b9f44 100644 --- a/src/lib/orderman/actors/ilink3/generated/NewOrderCross544.h +++ b/src/lib/orderman/actors/ilink3/generated/NewOrderCross544.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(74); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(544); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = NewOrderCross544(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + NewOrderCross544 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -802,7 +809,7 @@ public: return *this; } #else - NewOrderCross544 &putSenderID(const std::string& str) + NewOrderCross544 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1572,7 +1579,7 @@ public: return *this; } #else - NewOrderCross544 &putLocation(const std::string& str) + NewOrderCross544 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -1787,7 +1794,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -1795,8 +1802,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -1805,17 +1811,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *ClOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -2005,7 +2000,7 @@ public: return *this; } #else - NoSides &putClOrdID(const std::string& str) + NoSides &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -2292,8 +2287,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoSides writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoSides writer) { builder << '{'; builder << R"("ClOrdID": )"; @@ -2384,11 +2379,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NewOrderCross544 _writer) +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); + NewOrderCross544 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "NewOrderCross544", )"; builder << R"("sbeTemplateId": )"; @@ -2440,15 +2440,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoSides": [)"; - writer.noSides().forEach([&](NoSides& noSides) - { - if (atLeastOne) + writer.noSides().forEach( + [&](NoSides &noSides) { - builder << ", "; - } - atLeastOne = true; - builder << noSides; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noSides; + }); builder << ']'; } @@ -2459,10 +2460,11 @@ friend std::basic_ostream& operator << ( void skip() { - noSides().forEach([](NoSides e) + auto &noSidesGroup { noSides() }; + while (noSidesGroup.hasNext()) { - e.skip(); - }); + noSidesGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT diff --git a/src/lib/orderman/actors/ilink3/generated/NewOrderSingle514.h b/src/lib/orderman/actors/ilink3/generated/NewOrderSingle514.h index 4b3e231c4..d59dc3055 100644 --- a/src/lib/orderman/actors/ilink3/generated/NewOrderSingle514.h +++ b/src/lib/orderman/actors/ilink3/generated/NewOrderSingle514.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(124); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(132); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(514); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(124); + return static_cast(132); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = NewOrderSingle514(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + NewOrderSingle514 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -849,7 +856,7 @@ public: return *this; } #else - NewOrderSingle514 &putSenderID(const std::string& str) + NewOrderSingle514 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1055,7 +1062,7 @@ public: return *this; } #else - NewOrderSingle514 &putClOrdID(const std::string& str) + NewOrderSingle514 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1521,7 +1528,7 @@ public: return *this; } #else - NewOrderSingle514 &putLocation(const std::string& str) + NewOrderSingle514 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -2292,12 +2299,64 @@ public: return m_discretionPrice; } + SBE_NODISCARD static const char *ReservationPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t reservationPriceId() SBE_NOEXCEPT + { + return 9562; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reservationPriceSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool reservationPriceInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= reservationPriceSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t reservationPriceEncodingOffset() SBE_NOEXCEPT + { + return 124; + } + +private: + PRICENULL9 m_reservationPrice; + +public: + SBE_NODISCARD PRICENULL9 &reservationPrice() + { + m_reservationPrice.wrap(m_buffer, m_offset + 124, m_actingVersion, m_bufferLength); + return m_reservationPrice; + } + template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NewOrderSingle514 _writer) +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); + NewOrderSingle514 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "NewOrderSingle514", )"; builder << R"("sbeTemplateId": )"; @@ -2400,7 +2459,25 @@ friend std::basic_ostream& operator << ( builder << ", "; builder << R"("DiscretionPrice": )"; - builder << writer.discretionPrice(); + if (writer.discretionPriceInActingVersion()) + { + builder << writer.discretionPrice(); + } + else + { + builder << "{}"; + } + + builder << ", "; + builder << R"("ReservationPrice": )"; + if (writer.reservationPriceInActingVersion()) + { + builder << writer.reservationPrice(); + } + else + { + builder << "{}"; + } builder << '}'; diff --git a/src/lib/orderman/actors/ilink3/generated/NotApplied513.h b/src/lib/orderman/actors/ilink3/generated/NotApplied513.h index 16c2febc0..d03b5de22 100644 --- a/src/lib/orderman/actors/ilink3/generated/NotApplied513.h +++ b/src/lib/orderman/actors/ilink3/generated/NotApplied513.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(17); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(513); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = NotApplied513(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + NotApplied513 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -615,11 +622,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NotApplied513 _writer) +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); + NotApplied513 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "NotApplied513", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/OFMOverrideReq.h b/src/lib/orderman/actors/ilink3/generated/OFMOverrideReq.h index 23c00f3d6..81db0c3aa 100644 --- a/src/lib/orderman/actors/ilink3/generated/OFMOverrideReq.h +++ b/src/lib/orderman/actors/ilink3/generated/OFMOverrideReq.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class OFMOverrideReq @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, OFMOverrideReq::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, OFMOverrideReq::Value m) { return os << OFMOverrideReq::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/OrdStatusTrd.h b/src/lib/orderman/actors/ilink3/generated/OrdStatusTrd.h index 9b33f4e87..95ae74c2b 100644 --- a/src/lib/orderman/actors/ilink3/generated/OrdStatusTrd.h +++ b/src/lib/orderman/actors/ilink3/generated/OrdStatusTrd.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class OrdStatusTrd @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, OrdStatusTrd::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, OrdStatusTrd::Value m) { return os << OrdStatusTrd::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/OrdStatusTrdCxl.h b/src/lib/orderman/actors/ilink3/generated/OrdStatusTrdCxl.h index a165ef92d..c9c2d0159 100644 --- a/src/lib/orderman/actors/ilink3/generated/OrdStatusTrdCxl.h +++ b/src/lib/orderman/actors/ilink3/generated/OrdStatusTrdCxl.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class OrdStatusTrdCxl @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, OrdStatusTrdCxl::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, OrdStatusTrdCxl::Value m) { return os << OrdStatusTrdCxl::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/OrderCancelReject535.h b/src/lib/orderman/actors/ilink3/generated/OrderCancelReject535.h index cb4a1a5d1..1f1d6411c 100644 --- a/src/lib/orderman/actors/ilink3/generated/OrderCancelReject535.h +++ b/src/lib/orderman/actors/ilink3/generated/OrderCancelReject535.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(409); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(535); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = OrderCancelReject535(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + OrderCancelReject535 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - OrderCancelReject535 &putText(const std::string& str) + OrderCancelReject535 &putText(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 256) @@ -874,7 +881,7 @@ public: return *this; } #else - OrderCancelReject535 &putExecID(const std::string& str) + OrderCancelReject535 &putExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 40) @@ -1080,7 +1087,7 @@ public: return *this; } #else - OrderCancelReject535 &putSenderID(const std::string& str) + OrderCancelReject535 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1286,7 +1293,7 @@ public: return *this; } #else - OrderCancelReject535 &putClOrdID(const std::string& str) + OrderCancelReject535 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -2097,7 +2104,7 @@ public: return *this; } #else - OrderCancelReject535 &putLocation(const std::string& str) + OrderCancelReject535 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -2586,11 +2593,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, OrderCancelReject535 _writer) +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); + OrderCancelReject535 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "OrderCancelReject535", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/OrderCancelReplaceReject536.h b/src/lib/orderman/actors/ilink3/generated/OrderCancelReplaceReject536.h index 943a98b07..0099f7157 100644 --- a/src/lib/orderman/actors/ilink3/generated/OrderCancelReplaceReject536.h +++ b/src/lib/orderman/actors/ilink3/generated/OrderCancelReplaceReject536.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(409); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(536); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = OrderCancelReplaceReject536(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + OrderCancelReplaceReject536 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - OrderCancelReplaceReject536 &putText(const std::string& str) + OrderCancelReplaceReject536 &putText(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 256) @@ -874,7 +881,7 @@ public: return *this; } #else - OrderCancelReplaceReject536 &putExecID(const std::string& str) + OrderCancelReplaceReject536 &putExecID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 40) @@ -1080,7 +1087,7 @@ public: return *this; } #else - OrderCancelReplaceReject536 &putSenderID(const std::string& str) + OrderCancelReplaceReject536 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1286,7 +1293,7 @@ public: return *this; } #else - OrderCancelReplaceReject536 &putClOrdID(const std::string& str) + OrderCancelReplaceReject536 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1847,7 +1854,7 @@ public: return *this; } #else - OrderCancelReplaceReject536 &putLocation(const std::string& str) + OrderCancelReplaceReject536 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -2586,11 +2593,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, OrderCancelReplaceReject536 _writer) +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); + OrderCancelReplaceReject536 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "OrderCancelReplaceReject536", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/OrderCancelReplaceRequest515.h b/src/lib/orderman/actors/ilink3/generated/OrderCancelReplaceRequest515.h index 67af65e25..e5b252850 100644 --- a/src/lib/orderman/actors/ilink3/generated/OrderCancelReplaceRequest515.h +++ b/src/lib/orderman/actors/ilink3/generated/OrderCancelReplaceRequest515.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(133); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(515); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = OrderCancelReplaceRequest515(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + OrderCancelReplaceRequest515 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -849,7 +856,7 @@ public: return *this; } #else - OrderCancelReplaceRequest515 &putSenderID(const std::string& str) + OrderCancelReplaceRequest515 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1055,7 +1062,7 @@ public: return *this; } #else - OrderCancelReplaceRequest515 &putClOrdID(const std::string& str) + OrderCancelReplaceRequest515 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1592,7 +1599,7 @@ public: return *this; } #else - OrderCancelReplaceRequest515 &putLocation(const std::string& str) + OrderCancelReplaceRequest515 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -2427,11 +2434,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, OrderCancelReplaceRequest515 _writer) +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); + OrderCancelReplaceRequest515 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "OrderCancelReplaceRequest515", )"; builder << R"("sbeTemplateId": )"; @@ -2542,7 +2554,14 @@ friend std::basic_ostream& operator << ( builder << ", "; builder << R"("DiscretionPrice": )"; - builder << writer.discretionPrice(); + if (writer.discretionPriceInActingVersion()) + { + builder << writer.discretionPrice(); + } + else + { + builder << "{}"; + } builder << '}'; diff --git a/src/lib/orderman/actors/ilink3/generated/OrderCancelRequest516.h b/src/lib/orderman/actors/ilink3/generated/OrderCancelRequest516.h index 04ef3f13d..9d0f356e4 100644 --- a/src/lib/orderman/actors/ilink3/generated/OrderCancelRequest516.h +++ b/src/lib/orderman/actors/ilink3/generated/OrderCancelRequest516.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(88); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(96); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(516); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(88); + return static_cast(96); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = OrderCancelRequest516(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + OrderCancelRequest516 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -802,7 +809,7 @@ public: return *this; } #else - OrderCancelRequest516 &putSenderID(const std::string& str) + OrderCancelRequest516 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1008,7 +1015,7 @@ public: return *this; } #else - OrderCancelRequest516 &putClOrdID(const std::string& str) + OrderCancelRequest516 &putClOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1356,7 +1363,7 @@ public: return *this; } #else - OrderCancelRequest516 &putLocation(const std::string& str) + OrderCancelRequest516 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -1571,12 +1578,248 @@ public: return *this; } + SBE_NODISCARD static const char *OrigOrderUserMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t origOrderUserId() SBE_NOEXCEPT + { + return 9937; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origOrderUserSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool origOrderUserInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origOrderUserSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origOrderUserEncodingOffset() SBE_NOEXCEPT + { + return 88; + } + + static SBE_CONSTEXPR char origOrderUserNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char origOrderUserMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char origOrderUserMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t origOrderUserEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t origOrderUserLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD const char *origOrderUser() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 88; + } + + SBE_NODISCARD char *origOrderUser() SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 88; + } + + SBE_NODISCARD char origOrderUser(const std::uint64_t index) const + { + if (index >= 8) + { + throw std::runtime_error("index out of range for origOrderUser [E104]"); + } + + if (m_actingVersion < 8) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 88 + (index * 1), sizeof(char)); + return (val); + } + + OrderCancelRequest516 &origOrderUser(const std::uint64_t index, const char value) + { + if (index >= 8) + { + throw std::runtime_error("index out of range for origOrderUser [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 88 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrigOrderUser(char *const dst, const std::uint64_t length) const + { + if (length > 8) + { + throw std::runtime_error("length too large for getOrigOrderUser [E106]"); + } + + if (m_actingVersion < 8) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 88, sizeof(char) * static_cast(length)); + return length; + } + + OrderCancelRequest516 &putOrigOrderUser(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 88, src, sizeof(char) * 8); + return *this; + } + + SBE_NODISCARD std::string getOrigOrderUserAsString() const + { + const char *buffer = m_buffer + m_offset + 88; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrigOrderUserAsJsonEscapedString() + { + if (m_actingVersion < 8) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getOrigOrderUserAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getOrigOrderUserAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 88; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderCancelRequest516 &putOrigOrderUser(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putOrigOrderUser [E106]"); + } + + std::memcpy(m_buffer + m_offset + 88, str.data(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 88 + start] = 0; + } + + return *this; + } + #else + OrderCancelRequest516 &putOrigOrderUser(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putOrigOrderUser [E106]"); + } + + std::memcpy(m_buffer + m_offset + 88, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 88 + start] = 0; + } + + return *this; + } + #endif + template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, OrderCancelRequest516 _writer) +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); + OrderCancelRequest516 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "OrderCancelRequest516", )"; builder << R"("sbeTemplateId": )"; @@ -1633,6 +1876,11 @@ friend std::basic_ostream& operator << ( builder << R"("LiquidityFlag": )"; builder << '"' << writer.liquidityFlag() << '"'; + builder << ", "; + builder << R"("OrigOrderUser": )"; + builder << '"' << + writer.getOrigOrderUserAsJsonEscapedString().c_str() << '"'; + builder << '}'; return builder; diff --git a/src/lib/orderman/actors/ilink3/generated/OrderEventType.h b/src/lib/orderman/actors/ilink3/generated/OrderEventType.h index 07ffe031b..acd99c1a6 100644 --- a/src/lib/orderman/actors/ilink3/generated/OrderEventType.h +++ b/src/lib/orderman/actors/ilink3/generated/OrderEventType.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class OrderEventType @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, OrderEventType::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, OrderEventType::Value m) { return os << OrderEventType::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/OrderMassActionReport562.h b/src/lib/orderman/actors/ilink3/generated/OrderMassActionReport562.h index ba89072f7..1e96482cd 100644 --- a/src/lib/orderman/actors/ilink3/generated/OrderMassActionReport562.h +++ b/src/lib/orderman/actors/ilink3/generated/OrderMassActionReport562.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(114); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(130); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(562); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(114); + return static_cast(130); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = OrderMassActionReport562(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + OrderMassActionReport562 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - OrderMassActionReport562 &putSenderID(const std::string& str) + OrderMassActionReport562 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1354,7 +1361,7 @@ public: return *this; } #else - OrderMassActionReport562 &putSecurityGroup(const std::string& str) + OrderMassActionReport562 &putSecurityGroup(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 6) @@ -1560,7 +1567,7 @@ public: return *this; } #else - OrderMassActionReport562 &putLocation(const std::string& str) + OrderMassActionReport562 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -2697,6 +2704,468 @@ public: return *this; } + SBE_NODISCARD static const char *OrigOrderUserMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t origOrderUserId() SBE_NOEXCEPT + { + return 9937; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origOrderUserSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool origOrderUserInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origOrderUserSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origOrderUserEncodingOffset() SBE_NOEXCEPT + { + return 114; + } + + static SBE_CONSTEXPR char origOrderUserNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char origOrderUserMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char origOrderUserMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t origOrderUserEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t origOrderUserLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD const char *origOrderUser() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 114; + } + + SBE_NODISCARD char *origOrderUser() SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 114; + } + + SBE_NODISCARD char origOrderUser(const std::uint64_t index) const + { + if (index >= 8) + { + throw std::runtime_error("index out of range for origOrderUser [E104]"); + } + + if (m_actingVersion < 8) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 114 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassActionReport562 &origOrderUser(const std::uint64_t index, const char value) + { + if (index >= 8) + { + throw std::runtime_error("index out of range for origOrderUser [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 114 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrigOrderUser(char *const dst, const std::uint64_t length) const + { + if (length > 8) + { + throw std::runtime_error("length too large for getOrigOrderUser [E106]"); + } + + if (m_actingVersion < 8) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 114, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassActionReport562 &putOrigOrderUser(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 114, src, sizeof(char) * 8); + return *this; + } + + SBE_NODISCARD std::string getOrigOrderUserAsString() const + { + const char *buffer = m_buffer + m_offset + 114; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrigOrderUserAsJsonEscapedString() + { + if (m_actingVersion < 8) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getOrigOrderUserAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getOrigOrderUserAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 114; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionReport562 &putOrigOrderUser(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putOrigOrderUser [E106]"); + } + + std::memcpy(m_buffer + m_offset + 114, str.data(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 114 + start] = 0; + } + + return *this; + } + #else + OrderMassActionReport562 &putOrigOrderUser(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putOrigOrderUser [E106]"); + } + + std::memcpy(m_buffer + m_offset + 114, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 114 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *CancelTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cancelTextId() SBE_NOEXCEPT + { + return 2807; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cancelTextSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool cancelTextInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cancelTextSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cancelTextEncodingOffset() SBE_NOEXCEPT + { + return 122; + } + + static SBE_CONSTEXPR char cancelTextNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char cancelTextMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char cancelTextMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t cancelTextEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t cancelTextLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD const char *cancelText() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 122; + } + + SBE_NODISCARD char *cancelText() SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 122; + } + + SBE_NODISCARD char cancelText(const std::uint64_t index) const + { + if (index >= 8) + { + throw std::runtime_error("index out of range for cancelText [E104]"); + } + + if (m_actingVersion < 8) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 122 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassActionReport562 &cancelText(const std::uint64_t index, const char value) + { + if (index >= 8) + { + throw std::runtime_error("index out of range for cancelText [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 122 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getCancelText(char *const dst, const std::uint64_t length) const + { + if (length > 8) + { + throw std::runtime_error("length too large for getCancelText [E106]"); + } + + if (m_actingVersion < 8) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 122, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassActionReport562 &putCancelText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 122, src, sizeof(char) * 8); + return *this; + } + + SBE_NODISCARD std::string getCancelTextAsString() const + { + const char *buffer = m_buffer + m_offset + 122; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getCancelTextAsJsonEscapedString() + { + if (m_actingVersion < 8) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getCancelTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCancelTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 122; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionReport562 &putCancelText(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putCancelText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 122, str.data(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 122 + start] = 0; + } + + return *this; + } + #else + OrderMassActionReport562 &putCancelText(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putCancelText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 122, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 122 + start] = 0; + } + + return *this; + } + #endif + class NoAffectedOrders { private: @@ -2823,7 +3292,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -2831,8 +3300,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -2841,17 +3309,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *OrigCIOrdIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -3041,7 +3498,7 @@ public: return *this; } #else - NoAffectedOrders &putOrigCIOrdID(const std::string& str) + NoAffectedOrders &putOrigCIOrdID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -3202,8 +3659,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoAffectedOrders writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoAffectedOrders writer) { builder << '{'; builder << R"("OrigCIOrdID": )"; @@ -3286,11 +3743,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, OrderMassActionReport562 _writer) +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, OrderMassActionReport562 _writer) { - OrderMassActionReport562 writer(_writer.m_buffer, _writer.m_offset, - _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + OrderMassActionReport562 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "OrderMassActionReport562", )"; builder << R"("sbeTemplateId": )"; @@ -3407,19 +3869,30 @@ friend std::basic_ostream& operator << ( builder << R"("DelayToTime": )"; builder << +writer.delayToTime(); + builder << ", "; + builder << R"("OrigOrderUser": )"; + builder << '"' << + writer.getOrigOrderUserAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("CancelText": )"; + builder << '"' << + writer.getCancelTextAsJsonEscapedString().c_str() << '"'; + builder << ", "; { bool atLeastOne = false; builder << R"("NoAffectedOrders": [)"; - writer.noAffectedOrders().forEach([&](NoAffectedOrders& noAffectedOrders) - { - if (atLeastOne) + writer.noAffectedOrders().forEach( + [&](NoAffectedOrders &noAffectedOrders) { - builder << ", "; - } - atLeastOne = true; - builder << noAffectedOrders; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noAffectedOrders; + }); builder << ']'; } @@ -3430,10 +3903,11 @@ friend std::basic_ostream& operator << ( void skip() { - noAffectedOrders().forEach([](NoAffectedOrders e) + auto &noAffectedOrdersGroup { noAffectedOrders() }; + while (noAffectedOrdersGroup.hasNext()) { - e.skip(); - }); + noAffectedOrdersGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT diff --git a/src/lib/orderman/actors/ilink3/generated/OrderMassActionRequest529.h b/src/lib/orderman/actors/ilink3/generated/OrderMassActionRequest529.h index 455c2a5ae..d2dd9f737 100644 --- a/src/lib/orderman/actors/ilink3/generated/OrderMassActionRequest529.h +++ b/src/lib/orderman/actors/ilink3/generated/OrderMassActionRequest529.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(71); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(79); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(529); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(71); + return static_cast(79); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = OrderMassActionRequest529(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + OrderMassActionRequest529 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -802,7 +809,7 @@ public: return *this; } #else - OrderMassActionRequest529 &putSenderID(const std::string& str) + OrderMassActionRequest529 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1204,7 +1211,7 @@ public: return *this; } #else - OrderMassActionRequest529 &putSecurityGroup(const std::string& str) + OrderMassActionRequest529 &putSecurityGroup(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 6) @@ -1410,7 +1417,7 @@ public: return *this; } #else - OrderMassActionRequest529 &putLocation(const std::string& str) + OrderMassActionRequest529 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -1948,12 +1955,248 @@ public: return *this; } + SBE_NODISCARD static const char *OrigOrderUserMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t origOrderUserId() SBE_NOEXCEPT + { + return 9937; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origOrderUserSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool origOrderUserInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origOrderUserSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origOrderUserEncodingOffset() SBE_NOEXCEPT + { + return 71; + } + + static SBE_CONSTEXPR char origOrderUserNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char origOrderUserMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char origOrderUserMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t origOrderUserEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t origOrderUserLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD const char *origOrderUser() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 71; + } + + SBE_NODISCARD char *origOrderUser() SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 71; + } + + SBE_NODISCARD char origOrderUser(const std::uint64_t index) const + { + if (index >= 8) + { + throw std::runtime_error("index out of range for origOrderUser [E104]"); + } + + if (m_actingVersion < 8) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 71 + (index * 1), sizeof(char)); + return (val); + } + + OrderMassActionRequest529 &origOrderUser(const std::uint64_t index, const char value) + { + if (index >= 8) + { + throw std::runtime_error("index out of range for origOrderUser [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 71 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrigOrderUser(char *const dst, const std::uint64_t length) const + { + if (length > 8) + { + throw std::runtime_error("length too large for getOrigOrderUser [E106]"); + } + + if (m_actingVersion < 8) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 71, sizeof(char) * static_cast(length)); + return length; + } + + OrderMassActionRequest529 &putOrigOrderUser(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 71, src, sizeof(char) * 8); + return *this; + } + + SBE_NODISCARD std::string getOrigOrderUserAsString() const + { + const char *buffer = m_buffer + m_offset + 71; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrigOrderUserAsJsonEscapedString() + { + if (m_actingVersion < 8) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getOrigOrderUserAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getOrigOrderUserAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 71; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + OrderMassActionRequest529 &putOrigOrderUser(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putOrigOrderUser [E106]"); + } + + std::memcpy(m_buffer + m_offset + 71, str.data(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 71 + start] = 0; + } + + return *this; + } + #else + OrderMassActionRequest529 &putOrigOrderUser(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putOrigOrderUser [E106]"); + } + + std::memcpy(m_buffer + m_offset + 71, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 71 + start] = 0; + } + + return *this; + } + #endif + template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, OrderMassActionRequest529 _writer) +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); + OrderMassActionRequest529 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "OrderMassActionRequest529", )"; builder << R"("sbeTemplateId": )"; @@ -2026,6 +2269,11 @@ friend std::basic_ostream& operator << ( builder << R"("LiquidityFlag": )"; builder << '"' << writer.liquidityFlag() << '"'; + builder << ", "; + builder << R"("OrigOrderUser": )"; + builder << '"' << + writer.getOrigOrderUserAsJsonEscapedString().c_str() << '"'; + builder << '}'; return builder; diff --git a/src/lib/orderman/actors/ilink3/generated/OrderMassStatusRequest530.h b/src/lib/orderman/actors/ilink3/generated/OrderMassStatusRequest530.h index 15acaea27..ce1723e39 100644 --- a/src/lib/orderman/actors/ilink3/generated/OrderMassStatusRequest530.h +++ b/src/lib/orderman/actors/ilink3/generated/OrderMassStatusRequest530.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(68); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(530); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = OrderMassStatusRequest530(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + OrderMassStatusRequest530 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -802,7 +809,7 @@ public: return *this; } #else - OrderMassStatusRequest530 &putSenderID(const std::string& str) + OrderMassStatusRequest530 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1079,7 +1086,7 @@ public: return *this; } #else - OrderMassStatusRequest530 &putSecurityGroup(const std::string& str) + OrderMassStatusRequest530 &putSecurityGroup(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 6) @@ -1285,7 +1292,7 @@ public: return *this; } #else - OrderMassStatusRequest530 &putLocation(const std::string& str) + OrderMassStatusRequest530 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -1635,11 +1642,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, OrderMassStatusRequest530 _writer) +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); + OrderMassStatusRequest530 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "OrderMassStatusRequest530", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/OrderStatus.h b/src/lib/orderman/actors/ilink3/generated/OrderStatus.h index 12219af3d..ac8cf1d6f 100644 --- a/src/lib/orderman/actors/ilink3/generated/OrderStatus.h +++ b/src/lib/orderman/actors/ilink3/generated/OrderStatus.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class OrderStatus @@ -148,8 +84,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, OrderStatus::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, OrderStatus::Value m) { return os << OrderStatus::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/OrderStatusRequest533.h b/src/lib/orderman/actors/ilink3/generated/OrderStatusRequest533.h index cfa29ac64..ce0fa4776 100644 --- a/src/lib/orderman/actors/ilink3/generated/OrderStatusRequest533.h +++ b/src/lib/orderman/actors/ilink3/generated/OrderStatusRequest533.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(62); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(533); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = OrderStatusRequest533(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + OrderStatusRequest533 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -802,7 +809,7 @@ public: return *this; } #else - OrderStatusRequest533 &putSenderID(const std::string& str) + OrderStatusRequest533 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1150,7 +1157,7 @@ public: return *this; } #else - OrderStatusRequest533 &putLocation(const std::string& str) + OrderStatusRequest533 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -1169,11 +1176,16 @@ public: #endif template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, OrderStatusRequest533 _writer) +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); + OrderStatusRequest533 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "OrderStatusRequest533", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/OrderType.h b/src/lib/orderman/actors/ilink3/generated/OrderType.h index d61b150ea..58deb73c5 100644 --- a/src/lib/orderman/actors/ilink3/generated/OrderType.h +++ b/src/lib/orderman/actors/ilink3/generated/OrderType.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class OrderType @@ -98,7 +34,7 @@ public: Limit = static_cast(50), StopLimit = static_cast(52), MarketWithLeftoverAsLimit = static_cast(75), - NULL_VALUE = static_cast(0) + NULL_VALUE = static_cast(48) }; static OrderType::Value get(const char value) @@ -109,7 +45,7 @@ public: case static_cast(50): return Limit; case static_cast(52): return StopLimit; case static_cast(75): return MarketWithLeftoverAsLimit; - case static_cast(0): return NULL_VALUE; + case static_cast(48): return NULL_VALUE; } throw std::runtime_error("unknown value for enum OrderType [E103]"); @@ -130,8 +66,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, OrderType::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, OrderType::Value m) { return os << OrderType::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/OrderTypeReq.h b/src/lib/orderman/actors/ilink3/generated/OrderTypeReq.h index d643c2c10..dfac729db 100644 --- a/src/lib/orderman/actors/ilink3/generated/OrderTypeReq.h +++ b/src/lib/orderman/actors/ilink3/generated/OrderTypeReq.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class OrderTypeReq @@ -133,8 +69,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, OrderTypeReq::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, OrderTypeReq::Value m) { return os << OrderTypeReq::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/PRICE9.h b/src/lib/orderman/actors/ilink3/generated/PRICE9.h index f88394974..8793e1ae2 100644 --- a/src/lib/orderman/actors/ilink3/generated/PRICE9.h +++ b/src/lib/orderman/actors/ilink3/generated/PRICE9.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT @@ -329,8 +329,8 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, PRICE9 writer) +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, PRICE9 writer) { builder << '{'; builder << R"("mantissa": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/PRICENULL9.h b/src/lib/orderman/actors/ilink3/generated/PRICENULL9.h index eebe9e534..c3b21389e 100644 --- a/src/lib/orderman/actors/ilink3/generated/PRICENULL9.h +++ b/src/lib/orderman/actors/ilink3/generated/PRICENULL9.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -194,7 +194,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT @@ -329,8 +329,8 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, PRICENULL9 writer) +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, PRICENULL9 writer) { builder << '{'; builder << R"("mantissa": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/PartyDetailRole.h b/src/lib/orderman/actors/ilink3/generated/PartyDetailRole.h index 518e56625..23c884181 100644 --- a/src/lib/orderman/actors/ilink3/generated/PartyDetailRole.h +++ b/src/lib/orderman/actors/ilink3/generated/PartyDetailRole.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class PartyDetailRole @@ -133,8 +69,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, PartyDetailRole::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, PartyDetailRole::Value m) { return os << PartyDetailRole::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/PartyDetailsDefinitionRequest518.h b/src/lib/orderman/actors/ilink3/generated/PartyDetailsDefinitionRequest518.h index b54388eb8..005a90491 100644 --- a/src/lib/orderman/actors/ilink3/generated/PartyDetailsDefinitionRequest518.h +++ b/src/lib/orderman/actors/ilink3/generated/PartyDetailsDefinitionRequest518.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(147); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(518); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = PartyDetailsDefinitionRequest518(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + PartyDetailsDefinitionRequest518 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -802,7 +809,7 @@ public: return *this; } #else - PartyDetailsDefinitionRequest518 &putMemo(const std::string& str) + PartyDetailsDefinitionRequest518 &putMemo(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 75) @@ -1008,7 +1015,7 @@ public: return *this; } #else - PartyDetailsDefinitionRequest518 &putAvgPxGroupID(const std::string& str) + PartyDetailsDefinitionRequest518 &putAvgPxGroupID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1868,7 +1875,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -1876,8 +1883,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -1886,17 +1892,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *PartyDetailIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -2086,7 +2081,7 @@ public: return *this; } #else - NoPartyDetails &putPartyDetailID(const std::string& str) + NoPartyDetails &putPartyDetailID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -2293,8 +2288,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoPartyDetails writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoPartyDetails writer) { builder << '{'; builder << R"("PartyDetailID": )"; @@ -2498,7 +2493,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -2506,8 +2501,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -2516,17 +2510,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *TrdRegPublicationTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -2671,8 +2654,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoTrdRegPublications writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoTrdRegPublications writer) { builder << '{'; builder << R"("TrdRegPublicationType": )"; @@ -2750,11 +2733,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, PartyDetailsDefinitionRequest518 _writer) +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); + PartyDetailsDefinitionRequest518 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "PartyDetailsDefinitionRequest518", )"; builder << R"("sbeTemplateId": )"; @@ -2830,15 +2818,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoPartyDetails": [)"; - writer.noPartyDetails().forEach([&](NoPartyDetails& noPartyDetails) - { - if (atLeastOne) + writer.noPartyDetails().forEach( + [&](NoPartyDetails &noPartyDetails) { - builder << ", "; - } - atLeastOne = true; - builder << noPartyDetails; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noPartyDetails; + }); builder << ']'; } @@ -2846,15 +2835,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoTrdRegPublications": [)"; - writer.noTrdRegPublications().forEach([&](NoTrdRegPublications& noTrdRegPublications) - { - if (atLeastOne) + writer.noTrdRegPublications().forEach( + [&](NoTrdRegPublications &noTrdRegPublications) { - builder << ", "; - } - atLeastOne = true; - builder << noTrdRegPublications; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noTrdRegPublications; + }); builder << ']'; } @@ -2865,14 +2855,16 @@ friend std::basic_ostream& operator << ( void skip() { - noPartyDetails().forEach([](NoPartyDetails e) + auto &noPartyDetailsGroup { noPartyDetails() }; + while (noPartyDetailsGroup.hasNext()) { - e.skip(); - }); - noTrdRegPublications().forEach([](NoTrdRegPublications e) + noPartyDetailsGroup.next().skip(); + } + auto &noTrdRegPublicationsGroup { noTrdRegPublications() }; + while (noTrdRegPublicationsGroup.hasNext()) { - e.skip(); - }); + noTrdRegPublicationsGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT diff --git a/src/lib/orderman/actors/ilink3/generated/PartyDetailsDefinitionRequestAck519.h b/src/lib/orderman/actors/ilink3/generated/PartyDetailsDefinitionRequestAck519.h index f00772cab..04ce72a30 100644 --- a/src/lib/orderman/actors/ilink3/generated/PartyDetailsDefinitionRequestAck519.h +++ b/src/lib/orderman/actors/ilink3/generated/PartyDetailsDefinitionRequestAck519.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(159); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(519); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = PartyDetailsDefinitionRequestAck519(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + PartyDetailsDefinitionRequestAck519 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - PartyDetailsDefinitionRequestAck519 &putMemo(const std::string& str) + PartyDetailsDefinitionRequestAck519 &putMemo(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 75) @@ -874,7 +881,7 @@ public: return *this; } #else - PartyDetailsDefinitionRequestAck519 &putAvgPxGroupID(const std::string& str) + PartyDetailsDefinitionRequestAck519 &putAvgPxGroupID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -2207,7 +2214,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -2215,8 +2222,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -2225,17 +2231,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *PartyDetailIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -2425,7 +2420,7 @@ public: return *this; } #else - NoPartyDetails &putPartyDetailID(const std::string& str) + NoPartyDetails &putPartyDetailID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -2632,8 +2627,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoPartyDetails writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoPartyDetails writer) { builder << '{'; builder << R"("PartyDetailID": )"; @@ -2837,7 +2832,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -2845,8 +2840,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -2855,17 +2849,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *TrdRegPublicationTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -3010,8 +2993,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoTrdRegPublications writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoTrdRegPublications writer) { builder << '{'; builder << R"("TrdRegPublicationType": )"; @@ -3089,11 +3072,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, PartyDetailsDefinitionRequestAck519 _writer) +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); + PartyDetailsDefinitionRequestAck519 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "PartyDetailsDefinitionRequestAck519", )"; builder << R"("sbeTemplateId": )"; @@ -3189,15 +3177,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoPartyDetails": [)"; - writer.noPartyDetails().forEach([&](NoPartyDetails& noPartyDetails) - { - if (atLeastOne) + writer.noPartyDetails().forEach( + [&](NoPartyDetails &noPartyDetails) { - builder << ", "; - } - atLeastOne = true; - builder << noPartyDetails; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noPartyDetails; + }); builder << ']'; } @@ -3205,15 +3194,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoTrdRegPublications": [)"; - writer.noTrdRegPublications().forEach([&](NoTrdRegPublications& noTrdRegPublications) - { - if (atLeastOne) + writer.noTrdRegPublications().forEach( + [&](NoTrdRegPublications &noTrdRegPublications) { - builder << ", "; - } - atLeastOne = true; - builder << noTrdRegPublications; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noTrdRegPublications; + }); builder << ']'; } @@ -3224,14 +3214,16 @@ friend std::basic_ostream& operator << ( void skip() { - noPartyDetails().forEach([](NoPartyDetails e) + auto &noPartyDetailsGroup { noPartyDetails() }; + while (noPartyDetailsGroup.hasNext()) { - e.skip(); - }); - noTrdRegPublications().forEach([](NoTrdRegPublications e) + noPartyDetailsGroup.next().skip(); + } + auto &noTrdRegPublicationsGroup { noTrdRegPublications() }; + while (noTrdRegPublicationsGroup.hasNext()) { - e.skip(); - }); + noTrdRegPublicationsGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT diff --git a/src/lib/orderman/actors/ilink3/generated/PartyDetailsListReport538.h b/src/lib/orderman/actors/ilink3/generated/PartyDetailsListReport538.h index c9435ad06..29b21aa36 100644 --- a/src/lib/orderman/actors/ilink3/generated/PartyDetailsListReport538.h +++ b/src/lib/orderman/actors/ilink3/generated/PartyDetailsListReport538.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(93); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(538); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = PartyDetailsListReport538(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + PartyDetailsListReport538 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - PartyDetailsListReport538 &putAvgPxGroupID(const std::string& str) + PartyDetailsListReport538 &putAvgPxGroupID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -2002,7 +2009,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -2010,8 +2017,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -2020,17 +2026,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *PartyDetailIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -2220,7 +2215,7 @@ public: return *this; } #else - NoPartyDetails &putPartyDetailID(const std::string& str) + NoPartyDetails &putPartyDetailID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -2427,8 +2422,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoPartyDetails writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoPartyDetails writer) { builder << '{'; builder << R"("PartyDetailID": )"; @@ -2632,7 +2627,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -2640,8 +2635,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -2650,17 +2644,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *TrdRegPublicationTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -2805,8 +2788,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoTrdRegPublications writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoTrdRegPublications writer) { builder << '{'; builder << R"("TrdRegPublicationType": )"; @@ -2884,11 +2867,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, PartyDetailsListReport538 _writer) +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); + PartyDetailsListReport538 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "PartyDetailsListReport538", )"; builder << R"("sbeTemplateId": )"; @@ -2983,15 +2971,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoPartyDetails": [)"; - writer.noPartyDetails().forEach([&](NoPartyDetails& noPartyDetails) - { - if (atLeastOne) + writer.noPartyDetails().forEach( + [&](NoPartyDetails &noPartyDetails) { - builder << ", "; - } - atLeastOne = true; - builder << noPartyDetails; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noPartyDetails; + }); builder << ']'; } @@ -2999,15 +2988,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoTrdRegPublications": [)"; - writer.noTrdRegPublications().forEach([&](NoTrdRegPublications& noTrdRegPublications) - { - if (atLeastOne) + writer.noTrdRegPublications().forEach( + [&](NoTrdRegPublications &noTrdRegPublications) { - builder << ", "; - } - atLeastOne = true; - builder << noTrdRegPublications; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noTrdRegPublications; + }); builder << ']'; } @@ -3018,14 +3008,16 @@ friend std::basic_ostream& operator << ( void skip() { - noPartyDetails().forEach([](NoPartyDetails e) + auto &noPartyDetailsGroup { noPartyDetails() }; + while (noPartyDetailsGroup.hasNext()) { - e.skip(); - }); - noTrdRegPublications().forEach([](NoTrdRegPublications e) + noPartyDetailsGroup.next().skip(); + } + auto &noTrdRegPublicationsGroup { noTrdRegPublications() }; + while (noTrdRegPublicationsGroup.hasNext()) { - e.skip(); - }); + noTrdRegPublicationsGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT diff --git a/src/lib/orderman/actors/ilink3/generated/PartyDetailsListRequest537.h b/src/lib/orderman/actors/ilink3/generated/PartyDetailsListRequest537.h index 91c9c96d7..7b27ca5c2 100644 --- a/src/lib/orderman/actors/ilink3/generated/PartyDetailsListRequest537.h +++ b/src/lib/orderman/actors/ilink3/generated/PartyDetailsListRequest537.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(20); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(537); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = PartyDetailsListRequest537(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + PartyDetailsListRequest537 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -677,7 +684,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -685,8 +692,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -695,17 +701,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *RequestingPartyIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -895,7 +890,7 @@ public: return *this; } #else - NoRequestingPartyIDs &putRequestingPartyID(const std::string& str) + NoRequestingPartyIDs &putRequestingPartyID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -1056,8 +1051,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoRequestingPartyIDs writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoRequestingPartyIDs writer) { builder << '{'; builder << R"("RequestingPartyID": )"; @@ -1279,7 +1274,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -1287,8 +1282,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -1297,17 +1291,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *PartyIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -1523,8 +1506,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoPartyIDs writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoPartyIDs writer) { builder << '{'; builder << R"("PartyID": )"; @@ -1613,11 +1596,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, PartyDetailsListRequest537 _writer) +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); + PartyDetailsListRequest537 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "PartyDetailsListRequest537", )"; builder << R"("sbeTemplateId": )"; @@ -1639,15 +1627,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoRequestingPartyIDs": [)"; - writer.noRequestingPartyIDs().forEach([&](NoRequestingPartyIDs& noRequestingPartyIDs) - { - if (atLeastOne) + writer.noRequestingPartyIDs().forEach( + [&](NoRequestingPartyIDs &noRequestingPartyIDs) { - builder << ", "; - } - atLeastOne = true; - builder << noRequestingPartyIDs; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noRequestingPartyIDs; + }); builder << ']'; } @@ -1655,15 +1644,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoPartyIDs": [)"; - writer.noPartyIDs().forEach([&](NoPartyIDs& noPartyIDs) - { - if (atLeastOne) + writer.noPartyIDs().forEach( + [&](NoPartyIDs &noPartyIDs) { - builder << ", "; - } - atLeastOne = true; - builder << noPartyIDs; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noPartyIDs; + }); builder << ']'; } @@ -1674,14 +1664,16 @@ friend std::basic_ostream& operator << ( void skip() { - noRequestingPartyIDs().forEach([](NoRequestingPartyIDs e) + auto &noRequestingPartyIDsGroup { noRequestingPartyIDs() }; + while (noRequestingPartyIDsGroup.hasNext()) { - e.skip(); - }); - noPartyIDs().forEach([](NoPartyIDs e) + noRequestingPartyIDsGroup.next().skip(); + } + auto &noPartyIDsGroup { noPartyIDs() }; + while (noPartyIDsGroup.hasNext()) { - e.skip(); - }); + noPartyIDsGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT diff --git a/src/lib/orderman/actors/ilink3/generated/QuoteAckStatus.h b/src/lib/orderman/actors/ilink3/generated/QuoteAckStatus.h index e07194619..135068561 100644 --- a/src/lib/orderman/actors/ilink3/generated/QuoteAckStatus.h +++ b/src/lib/orderman/actors/ilink3/generated/QuoteAckStatus.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class QuoteAckStatus @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, QuoteAckStatus::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, QuoteAckStatus::Value m) { return os << QuoteAckStatus::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/QuoteCancel528.h b/src/lib/orderman/actors/ilink3/generated/QuoteCancel528.h index 662813987..e7acd6559 100644 --- a/src/lib/orderman/actors/ilink3/generated/QuoteCancel528.h +++ b/src/lib/orderman/actors/ilink3/generated/QuoteCancel528.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(52); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(61); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(528); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(52); + return static_cast(61); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = QuoteCancel528(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + QuoteCancel528 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -802,7 +809,7 @@ public: return *this; } #else - QuoteCancel528 &putSenderID(const std::string& str) + QuoteCancel528 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1008,7 +1015,7 @@ public: return *this; } #else - QuoteCancel528 &putLocation(const std::string& str) + QuoteCancel528 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -1223,6 +1230,310 @@ public: return *this; } + SBE_NODISCARD static const char *OrigOrderUserMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t origOrderUserId() SBE_NOEXCEPT + { + return 9937; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origOrderUserSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool origOrderUserInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origOrderUserSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origOrderUserEncodingOffset() SBE_NOEXCEPT + { + return 52; + } + + static SBE_CONSTEXPR char origOrderUserNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char origOrderUserMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char origOrderUserMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t origOrderUserEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t origOrderUserLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD const char *origOrderUser() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char *origOrderUser() SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 52; + } + + SBE_NODISCARD char origOrderUser(const std::uint64_t index) const + { + if (index >= 8) + { + throw std::runtime_error("index out of range for origOrderUser [E104]"); + } + + if (m_actingVersion < 8) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 52 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancel528 &origOrderUser(const std::uint64_t index, const char value) + { + if (index >= 8) + { + throw std::runtime_error("index out of range for origOrderUser [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 52 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrigOrderUser(char *const dst, const std::uint64_t length) const + { + if (length > 8) + { + throw std::runtime_error("length too large for getOrigOrderUser [E106]"); + } + + if (m_actingVersion < 8) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 52, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancel528 &putOrigOrderUser(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 52, src, sizeof(char) * 8); + return *this; + } + + SBE_NODISCARD std::string getOrigOrderUserAsString() const + { + const char *buffer = m_buffer + m_offset + 52; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrigOrderUserAsJsonEscapedString() + { + if (m_actingVersion < 8) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getOrigOrderUserAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getOrigOrderUserAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 52; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancel528 &putOrigOrderUser(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putOrigOrderUser [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.data(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #else + QuoteCancel528 &putOrigOrderUser(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putOrigOrderUser [E106]"); + } + + std::memcpy(m_buffer + m_offset + 52, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 52 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *QuoteEntryOpenMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryOpenId() SBE_NOEXCEPT + { + return 9182; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryOpenSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool quoteEntryOpenInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteEntryOpenSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryOpenEncodingOffset() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryOpenEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t quoteEntryOpenRaw() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 60, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value quoteEntryOpen() const + { + if (m_actingVersion < 8) + { + return BooleanNULL::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 60, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + QuoteCancel528 "eEntryOpen(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; + } + class NoQuoteEntries { private: @@ -1349,7 +1660,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -1357,8 +1668,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -1367,17 +1677,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -1567,7 +1866,7 @@ public: return *this; } #else - NoQuoteEntries &putSecurityGroup(const std::string& str) + NoQuoteEntries &putSecurityGroup(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 6) @@ -1657,8 +1956,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoQuoteEntries writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoQuoteEntries writer) { builder << '{'; builder << R"("SecurityGroup": )"; @@ -1862,7 +2161,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -1870,8 +2169,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -1880,17 +2178,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *BidSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -2106,8 +2393,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoQuoteSets writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoQuoteSets writer) { builder << '{'; builder << R"("BidSize": )"; @@ -2189,11 +2476,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, QuoteCancel528 _writer) +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); + QuoteCancel528 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "QuoteCancel528", )"; builder << R"("sbeTemplateId": )"; @@ -2237,19 +2529,29 @@ friend std::basic_ostream& operator << ( builder << R"("LiquidityFlag": )"; builder << '"' << writer.liquidityFlag() << '"'; + builder << ", "; + builder << R"("OrigOrderUser": )"; + builder << '"' << + writer.getOrigOrderUserAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteEntryOpen": )"; + builder << '"' << writer.quoteEntryOpen() << '"'; + builder << ", "; { bool atLeastOne = false; builder << R"("NoQuoteEntries": [)"; - writer.noQuoteEntries().forEach([&](NoQuoteEntries& noQuoteEntries) - { - if (atLeastOne) + writer.noQuoteEntries().forEach( + [&](NoQuoteEntries &noQuoteEntries) { - builder << ", "; - } - atLeastOne = true; - builder << noQuoteEntries; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteEntries; + }); builder << ']'; } @@ -2257,15 +2559,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoQuoteSets": [)"; - writer.noQuoteSets().forEach([&](NoQuoteSets& noQuoteSets) - { - if (atLeastOne) + writer.noQuoteSets().forEach( + [&](NoQuoteSets &noQuoteSets) { - builder << ", "; - } - atLeastOne = true; - builder << noQuoteSets; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteSets; + }); builder << ']'; } @@ -2276,14 +2579,16 @@ friend std::basic_ostream& operator << ( void skip() { - noQuoteEntries().forEach([](NoQuoteEntries e) + auto &noQuoteEntriesGroup { noQuoteEntries() }; + while (noQuoteEntriesGroup.hasNext()) { - e.skip(); - }); - noQuoteSets().forEach([](NoQuoteSets e) + noQuoteEntriesGroup.next().skip(); + } + auto &noQuoteSetsGroup { noQuoteSets() }; + while (noQuoteSetsGroup.hasNext()) { - e.skip(); - }); + noQuoteSetsGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT diff --git a/src/lib/orderman/actors/ilink3/generated/QuoteCancelAck563.h b/src/lib/orderman/actors/ilink3/generated/QuoteCancelAck563.h index 57d8d77ce..9cb07698e 100644 --- a/src/lib/orderman/actors/ilink3/generated/QuoteCancelAck563.h +++ b/src/lib/orderman/actors/ilink3/generated/QuoteCancelAck563.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(351); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(368); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(563); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(351); + return static_cast(368); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = QuoteCancelAck563(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + QuoteCancelAck563 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - QuoteCancelAck563 &putText(const std::string& str) + QuoteCancelAck563 &putText(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 256) @@ -874,7 +881,7 @@ public: return *this; } #else - QuoteCancelAck563 &putSenderID(const std::string& str) + QuoteCancelAck563 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1293,7 +1300,7 @@ public: return *this; } #else - QuoteCancelAck563 &putCancelledSymbol(const std::string& str) + QuoteCancelAck563 &putCancelledSymbol(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 6) @@ -1499,7 +1506,7 @@ public: return *this; } #else - QuoteCancelAck563 &putLocation(const std::string& str) + QuoteCancelAck563 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -2392,6 +2399,541 @@ public: return *this; } + SBE_NODISCARD static const char *OrigOrderUserMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t origOrderUserId() SBE_NOEXCEPT + { + return 9937; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t origOrderUserSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool origOrderUserInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= origOrderUserSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t origOrderUserEncodingOffset() SBE_NOEXCEPT + { + return 351; + } + + static SBE_CONSTEXPR char origOrderUserNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char origOrderUserMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char origOrderUserMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t origOrderUserEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t origOrderUserLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD const char *origOrderUser() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 351; + } + + SBE_NODISCARD char *origOrderUser() SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 351; + } + + SBE_NODISCARD char origOrderUser(const std::uint64_t index) const + { + if (index >= 8) + { + throw std::runtime_error("index out of range for origOrderUser [E104]"); + } + + if (m_actingVersion < 8) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 351 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelAck563 &origOrderUser(const std::uint64_t index, const char value) + { + if (index >= 8) + { + throw std::runtime_error("index out of range for origOrderUser [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 351 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getOrigOrderUser(char *const dst, const std::uint64_t length) const + { + if (length > 8) + { + throw std::runtime_error("length too large for getOrigOrderUser [E106]"); + } + + if (m_actingVersion < 8) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 351, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelAck563 &putOrigOrderUser(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 351, src, sizeof(char) * 8); + return *this; + } + + SBE_NODISCARD std::string getOrigOrderUserAsString() const + { + const char *buffer = m_buffer + m_offset + 351; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getOrigOrderUserAsJsonEscapedString() + { + if (m_actingVersion < 8) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getOrigOrderUserAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getOrigOrderUserAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 351; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelAck563 &putOrigOrderUser(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putOrigOrderUser [E106]"); + } + + std::memcpy(m_buffer + m_offset + 351, str.data(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 351 + start] = 0; + } + + return *this; + } + #else + QuoteCancelAck563 &putOrigOrderUser(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putOrigOrderUser [E106]"); + } + + std::memcpy(m_buffer + m_offset + 351, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 351 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *CancelTextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t cancelTextId() SBE_NOEXCEPT + { + return 2807; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cancelTextSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool cancelTextInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= cancelTextSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cancelTextEncodingOffset() SBE_NOEXCEPT + { + return 359; + } + + static SBE_CONSTEXPR char cancelTextNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char cancelTextMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char cancelTextMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t cancelTextEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t cancelTextLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD const char *cancelText() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 359; + } + + SBE_NODISCARD char *cancelText() SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return nullptr; + } + + return m_buffer + m_offset + 359; + } + + SBE_NODISCARD char cancelText(const std::uint64_t index) const + { + if (index >= 8) + { + throw std::runtime_error("index out of range for cancelText [E104]"); + } + + if (m_actingVersion < 8) + { + return static_cast(0); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 359 + (index * 1), sizeof(char)); + return (val); + } + + QuoteCancelAck563 &cancelText(const std::uint64_t index, const char value) + { + if (index >= 8) + { + throw std::runtime_error("index out of range for cancelText [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 359 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getCancelText(char *const dst, const std::uint64_t length) const + { + if (length > 8) + { + throw std::runtime_error("length too large for getCancelText [E106]"); + } + + if (m_actingVersion < 8) + { + return 0; + } + + std::memcpy(dst, m_buffer + m_offset + 359, sizeof(char) * static_cast(length)); + return length; + } + + QuoteCancelAck563 &putCancelText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 359, src, sizeof(char) * 8); + return *this; + } + + SBE_NODISCARD std::string getCancelTextAsString() const + { + const char *buffer = m_buffer + m_offset + 359; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getCancelTextAsJsonEscapedString() + { + if (m_actingVersion < 8) + { + return std::string(""); + } + + std::ostringstream oss; + std::string s = getCancelTextAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCancelTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 359; + std::size_t length = 0; + + for (; length < 8 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + QuoteCancelAck563 &putCancelText(const std::string_view str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putCancelText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 359, str.data(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 359 + start] = 0; + } + + return *this; + } + #else + QuoteCancelAck563 &putCancelText(const std::string &str) + { + const std::size_t srcLength = str.length(); + if (srcLength > 8) + { + throw std::runtime_error("string too large for putCancelText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 359, str.c_str(), srcLength); + for (std::size_t start = srcLength; start < 8; ++start) + { + m_buffer[m_offset + 359 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *QuoteEntryOpenMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t quoteEntryOpenId() SBE_NOEXCEPT + { + return 9182; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteEntryOpenSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool quoteEntryOpenInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= quoteEntryOpenSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryOpenEncodingOffset() SBE_NOEXCEPT + { + return 367; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteEntryOpenEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t quoteEntryOpenRaw() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 367, sizeof(std::uint8_t)); + return (val); + } + + SBE_NODISCARD BooleanNULL::Value quoteEntryOpen() const + { + if (m_actingVersion < 8) + { + return BooleanNULL::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 367, sizeof(std::uint8_t)); + return BooleanNULL::get((val)); + } + + QuoteCancelAck563 "eEntryOpen(const BooleanNULL::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 367, &val, sizeof(std::uint8_t)); + return *this; + } + class NoQuoteEntries { private: @@ -2518,7 +3060,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -2526,8 +3068,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -2536,17 +3077,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *QuoteEntryIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -2762,8 +3292,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoQuoteEntries writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoQuoteEntries writer) { builder << '{'; builder << R"("QuoteEntryID": )"; @@ -2970,7 +3500,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -2978,8 +3508,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -2988,17 +3517,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *QuoteSetIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -3143,8 +3661,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoQuoteSets writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoQuoteSets writer) { builder << '{'; builder << R"("QuoteSetID": )"; @@ -3222,11 +3740,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, QuoteCancelAck563 _writer) +friend std::basic_ostream & operator << ( + std::basic_ostream &builder, QuoteCancelAck563 _writer) { - QuoteCancelAck563 writer(_writer.m_buffer, _writer.m_offset, - _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + QuoteCancelAck563 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "QuoteCancelAck563", )"; builder << R"("sbeTemplateId": )"; @@ -3331,19 +3854,34 @@ friend std::basic_ostream& operator << ( builder << R"("DelayToTime": )"; builder << +writer.delayToTime(); + builder << ", "; + builder << R"("OrigOrderUser": )"; + builder << '"' << + writer.getOrigOrderUserAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("CancelText": )"; + builder << '"' << + writer.getCancelTextAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("QuoteEntryOpen": )"; + builder << '"' << writer.quoteEntryOpen() << '"'; + builder << ", "; { bool atLeastOne = false; builder << R"("NoQuoteEntries": [)"; - writer.noQuoteEntries().forEach([&](NoQuoteEntries& noQuoteEntries) - { - if (atLeastOne) + writer.noQuoteEntries().forEach( + [&](NoQuoteEntries &noQuoteEntries) { - builder << ", "; - } - atLeastOne = true; - builder << noQuoteEntries; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteEntries; + }); builder << ']'; } @@ -3351,15 +3889,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoQuoteSets": [)"; - writer.noQuoteSets().forEach([&](NoQuoteSets& noQuoteSets) - { - if (atLeastOne) + writer.noQuoteSets().forEach( + [&](NoQuoteSets &noQuoteSets) { - builder << ", "; - } - atLeastOne = true; - builder << noQuoteSets; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noQuoteSets; + }); builder << ']'; } @@ -3370,14 +3909,16 @@ friend std::basic_ostream& operator << ( void skip() { - noQuoteEntries().forEach([](NoQuoteEntries e) + auto &noQuoteEntriesGroup { noQuoteEntries() }; + while (noQuoteEntriesGroup.hasNext()) { - e.skip(); - }); - noQuoteSets().forEach([](NoQuoteSets e) + noQuoteEntriesGroup.next().skip(); + } + auto &noQuoteSetsGroup { noQuoteSets() }; + while (noQuoteSetsGroup.hasNext()) { - e.skip(); - }); + noQuoteSetsGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT diff --git a/src/lib/orderman/actors/ilink3/generated/QuoteCxlStatus.h b/src/lib/orderman/actors/ilink3/generated/QuoteCxlStatus.h index c2331d096..4d94f1b56 100644 --- a/src/lib/orderman/actors/ilink3/generated/QuoteCxlStatus.h +++ b/src/lib/orderman/actors/ilink3/generated/QuoteCxlStatus.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class QuoteCxlStatus @@ -133,8 +69,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, QuoteCxlStatus::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, QuoteCxlStatus::Value m) { return os << QuoteCxlStatus::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/QuoteCxlTyp.h b/src/lib/orderman/actors/ilink3/generated/QuoteCxlTyp.h index 043614966..6f213e6a1 100644 --- a/src/lib/orderman/actors/ilink3/generated/QuoteCxlTyp.h +++ b/src/lib/orderman/actors/ilink3/generated/QuoteCxlTyp.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class QuoteCxlTyp @@ -130,8 +66,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, QuoteCxlTyp::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, QuoteCxlTyp::Value m) { return os << QuoteCxlTyp::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/QuoteTyp.h b/src/lib/orderman/actors/ilink3/generated/QuoteTyp.h index dd478bb15..6ddc3ff01 100644 --- a/src/lib/orderman/actors/ilink3/generated/QuoteTyp.h +++ b/src/lib/orderman/actors/ilink3/generated/QuoteTyp.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class QuoteTyp @@ -121,8 +57,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, QuoteTyp::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, QuoteTyp::Value m) { return os << QuoteTyp::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/README.txt b/src/lib/orderman/actors/ilink3/generated/README.txt index 64d3df695..f8fd737e1 100644 --- a/src/lib/orderman/actors/ilink3/generated/README.txt +++ b/src/lib/orderman/actors/ilink3/generated/README.txt @@ -1,13 +1,11 @@ -To update ilinkbinary.xml -sftp cmeconfig@sftpng.cmegroup.com -password: G3t(0nnect3d -get /MSGW/NRCert/Templates/ilinkbinary.xml - -To generate: - -Download sbe-all-[version].jar from sbe-logic github releases. - -docker run --rm -it -w /work -v $PWD:/work java java -Dsbe.output.dir=/work -Dsbe.generate.ir="false" -Dsbe.target.language=cpp -jar sbe-all-1.16.1.jar ilinkbinary.xml -#docker run --rm -it -w /work -v $PWD:/work java java -Dsbe.output.dir=/work -Dsbe.generate.ir="false" -Dsbe.target.language=uk.co.real_logic.sbe.generation.rust.Rust -jar sbe-all-1.16.1.jar ilinkbinary.xml - - +To update ilinkbinary.xml +sftp cmeconfig@sftpng.cmegroup.com +password: G3t(0nnect3d +get /MSGW/NRCert/Templates/ilinkbinary.xml + +To generate: + +Download sbe-all-[version].jar from sbe-logic github releases. + +docker run --rm -it -w /work -v $PWD:/work eclipse-temurin:17-jdk-jammy java -Dsbe.output.dir=/work -Dsbe.generate.ir="false" -Dsbe.target.language=cpp -jar sbe-all-1.27.0.jar ilinkbinary.xml + diff --git a/src/lib/orderman/actors/ilink3/generated/RFQSide.h b/src/lib/orderman/actors/ilink3/generated/RFQSide.h index 04bffac67..02e96ac82 100644 --- a/src/lib/orderman/actors/ilink3/generated/RFQSide.h +++ b/src/lib/orderman/actors/ilink3/generated/RFQSide.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class RFQSide @@ -127,8 +63,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, RFQSide::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, RFQSide::Value m) { return os << RFQSide::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/ReqResult.h b/src/lib/orderman/actors/ilink3/generated/ReqResult.h index 237b59e0f..1b4af8ced 100644 --- a/src/lib/orderman/actors/ilink3/generated/ReqResult.h +++ b/src/lib/orderman/actors/ilink3/generated/ReqResult.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class ReqResult @@ -130,8 +66,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, ReqResult::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, ReqResult::Value m) { return os << ReqResult::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/RequestForQuote543.h b/src/lib/orderman/actors/ilink3/generated/RequestForQuote543.h index 677f4a9f4..4f0f062bf 100644 --- a/src/lib/orderman/actors/ilink3/generated/RequestForQuote543.h +++ b/src/lib/orderman/actors/ilink3/generated/RequestForQuote543.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(55); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(543); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = RequestForQuote543(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + RequestForQuote543 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -802,7 +809,7 @@ public: return *this; } #else - RequestForQuote543 &putSenderID(const std::string& str) + RequestForQuote543 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1079,7 +1086,7 @@ public: return *this; } #else - RequestForQuote543 &putLocation(const std::string& str) + RequestForQuote543 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -1286,7 +1293,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -1294,8 +1301,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -1304,17 +1310,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -1522,8 +1517,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoRelatedSym writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoRelatedSym writer) { builder << '{'; builder << R"("SecurityID": )"; @@ -1605,11 +1600,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, RequestForQuote543 _writer) +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); + RequestForQuote543 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "RequestForQuote543", )"; builder << R"("sbeTemplateId": )"; @@ -1653,15 +1653,16 @@ friend std::basic_ostream& operator << ( { bool atLeastOne = false; builder << R"("NoRelatedSym": [)"; - writer.noRelatedSym().forEach([&](NoRelatedSym& noRelatedSym) - { - if (atLeastOne) + writer.noRelatedSym().forEach( + [&](NoRelatedSym &noRelatedSym) { - builder << ", "; - } - atLeastOne = true; - builder << noRelatedSym; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noRelatedSym; + }); builder << ']'; } @@ -1672,10 +1673,11 @@ friend std::basic_ostream& operator << ( void skip() { - noRelatedSym().forEach([](NoRelatedSym e) + auto &noRelatedSymGroup { noRelatedSym() }; + while (noRelatedSymGroup.hasNext()) { - e.skip(); - }); + noRelatedSymGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT diff --git a/src/lib/orderman/actors/ilink3/generated/RequestForQuoteAck546.h b/src/lib/orderman/actors/ilink3/generated/RequestForQuoteAck546.h index 7b767a4ed..0d7fa133f 100644 --- a/src/lib/orderman/actors/ilink3/generated/RequestForQuoteAck546.h +++ b/src/lib/orderman/actors/ilink3/generated/RequestForQuoteAck546.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(358); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(546); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = RequestForQuoteAck546(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + RequestForQuoteAck546 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - RequestForQuoteAck546 &putText(const std::string& str) + RequestForQuoteAck546 &putText(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 256) @@ -874,7 +881,7 @@ public: return *this; } #else - RequestForQuoteAck546 &putSenderID(const std::string& str) + RequestForQuoteAck546 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1080,7 +1087,7 @@ public: return *this; } #else - RequestForQuoteAck546 &putExchangeQuoteReqID(const std::string& str) + RequestForQuoteAck546 &putExchangeQuoteReqID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 17) @@ -1570,7 +1577,7 @@ public: return *this; } #else - RequestForQuoteAck546 &putLocation(const std::string& str) + RequestForQuoteAck546 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -2069,11 +2076,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, RequestForQuoteAck546 _writer) +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); + RequestForQuoteAck546 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "RequestForQuoteAck546", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/Retransmission509.h b/src/lib/orderman/actors/ilink3/generated/Retransmission509.h index 1fa67ba80..aca45553b 100644 --- a/src/lib/orderman/actors/ilink3/generated/Retransmission509.h +++ b/src/lib/orderman/actors/ilink3/generated/Retransmission509.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(31); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(509); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = Retransmission509(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + Retransmission509 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -757,11 +764,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, Retransmission509 _writer) +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); + Retransmission509 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "Retransmission509", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/RetransmitReject510.h b/src/lib/orderman/actors/ilink3/generated/RetransmitReject510.h index 851d16fb5..177a97d37 100644 --- a/src/lib/orderman/actors/ilink3/generated/RetransmitReject510.h +++ b/src/lib/orderman/actors/ilink3/generated/RetransmitReject510.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(75); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(510); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = RetransmitReject510(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + RetransmitReject510 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -526,7 +533,7 @@ public: return *this; } #else - RetransmitReject510 &putReason(const std::string& str) + RetransmitReject510 &putReason(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 48) @@ -892,11 +899,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, RetransmitReject510 _writer) +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); + RetransmitReject510 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "RetransmitReject510", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/RetransmitRequest508.h b/src/lib/orderman/actors/ilink3/generated/RetransmitRequest508.h index 2c82e2ad1..34b5fae83 100644 --- a/src/lib/orderman/actors/ilink3/generated/RetransmitRequest508.h +++ b/src/lib/orderman/actors/ilink3/generated/RetransmitRequest508.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(30); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(508); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = RetransmitRequest508(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + RetransmitRequest508 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -694,11 +701,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, RetransmitRequest508 _writer) +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); + RetransmitRequest508 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "RetransmitRequest508", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/SLEDS.h b/src/lib/orderman/actors/ilink3/generated/SLEDS.h index 5553e6491..750e9aefe 100644 --- a/src/lib/orderman/actors/ilink3/generated/SLEDS.h +++ b/src/lib/orderman/actors/ilink3/generated/SLEDS.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class SLEDS @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, SLEDS::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, SLEDS::Value m) { return os << SLEDS::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/SMPI.h b/src/lib/orderman/actors/ilink3/generated/SMPI.h index dd2875d39..2698520ef 100644 --- a/src/lib/orderman/actors/ilink3/generated/SMPI.h +++ b/src/lib/orderman/actors/ilink3/generated/SMPI.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class SMPI @@ -96,7 +32,7 @@ public: { CancelNewest = static_cast(78), CancelOldest = static_cast(79), - NULL_VALUE = static_cast(0) + NULL_VALUE = static_cast(0x00) }; static SMPI::Value get(const char value) @@ -105,7 +41,7 @@ public: { case static_cast(78): return CancelNewest; case static_cast(79): return CancelOldest; - case static_cast(0): return NULL_VALUE; + case static_cast(0x00): return NULL_VALUE; } throw std::runtime_error("unknown value for enum SMPI [E103]"); @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, SMPI::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, SMPI::Value m) { return os << SMPI::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/SecRspTyp.h b/src/lib/orderman/actors/ilink3/generated/SecRspTyp.h index fab0c684e..64613e601 100644 --- a/src/lib/orderman/actors/ilink3/generated/SecRspTyp.h +++ b/src/lib/orderman/actors/ilink3/generated/SecRspTyp.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class SecRspTyp @@ -127,8 +63,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, SecRspTyp::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, SecRspTyp::Value m) { return os << SecRspTyp::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/SecurityDefinitionRequest560.h b/src/lib/orderman/actors/ilink3/generated/SecurityDefinitionRequest560.h index 87f074b55..ea72679cf 100644 --- a/src/lib/orderman/actors/ilink3/generated/SecurityDefinitionRequest560.h +++ b/src/lib/orderman/actors/ilink3/generated/SecurityDefinitionRequest560.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(71); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(72); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(560); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(71); + return static_cast(72); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = SecurityDefinitionRequest560(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + SecurityDefinitionRequest560 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -802,7 +809,7 @@ public: return *this; } #else - SecurityDefinitionRequest560 &putSenderID(const std::string& str) + SecurityDefinitionRequest560 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1204,7 +1211,7 @@ public: return *this; } #else - SecurityDefinitionRequest560 &putSecuritySubType(const std::string& str) + SecurityDefinitionRequest560 &putSecuritySubType(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 8) @@ -1410,7 +1417,7 @@ public: return *this; } #else - SecurityDefinitionRequest560 &putLocation(const std::string& str) + SecurityDefinitionRequest560 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -1712,6 +1719,82 @@ public: return *this; } + SBE_NODISCARD static const char *BrokenDateTermTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t brokenDateTermTypeId() SBE_NOEXCEPT + { + return 6651; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t brokenDateTermTypeSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool brokenDateTermTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= brokenDateTermTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t brokenDateTermTypeEncodingOffset() SBE_NOEXCEPT + { + return 71; + } + + static SBE_CONSTEXPR std::uint8_t brokenDateTermTypeNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t brokenDateTermTypeMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t brokenDateTermTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t brokenDateTermTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t brokenDateTermType() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 71, sizeof(std::uint8_t)); + return (val); + } + + SecurityDefinitionRequest560 &brokenDateTermType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 71, &val, sizeof(std::uint8_t)); + return *this; + } + class NoLegs { private: @@ -1838,7 +1921,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -1846,8 +1929,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -1856,17 +1938,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *LegSecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -2293,8 +2364,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoLegs writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoLegs writer) { builder << '{'; builder << R"("LegPrice": )"; @@ -2380,15 +2451,385 @@ public: return m_actingVersion >= noLegsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop +#endif + } + + class NoBrokenDates + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength(static_cast(4)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 4; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoBrokenDates &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + template inline void forEach(Func &&func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + + SBE_NODISCARD static const char *BrokenDateStartMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t brokenDateStartId() SBE_NOEXCEPT + { + return 6748; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t brokenDateStartSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool brokenDateStartInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= brokenDateStartSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t brokenDateStartEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint16_t brokenDateStartNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } + + static SBE_CONSTEXPR std::uint16_t brokenDateStartMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint16_t brokenDateStartMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } + + static SBE_CONSTEXPR std::size_t brokenDateStartEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t brokenDateStart() 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); + } + + NoBrokenDates &brokenDateStart(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 *BrokenDateEndMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t brokenDateEndId() SBE_NOEXCEPT + { + return 6741; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t brokenDateEndSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool brokenDateEndInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= brokenDateEndSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t brokenDateEndEncodingOffset() SBE_NOEXCEPT + { + return 2; + } + + static SBE_CONSTEXPR std::uint16_t brokenDateEndNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } + + static SBE_CONSTEXPR std::uint16_t brokenDateEndMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint16_t brokenDateEndMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } + + static SBE_CONSTEXPR std::size_t brokenDateEndEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t brokenDateEnd() 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); + } + + NoBrokenDates &brokenDateEnd(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, NoBrokenDates writer) + { + builder << '{'; + builder << R"("BrokenDateStart": )"; + builder << +writer.brokenDateStart(); + + builder << ", "; + builder << R"("BrokenDateEnd": )"; + builder << +writer.brokenDateEnd(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static std::size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoBrokenDates m_noBrokenDates; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoBrokenDatesId() SBE_NOEXCEPT + { + return 39026; + } + + SBE_NODISCARD inline NoBrokenDates &noBrokenDates() + { + m_noBrokenDates.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noBrokenDates; + } + + NoBrokenDates &noBrokenDatesCount(const std::uint8_t count) + { + m_noBrokenDates.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noBrokenDates; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noBrokenDatesSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool noBrokenDatesInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noBrokenDatesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop #endif } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, SecurityDefinitionRequest560 _writer) +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); + SecurityDefinitionRequest560 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "SecurityDefinitionRequest560", )"; builder << R"("sbeTemplateId": )"; @@ -2445,19 +2886,41 @@ friend std::basic_ostream& operator << ( builder << R"("SourceRepoID": )"; builder << +writer.sourceRepoID(); + builder << ", "; + builder << R"("BrokenDateTermType": )"; + builder << +writer.brokenDateTermType(); + builder << ", "; { bool atLeastOne = false; builder << R"("NoLegs": [)"; - writer.noLegs().forEach([&](NoLegs& noLegs) - { - if (atLeastOne) + writer.noLegs().forEach( + [&](NoLegs &noLegs) { - builder << ", "; - } - atLeastOne = true; - builder << noLegs; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noLegs; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoBrokenDates": [)"; + writer.noBrokenDates().forEach( + [&](NoBrokenDates &noBrokenDates) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noBrokenDates; + }); builder << ']'; } @@ -2468,10 +2931,16 @@ friend std::basic_ostream& operator << ( void skip() { - noLegs().forEach([](NoLegs e) + auto &noLegsGroup { noLegs() }; + while (noLegsGroup.hasNext()) { - e.skip(); - }); + noLegsGroup.next().skip(); + } + auto &noBrokenDatesGroup { noBrokenDates() }; + while (noBrokenDatesGroup.hasNext()) + { + noBrokenDatesGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT @@ -2479,7 +2948,9 @@ SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT return false; } -SBE_NODISCARD static std::size_t computeLength(std::size_t noLegsLength = 0) +SBE_NODISCARD static std::size_t computeLength( + std::size_t noLegsLength = 0, + std::size_t noBrokenDatesLength = 0) { #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic push @@ -2494,6 +2965,13 @@ SBE_NODISCARD static std::size_t computeLength(std::size_t noLegsLength = 0) } length += noLegsLength *NoLegs::sbeBlockLength(); + length += NoBrokenDates::sbeHeaderSize(); + if (noBrokenDatesLength > 254LL) + { + throw std::runtime_error("noBrokenDatesLength outside of allowed range [E110]"); + } + length += noBrokenDatesLength *NoBrokenDates::sbeBlockLength(); + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop diff --git a/src/lib/orderman/actors/ilink3/generated/SecurityDefinitionResponse561.h b/src/lib/orderman/actors/ilink3/generated/SecurityDefinitionResponse561.h index 8c5beb4a5..cd1dd372c 100644 --- a/src/lib/orderman/actors/ilink3/generated/SecurityDefinitionResponse561.h +++ b/src/lib/orderman/actors/ilink3/generated/SecurityDefinitionResponse561.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -164,10 +165,10 @@ private: } public: - static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(429); + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(430); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(561); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -220,7 +222,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT { - return static_cast(429); + return static_cast(430); } SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = SecurityDefinitionResponse561(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + SecurityDefinitionResponse561 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -668,7 +675,7 @@ public: return *this; } #else - SecurityDefinitionResponse561 &putText(const std::string& str) + SecurityDefinitionResponse561 &putText(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 256) @@ -874,7 +881,7 @@ public: return *this; } #else - SecurityDefinitionResponse561 &putFinancialInstrumentFullName(const std::string& str) + SecurityDefinitionResponse561 &putFinancialInstrumentFullName(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 35) @@ -1080,7 +1087,7 @@ public: return *this; } #else - SecurityDefinitionResponse561 &putSenderID(const std::string& str) + SecurityDefinitionResponse561 &putSenderID(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1286,7 +1293,7 @@ public: return *this; } #else - SecurityDefinitionResponse561 &putSymbol(const std::string& str) + SecurityDefinitionResponse561 &putSymbol(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 20) @@ -1776,7 +1783,7 @@ public: return *this; } #else - SecurityDefinitionResponse561 &putSecurityGroup(const std::string& str) + SecurityDefinitionResponse561 &putSecurityGroup(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 6) @@ -1982,7 +1989,7 @@ public: return *this; } #else - SecurityDefinitionResponse561 &putSecurityType(const std::string& str) + SecurityDefinitionResponse561 &putSecurityType(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 6) @@ -2188,7 +2195,7 @@ public: return *this; } #else - SecurityDefinitionResponse561 &putLocation(const std::string& str) + SecurityDefinitionResponse561 &putLocation(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 5) @@ -2480,7 +2487,7 @@ public: return *this; } #else - SecurityDefinitionResponse561 &putCurrency(const std::string& str) + SecurityDefinitionResponse561 &putCurrency(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 3) @@ -3171,6 +3178,11 @@ public: std::string getTerminationTypeAsJsonEscapedString() { + if (m_actingVersion < 3) + { + return std::string(""); + } + std::ostringstream oss; std::string s = getTerminationTypeAsString(); @@ -3233,7 +3245,7 @@ public: return *this; } #else - SecurityDefinitionResponse561 &putTerminationType(const std::string& str) + SecurityDefinitionResponse561 &putTerminationType(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 8) @@ -3754,6 +3766,82 @@ public: return *this; } + SBE_NODISCARD static const char *BrokenDateTermTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t brokenDateTermTypeId() SBE_NOEXCEPT + { + return 6651; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t brokenDateTermTypeSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool brokenDateTermTypeInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= brokenDateTermTypeSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t brokenDateTermTypeEncodingOffset() SBE_NOEXCEPT + { + return 429; + } + + static SBE_CONSTEXPR std::uint8_t brokenDateTermTypeNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t brokenDateTermTypeMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t brokenDateTermTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t brokenDateTermTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t brokenDateTermType() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return static_cast(255); + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 429, sizeof(std::uint8_t)); + return (val); + } + + SecurityDefinitionResponse561 &brokenDateTermType(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 429, &val, sizeof(std::uint8_t)); + return *this; + } + class NoLegs { private: @@ -3880,7 +3968,7 @@ public: return *this; } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + inline std::uint64_t resetCountToIndex() { m_count = m_index; GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); @@ -3888,8 +3976,7 @@ public: return m_count; } - #if __cplusplus < 201103L - template inline void forEach(Func& func) + template inline void forEach(Func &&func) { while (hasNext()) { @@ -3898,17 +3985,6 @@ public: } } - #else - template inline void forEach(Func&& func) - { - while (hasNext()) - { - next(); - func(*this); - } - } - - #endif SBE_NODISCARD static const char *LegPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { @@ -4335,8 +4411,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& builder, NoLegs writer) + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoLegs writer) { builder << '{'; builder << R"("LegPrice": )"; @@ -4422,15 +4498,535 @@ public: return m_actingVersion >= noLegsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop +#endif + } + + class NoBrokenDates + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_initialPosition = 0; + std::uint64_t *m_positionPtr = nullptr; + std::uint64_t m_blockLength = 0; + std::uint64_t m_count = 0; + std::uint64_t m_index = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } + + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + m_buffer = buffer; + m_bufferLength = bufferLength; + m_blockLength = dimensions.blockLength(); + m_count = dimensions.numInGroup(); + m_index = 0; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength(static_cast(16)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 16; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoBrokenDates &next() + { + if (m_index >= m_count) + { + throw std::runtime_error("index >= count [E108]"); + } + m_offset = *m_positionPtr; + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + m_blockLength) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for next group index [E108]"); + } + *m_positionPtr = m_offset + m_blockLength; + ++m_index; + + return *this; + } + + inline std::uint64_t resetCountToIndex() + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + template inline void forEach(Func &&func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + + SBE_NODISCARD static const char *BrokenDateGUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t brokenDateGUIDId() SBE_NOEXCEPT + { + return 39031; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t brokenDateGUIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool brokenDateGUIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= brokenDateGUIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t brokenDateGUIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t brokenDateGUIDNullValue() SBE_NOEXCEPT + { + return UINT64_C(0xffffffffffffffff); + } + + static SBE_CONSTEXPR std::uint64_t brokenDateGUIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t brokenDateGUIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t brokenDateGUIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t brokenDateGUID() 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); + } + + NoBrokenDates &brokenDateGUID(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 *BrokenDateSecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t brokenDateSecurityIDId() SBE_NOEXCEPT + { + return 39027; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t brokenDateSecurityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool brokenDateSecurityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= brokenDateSecurityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t brokenDateSecurityIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int32_t brokenDateSecurityIDNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t brokenDateSecurityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t brokenDateSecurityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t brokenDateSecurityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t brokenDateSecurityID() 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); + } + + NoBrokenDates &brokenDateSecurityID(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 *BrokenDateStartMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t brokenDateStartId() SBE_NOEXCEPT + { + return 6748; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t brokenDateStartSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool brokenDateStartInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= brokenDateStartSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t brokenDateStartEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR std::uint16_t brokenDateStartNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } + + static SBE_CONSTEXPR std::uint16_t brokenDateStartMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint16_t brokenDateStartMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } + + static SBE_CONSTEXPR std::size_t brokenDateStartEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t brokenDateStart() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoBrokenDates &brokenDateStart(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char *BrokenDateEndMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "LocalMktDate"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t brokenDateEndId() SBE_NOEXCEPT + { + return 6741; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t brokenDateEndSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool brokenDateEndInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= brokenDateEndSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t brokenDateEndEncodingOffset() SBE_NOEXCEPT + { + return 14; + } + + static SBE_CONSTEXPR std::uint16_t brokenDateEndNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } + + static SBE_CONSTEXPR std::uint16_t brokenDateEndMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint16_t brokenDateEndMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } + + static SBE_CONSTEXPR std::size_t brokenDateEndEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t brokenDateEnd() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoBrokenDates &brokenDateEnd(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint16_t)); + return *this; + } + + template + friend std::basic_ostream & operator << ( + std::basic_ostream &builder, NoBrokenDates writer) + { + builder << '{'; + builder << R"("BrokenDateGUID": )"; + builder << +writer.brokenDateGUID(); + + builder << ", "; + builder << R"("BrokenDateSecurityID": )"; + builder << +writer.brokenDateSecurityID(); + + builder << ", "; + builder << R"("BrokenDateStart": )"; + builder << +writer.brokenDateStart(); + + builder << ", "; + builder << R"("BrokenDateEnd": )"; + builder << +writer.brokenDateEnd(); + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static std::size_t computeLength() + { +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; + +private: + NoBrokenDates m_noBrokenDates; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoBrokenDatesId() SBE_NOEXCEPT + { + return 39026; + } + + SBE_NODISCARD inline NoBrokenDates &noBrokenDates() + { + m_noBrokenDates.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noBrokenDates; + } + + NoBrokenDates &noBrokenDatesCount(const std::uint8_t count) + { + m_noBrokenDates.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noBrokenDates; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noBrokenDatesSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool noBrokenDatesInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noBrokenDatesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop #endif } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, SecurityDefinitionResponse561 _writer) +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); + SecurityDefinitionResponse561 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "SecurityDefinitionResponse561", )"; builder << R"("sbeTemplateId": )"; @@ -4557,19 +5153,41 @@ friend std::basic_ostream& operator << ( builder << R"("PossRetransFlag": )"; builder << '"' << writer.possRetransFlag() << '"'; + builder << ", "; + builder << R"("BrokenDateTermType": )"; + builder << +writer.brokenDateTermType(); + builder << ", "; { bool atLeastOne = false; builder << R"("NoLegs": [)"; - writer.noLegs().forEach([&](NoLegs& noLegs) - { - if (atLeastOne) + writer.noLegs().forEach( + [&](NoLegs &noLegs) { - builder << ", "; - } - atLeastOne = true; - builder << noLegs; - }); + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noLegs; + }); + builder << ']'; + } + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoBrokenDates": [)"; + writer.noBrokenDates().forEach( + [&](NoBrokenDates &noBrokenDates) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noBrokenDates; + }); builder << ']'; } @@ -4580,10 +5198,16 @@ friend std::basic_ostream& operator << ( void skip() { - noLegs().forEach([](NoLegs e) + auto &noLegsGroup { noLegs() }; + while (noLegsGroup.hasNext()) { - e.skip(); - }); + noLegsGroup.next().skip(); + } + auto &noBrokenDatesGroup { noBrokenDates() }; + while (noBrokenDatesGroup.hasNext()) + { + noBrokenDatesGroup.next().skip(); + } } SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT @@ -4591,7 +5215,9 @@ SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT return false; } -SBE_NODISCARD static std::size_t computeLength(std::size_t noLegsLength = 0) +SBE_NODISCARD static std::size_t computeLength( + std::size_t noLegsLength = 0, + std::size_t noBrokenDatesLength = 0) { #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic push @@ -4606,6 +5232,13 @@ SBE_NODISCARD static std::size_t computeLength(std::size_t noLegsLength = 0) } length += noLegsLength *NoLegs::sbeBlockLength(); + length += NoBrokenDates::sbeHeaderSize(); + if (noBrokenDatesLength > 254LL) + { + throw std::runtime_error("noBrokenDatesLength outside of allowed range [E110]"); + } + length += noBrokenDatesLength *NoBrokenDates::sbeBlockLength(); + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop diff --git a/src/lib/orderman/actors/ilink3/generated/Sequence506.h b/src/lib/orderman/actors/ilink3/generated/Sequence506.h index 8b1078e6c..3efcd7219 100644 --- a/src/lib/orderman/actors/ilink3/generated/Sequence506.h +++ b/src/lib/orderman/actors/ilink3/generated/Sequence506.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(14); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(506); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = Sequence506(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + Sequence506 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -607,11 +614,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, Sequence506 _writer) +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); + Sequence506 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "Sequence506", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/ShortSaleType.h b/src/lib/orderman/actors/ilink3/generated/ShortSaleType.h index 1f1c0c543..5ec0be304 100644 --- a/src/lib/orderman/actors/ilink3/generated/ShortSaleType.h +++ b/src/lib/orderman/actors/ilink3/generated/ShortSaleType.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class ShortSaleType @@ -130,8 +66,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, ShortSaleType::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, ShortSaleType::Value m) { return os << ShortSaleType::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/SideNULL.h b/src/lib/orderman/actors/ilink3/generated/SideNULL.h index 71dc4b3e2..f887796af 100644 --- a/src/lib/orderman/actors/ilink3/generated/SideNULL.h +++ b/src/lib/orderman/actors/ilink3/generated/SideNULL.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class SideNULL @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, SideNULL::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, SideNULL::Value m) { return os << SideNULL::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/SideReq.h b/src/lib/orderman/actors/ilink3/generated/SideReq.h index 6bf4e4a80..bdd437d18 100644 --- a/src/lib/orderman/actors/ilink3/generated/SideReq.h +++ b/src/lib/orderman/actors/ilink3/generated/SideReq.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class SideReq @@ -127,8 +63,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, SideReq::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, SideReq::Value m) { return os << SideReq::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/SideTimeInForce.h b/src/lib/orderman/actors/ilink3/generated/SideTimeInForce.h index 28bf22930..2922ea397 100644 --- a/src/lib/orderman/actors/ilink3/generated/SideTimeInForce.h +++ b/src/lib/orderman/actors/ilink3/generated/SideTimeInForce.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class SideTimeInForce @@ -124,8 +60,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, SideTimeInForce::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, SideTimeInForce::Value m) { return os << SideTimeInForce::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/SplitMsg.h b/src/lib/orderman/actors/ilink3/generated/SplitMsg.h index e071df893..6e561354c 100644 --- a/src/lib/orderman/actors/ilink3/generated/SplitMsg.h +++ b/src/lib/orderman/actors/ilink3/generated/SplitMsg.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class SplitMsg @@ -127,8 +63,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, SplitMsg::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, SplitMsg::Value m) { return os << SplitMsg::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/Terminate507.h b/src/lib/orderman/actors/ilink3/generated/Terminate507.h index 2a8b630b6..a2ea3b2ff 100644 --- a/src/lib/orderman/actors/ilink3/generated/Terminate507.h +++ b/src/lib/orderman/actors/ilink3/generated/Terminate507.h @@ -70,11 +70,11 @@ #endif #if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (false) #elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (exp) #else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) +# define SBE_BOUNDS_CHECK_EXPECT(exp, c) (__builtin_expect(exp, c)) #endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() @@ -156,6 +156,7 @@ private: std::uint64_t m_bufferLength = 0; std::uint64_t m_offset = 0; std::uint64_t m_position = 0; + std::uint64_t m_actingBlockLength = 0; std::uint64_t m_actingVersion = 0; inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT @@ -167,7 +168,7 @@ public: static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(67); static const std::uint16_t SBE_TEMPLATE_ID = static_cast(507); static const std::uint16_t SBE_SCHEMA_ID = static_cast(8); - static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(7); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(8); enum MetaAttribute { @@ -200,6 +201,7 @@ public: m_bufferLength(bufferLength), m_offset(offset), m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingBlockLength(actingBlockLength), m_actingVersion(actingVersion) { } @@ -240,7 +242,7 @@ public: SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT { - return static_cast(7); + return static_cast(8); } SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT @@ -286,6 +288,11 @@ public: return *this = Terminate507(buffer, offset, bufferLength, actingBlockLength, actingVersion); } + Terminate507 &sbeRewind() + { + return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength); + } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { return m_position; @@ -526,7 +533,7 @@ public: return *this; } #else - Terminate507 &putReason(const std::string& str) + Terminate507 &putReason(const std::string &str) { const std::size_t srcLength = str.length(); if (srcLength > 48) @@ -821,11 +828,16 @@ public: } template -friend std::basic_ostream& operator << ( - std::basic_ostream& builder, Terminate507 _writer) +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); + Terminate507 writer( + _writer.m_buffer, + _writer.m_offset, + _writer.m_bufferLength, + _writer.m_actingBlockLength, + _writer.m_actingVersion); + builder << '{'; builder << R"("Name": "Terminate507", )"; builder << R"("sbeTemplateId": )"; diff --git a/src/lib/orderman/actors/ilink3/generated/TimeInForce.h b/src/lib/orderman/actors/ilink3/generated/TimeInForce.h index 252c569ba..355580348 100644 --- a/src/lib/orderman/actors/ilink3/generated/TimeInForce.h +++ b/src/lib/orderman/actors/ilink3/generated/TimeInForce.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class TimeInForce @@ -136,8 +72,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, TimeInForce::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, TimeInForce::Value m) { return os << TimeInForce::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/TradeAddendum.h b/src/lib/orderman/actors/ilink3/generated/TradeAddendum.h index 9adb02444..830d146b7 100644 --- a/src/lib/orderman/actors/ilink3/generated/TradeAddendum.h +++ b/src/lib/orderman/actors/ilink3/generated/TradeAddendum.h @@ -2,80 +2,17 @@ #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 -# define SBE_CONSTEXPR constexpr -# define SBE_NOEXCEPT noexcept -#else -# define SBE_CONSTEXPR -# define SBE_NOEXCEPT -#endif - -#if __cplusplus >= 201703L -# include -# define SBE_NODISCARD [[nodiscard]] -#else -# define SBE_NODISCARD -#endif - #if !defined(__STDC_LIMIT_MACROS) # define __STDC_LIMIT_MACROS 1 #endif #include -#include #include #include #include #include #include #include -#include -#include - -#if defined(WIN32) || defined(_WIN32) -# define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -# define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v) -#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -# define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v) -# define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v) -# define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v) -# define SBE_BIG_ENDIAN_ENCODE_16(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_32(v) (v) -# define SBE_BIG_ENDIAN_ENCODE_64(v) (v) -#else -# error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file." -#endif - -#if defined(SBE_NO_BOUNDS_CHECK) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false) -#elif defined(_MSC_VER) -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp) -#else -# define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c)) -#endif #define SBE_NULLVALUE_INT8 (std::numeric_limits::min)() #define SBE_NULLVALUE_INT16 (std::numeric_limits::min)() @@ -86,7 +23,6 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() - namespace iLinkBinary { class TradeAddendum @@ -130,8 +66,8 @@ public: } template - friend std::basic_ostream& operator << ( - std::basic_ostream& os, TradeAddendum::Value m) + friend std::basic_ostream & operator << ( + std::basic_ostream &os, TradeAddendum::Value m) { return os << TradeAddendum::c_str(m); } diff --git a/src/lib/orderman/actors/ilink3/generated/generate.sh b/src/lib/orderman/actors/ilink3/generated/generate.sh old mode 100755 new mode 100644 index 200d1fd7e..6185d3ad1 --- a/src/lib/orderman/actors/ilink3/generated/generate.sh +++ b/src/lib/orderman/actors/ilink3/generated/generate.sh @@ -3,4 +3,5 @@ # download xml # sftp cmeconfig@sftpng.cmegroup.com:MSGW/NRCert/Templates/ilinkbinary.xml # password: G3t(0nnect3d -docker run --rm -it -w /work -v $PWD:/work java java -Dsbe.output.dir=/work -Dsbe.generate.ir="false" -Dsbe.target.language=cpp -jar sbe-all-1.17.0.jar ilinkbinary.xml \ No newline at end of file +# docker run --rm -it -w /work -v $PWD:/work java java -Dsbe.output.dir=/work -Dsbe.generate.ir="false" -Dsbe.target.language=cpp -jar sbe-all-1.27.0.jar ilinkbinary.xml +docker run --rm -it -w /work -v $PWD:/work eclipse-temurin:17-jdk-jammy java -Dsbe.output.dir=/work -Dsbe.generate.ir="false" -Dsbe.target.language=cpp -jar sbe-all-1.27.0.jar ilinkbinary.xml diff --git a/src/lib/orderman/actors/ilink3/generated/ilinkbinary.xml b/src/lib/orderman/actors/ilink3/generated/ilinkbinary.xml index 6ef8c5cf9..0f4201335 100644 --- a/src/lib/orderman/actors/ilink3/generated/ilinkbinary.xml +++ b/src/lib/orderman/actors/ilink3/generated/ilinkbinary.xml @@ -1,5 +1,5 @@ - + IDEMPOTENT @@ -15,6 +15,8 @@ 4 C 5 + 6 + E F CME-1-SHA-256 @@ -29,8 +31,10 @@ U C 0 + 6 8 C + E 8 1 @@ -135,8 +139,8 @@ 1 - 2 - 3 + 2 + 3 4 @@ -166,7 +170,10 @@ 105 106 107 - 108 + 108 + 109 + 110 + 111 G @@ -227,12 +234,14 @@ 1 3 + 7 100 0 1 6 + 99 0 @@ -256,11 +265,13 @@ 2 4 5 + 6 8 C + E U - + 1 2 4 @@ -337,6 +348,7 @@ 1 2 + 7 0 @@ -347,12 +359,13 @@ 1 2 - + 0 1 3 4 6 + 99 4 @@ -478,8 +491,8 @@ - - + + @@ -499,11 +512,13 @@ - + + + - + @@ -512,7 +527,7 @@ - + @@ -526,12 +541,13 @@ - + + - - + + @@ -542,9 +558,10 @@ - + + - + @@ -555,12 +572,14 @@ - + + + - - + + @@ -644,10 +663,10 @@ - + - + @@ -656,7 +675,7 @@ - + @@ -680,12 +699,15 @@ - + + + + - + @@ -695,7 +717,7 @@ - + @@ -720,12 +742,14 @@ - + + + - + @@ -734,7 +758,7 @@ - + @@ -757,11 +781,14 @@ - + + + + - + @@ -771,7 +798,7 @@ - + @@ -800,23 +827,36 @@ - + + + + + + + + + + + + - + + + @@ -829,7 +869,7 @@ - + @@ -858,7 +898,7 @@ - + @@ -883,7 +923,7 @@ - + @@ -891,7 +931,7 @@ - + @@ -911,6 +951,9 @@ + + + @@ -926,7 +969,7 @@ - + @@ -935,7 +978,9 @@ - + + + @@ -946,7 +991,7 @@ - + @@ -963,7 +1008,8 @@ - + + @@ -980,7 +1026,7 @@ - + @@ -989,7 +1035,7 @@ - + @@ -1015,12 +1061,14 @@ - + + + - + @@ -1030,7 +1078,7 @@ - + @@ -1057,9 +1105,14 @@ - + + + + + + @@ -1071,7 +1124,7 @@ - + @@ -1080,7 +1133,7 @@ - + @@ -1106,10 +1159,15 @@ - + + + + + + @@ -1131,7 +1189,7 @@ - + @@ -1154,7 +1212,7 @@ - + @@ -1236,7 +1294,7 @@ - + @@ -1258,7 +1316,7 @@ - + @@ -1276,11 +1334,12 @@ - + + @@ -1307,7 +1366,7 @@ - + @@ -1333,16 +1392,24 @@ - + + + + + + + + + - + @@ -1350,6 +1417,8 @@ + + @@ -1381,7 +1450,7 @@ - + @@ -1410,7 +1479,7 @@ - + @@ -1434,6 +1503,9 @@ + + + @@ -1450,7 +1522,7 @@ - + @@ -1464,6 +1536,7 @@ + @@ -1472,8 +1545,12 @@ + + + + - + @@ -1504,6 +1581,7 @@ + @@ -1512,8 +1590,14 @@ + + + + + + - + @@ -1539,16 +1623,18 @@ - + + + - + @@ -1571,6 +1657,9 @@ + + + @@ -1581,4 +1670,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/web/api/launch.json b/src/web/api/launch.json new file mode 100644 index 000000000..0888faf68 --- /dev/null +++ b/src/web/api/launch.json @@ -0,0 +1,455 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Spark Local", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceRoot}/build/ninja_debug/server/sparkd", + "args": [ + "run", + "test", + "-a", + "OutrightVanillaOrder" + ], + "stopAtEntry": false, + "cwd": "${workspaceRoot}/build/ninja_debug/server/", + "environment": [ + { + "name": "TZ", + "value": "America/Chicago" + } + ], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + }, + { + "name": "Spark Debugging Test", + "type": "cppdbg", + "request": "launch", + "program": "/home/taha/spark/build/gcc/debug/server/sparkd", + "args": [ + "test", + "[admin_service1]" + ], + "stopAtEntry": true, + "cwd": "/home/taha/spark/build/gcc/debug/server/", + "environment": [ + { + "name": "TZ", + "value": "America/Chicago" + } + ], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + }, + { + "name": "Sparkd Launch", + "type": "cppdbg", + "request": "launch", + "program": "/home/taha/spark/build/gcc/debug/server/sparkd", + "args": [ + "run", + ], + "stopAtEntry": false, + "cwd": "/home/taha/spark/build/gcc/debug/server/", + "environment": [ + { + "name": "TZ", + "value": "America/Chicago" + } + ], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + }, + { + "name": "SparkVM Launch", + "type": "cppdbg", + "request": "launch", + "program": "/home/bts/spark/build/ninja_debug/server/sparkd", + "args": [ + "test", + "-a", + "[ilink3]" + ], + "stopAtEntry": false, + "cwd": "/home/bts/spark/build/ninja_debug/server/", + "environment": [], + "externalConsole": true, + "MIMode": "gdb", + "preLaunchTask": "", + "logging": { + "engineLogging": false + }, + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "enable pretty-printer", + "ignoreFailures": true + }, + { + "description": "Skip STL", + "text": "skip -gfi /usr/include/c++/7/bits/*.h", + "ignoreFailures": true + }, + { + "description": "LD LIBRARY", + "text": "set env LD_LIBRARY_PATH=.", + "ignoreFailures": false + } + ], + "pipeTransport": { + "pipeCwd": "${workspaceRoot}", + "pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe", + "pipeArgs": [ + "bts@sparkvm" + ], + "debuggerPath": "/usr/bin/gdb" + }, + "sourceFileMap": { + "/home/bts/spark/": "${workspaceRoot}" + } + }, + { + "name": "(gdb) Launch", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceRoot}/build/ninja_debug/server/sparkd/sparkd", + "args": [ + "run" + ], + "stopAtEntry": false, + "cwd": "${workspaceRoot}/build/ninja_debug/src/server/sparkd", + "environment": [], + "externalConsole": true, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + }, + { + "name": "Client Launch", + "type": "clr", + "request": "launch", + "program": "${workspaceRoot}/build/Debug/bin/net471/spark.exe", + "args": [], + "cwd": "${workspaceRoot}", + "stopAtEntry": false, + "externalConsole": true, + "requireExactSource": false + }, + { + "name": "SDK Launch", + "type": "clr", + "request": "launch", + "program": "${workspaceRoot}/build/Debug/bin/net471/spark_sdk.exe", + "args": [ + "md", + "GLBX", + "Future", + "CL", + "CLZ9", + "--user=bts", + "--pass=" + ], + "cwd": "${workspaceRoot}", + "stopAtEntry": false, + "externalConsole": true, + "requireExactSource": false + }, + { + "name": "Excel Launch", + "type": "clr", + "request": "launch", + "program": "C:/Program Files/Microsoft Office/Office14/EXCEL.EXE", + "args": [ + "${workspaceRoot}/build/Debug/bin/net471/spark_excel-addin64-packed.xll" + ], + "cwd": "${workspaceRoot}", + "stopAtEntry": false, + "externalConsole": true, + "requireExactSource": false + }, + { + "name": "Client Tests", + "type": "clr", + "request": "launch", + "program": "${workspaceRoot}/build/Debug/bin/net471/sparkcmd.exe", + "args": [ + "test", + "ApiUpdateTests" + ], + "cwd": "${workspaceRoot}", + "stopAtEntry": false, + "externalConsole": true, + "requireExactSource": false + }, + { + "name": "Client Attach", + "type": "clr", + "request": "attach", + "processId": "${command:pickProcess}" + }, + { + "name": "Spreader Tests", + "type": "cppdbg", + "request": "launch", + "program": "/home/bts/spark/build/ninja_debug/server/sparkd", + "args": [ + "test", + "[spreader]" + ], + "stopAtEntry": false, + "cwd": "/home/bts/spark/build/ninja_debug/server/", + "environment": [], + "externalConsole": true, + "MIMode": "gdb", + "preLaunchTask": "", + "logging": { + "engineLogging": false + }, + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "enable pretty-printer", + "ignoreFailures": true + } + ], + "pipeTransport": { + "pipeCwd": "${workspaceRoot}", + "pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe", + "pipeArgs": [ + "bts@sparkvm" + ], + "debuggerPath": "/usr/bin/gdb" + }, + "sourceFileMap": { + "/home/bts/spark/": "${workspaceRoot}" + } + }, + { + "name": "Admin Service Tests", + "type": "cppdbg", + "request": "launch", + "program": "/home/bts/spark/build/ninja_debug/src/server/sparkd/sparkd", + "args": [ + "test", + "[admin_service]" + ], + "stopAtEntry": false, + "cwd": "/home/bts/spark/build/ninja_debug/src/server/sparkd/", + "environment": [], + "externalConsole": true, + "MIMode": "gdb", + "preLaunchTask": "", + "logging": { + "engineLogging": false + }, + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "enable pretty-printer", + "ignoreFailures": true + } + ], + "pipeTransport": { + "pipeCwd": "${workspaceRoot}", + "pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe", + "pipeArgs": [ + "bts@sparkvm" + ], + "debuggerPath": "/usr/bin/gdb" + }, + "sourceFileMap": { + "/home/bts/spark/": "${workspaceRoot}" + } + }, + { + "name": "Limiter Tests", + "type": "cppdbg", + "request": "launch", + "program": "/home/bts/spark/build/ninja_debug/src/server/sparkd/sparkd", + "args": [ + "test", + "[limiter]" + ], + "stopAtEntry": false, + "cwd": "/home/bts/spark/build/ninja_debug/src/server/sparkd/", + "environment": [], + "externalConsole": true, + "MIMode": "gdb", + "preLaunchTask": "", + "logging": { + "engineLogging": false + }, + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "enable pretty-printer", + "ignoreFailures": true + } + ], + "pipeTransport": { + "pipeCwd": "${workspaceRoot}", + "pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe", + "pipeArgs": [ + "bts@sparkvm" + ], + "debuggerPath": "/usr/bin/gdb" + }, + "sourceFileMap": { + "/home/bts/spark/": "${workspaceRoot}" + } + }, + { + "name": "MD Tests", + "type": "cppdbg", + "request": "launch", + "program": "/home/bts/spark/build/ninja_debug/server/sparkd", + "args": [ + "test", + "[algo]" + ], + "stopAtEntry": false, + "cwd": "/home/bts/spark/build/ninja_debug/server/", + "environment": [], + "externalConsole": true, + "MIMode": "gdb", + "preLaunchTask": "", + "logging": { + "engineLogging": false + }, + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + }, + { + "description": "Skip STL", + "text": "skip -gfi /usr/include/c++/7/bits/*.h", + "ignoreFailures": true + } + ], + "pipeTransport": { + "pipeCwd": "${workspaceRoot}", + "pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe", + "pipeArgs": [ + "bts@sparkvm" + ], + "debuggerPath": "/usr/bin/gdb" + }, + "sourceFileMap": { + "/home/bts/spark/": "${workspaceRoot}" + } + }, + { + "name": "SparkVM attach", + "type": "cppdbg", + "request": "attach", + "program": "/home/bts/spark/build/ninja_debug/src/server/sparkd/sparkd", + "processId": "${command:pickRemoteProcess}", + "MIMode": "gdb", + "pipeTransport": { + "pipeCwd": "${workspaceRoot}", + "pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe", + "pipeArgs": [ + "bts@sparkvm" + ], + "debuggerPath": "/usr/bin/gdb" + }, + "sourceFileMap": { + "/home/bts/spark/": "${workspaceRoot}" + } + }, + { + "name": "Python", + "type": "python", + "request": "launch", + "stopOnEntry": false, + "pythonPath": "${config:python.pythonPath}", + "program": "${file}", + "cwd": "${workspaceRoot}", + "env": {}, + "envFile": "${workspaceRoot}/.env", + "args": [ + "DEBUG" + ], + "debugOptions": [ + "WaitOnAbnormalExit", + "WaitOnNormalExit", + "RedirectOutput" + ] + }, + { + "name": ".NET Core Remote Attach", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickRemoteProcess}", + "pipeTransport": { + "pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe", + "pipeArgs": [ + "bts@sparkvm" + ], + "debuggerPath": "/home/bts/vsdbg/vsdbg", + "pipeCwd": "${workspaceRoot}", + "quoteArgs": true + }, + "sourceFileMap": { + "/home/bts/spark/": "${workspaceRoot}" + }, + "justMyCode": true + }, + { + "name": ".NET Core Remote Launch", + "type": "coreclr", + "request": "launch", + "program": "/usr/bin/dotnet", + "args": [ + "sparkcmd.dll", + "test", + "test_join_create_and_takeout_market" + ], + "stopAtEntry": false, + "cwd": "/home/bts/spark/build/ninja_debug/server", + "pipeTransport": { + "pipeProgram": "c:\\program files\\git\\usr\\bin\\ssh.exe", + "pipeArgs": [ + "bts@sparkvm" + ], + "debuggerPath": "/home/bts/vsdbg/vsdbg", + "pipeCwd": "${workspaceRoot}", + "quoteArgs": true + }, + "sourceFileMap": { + "/home/bts/spark/": "${workspaceRoot}" + }, + "justMyCode": false + } + ] +} \ No newline at end of file diff --git a/src/web/api/tsconfig.debug-clang.g.json b/src/web/api/tsconfig.debug-clang.g.json new file mode 100644 index 000000000..6514ca8f1 --- /dev/null +++ b/src/web/api/tsconfig.debug-clang.g.json @@ -0,0 +1,11 @@ +{ + "extends": "/home/taha/spark/src/web/api/tsconfig.debug.json", + "compilerOptions": { + "outDir": "/home/taha/spark/build/clang/debug/web/api", + "paths": { + "proto": [ + "/home/taha/spark/build/clang/debug/web/api/proto" + ] + } + } +} \ No newline at end of file diff --git a/src/web/api/tsconfig.debug-gcc.g.json b/src/web/api/tsconfig.debug-gcc.g.json new file mode 100644 index 000000000..5520481f3 --- /dev/null +++ b/src/web/api/tsconfig.debug-gcc.g.json @@ -0,0 +1,11 @@ +{ + "extends": "/home/taha/spark/src/web/api/tsconfig.debug.json", + "compilerOptions": { + "outDir": "/home/taha/spark/build/gcc/debug/web/api", + "paths": { + "proto": [ + "/home/taha/spark/build/gcc/debug/web/api/proto" + ] + } + } +} \ No newline at end of file diff --git a/src/web/api/tsconfig.last.g.json b/src/web/api/tsconfig.last.g.json new file mode 100644 index 000000000..76e58b30a --- /dev/null +++ b/src/web/api/tsconfig.last.g.json @@ -0,0 +1,11 @@ +{ + "extends": "/home/taha/spark/src/web/api/tsconfig.release.json", + "compilerOptions": { + "outDir": "/home/taha/spark/build/gcc/release/web/api", + "paths": { + "proto": [ + "/home/taha/spark/build/gcc/release/web/api/proto" + ] + } + } +} \ No newline at end of file diff --git a/src/web/api/tsconfig.release-clang.g.json b/src/web/api/tsconfig.release-clang.g.json new file mode 100644 index 000000000..71ec75adc --- /dev/null +++ b/src/web/api/tsconfig.release-clang.g.json @@ -0,0 +1,11 @@ +{ + "extends": "/home/taha/spark/src/web/api/tsconfig.release.json", + "compilerOptions": { + "outDir": "/home/taha/spark/build/clang/release/web/api", + "paths": { + "proto": [ + "/home/taha/spark/build/clang/release/web/api/proto" + ] + } + } +} \ No newline at end of file diff --git a/src/web/api/tsconfig.release-gcc.g.json b/src/web/api/tsconfig.release-gcc.g.json new file mode 100644 index 000000000..76e58b30a --- /dev/null +++ b/src/web/api/tsconfig.release-gcc.g.json @@ -0,0 +1,11 @@ +{ + "extends": "/home/taha/spark/src/web/api/tsconfig.release.json", + "compilerOptions": { + "outDir": "/home/taha/spark/build/gcc/release/web/api", + "paths": { + "proto": [ + "/home/taha/spark/build/gcc/release/web/api/proto" + ] + } + } +} \ No newline at end of file