diff --git a/src/server/sparkd/cmds/spartan/docs/cme_notes.org b/src/server/sparkd/cmds/spartan/docs/cme_notes.org index f3e1f27e3..16cc04c2d 100644 --- a/src/server/sparkd/cmds/spartan/docs/cme_notes.org +++ b/src/server/sparkd/cmds/spartan/docs/cme_notes.org @@ -1,3 +1,5 @@ +* MDP3 +- [[ftp://ftp.cmegroup.com/SBEFix/][Templates and Config FTP Site]] * iLink3 - [[https://cmegroup.com/confluence/display/EPICSANDBOX/iLink+3+-+Simple+Binary+Encoding#iLink3SimpleBinaryEncoding-SchemaDistribution][Dissimination Scheme]] - sftp access: diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/cert/templates_FixBinary.xml b/src/server/sparkd/cmds/spartan/market_data/gen/cert/templates_FixBinary.xml new file mode 100644 index 000000000..cb0c3ade3 --- /dev/null +++ b/src/server/sparkd/cmds/spartan/market_data/gen/cert/templates_FixBinary.xml @@ -0,0 +1,955 @@ + + + + + + + + 24 + + + + + + + J + g + 2 + e + + 0 + 0 + + + + 8 + + + + + + + + + + + + + + + + -9 + + + + -9 + + + + -4 + + + + -7 + + + + + + + + + + -7 + + + + -9 + + + + -7 + + + + -9 + + + + + + + + + + + + + + + + + + + + + 0 + 1 + 2 + + + 5 + 7 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + + + 1 + 2 + + + 0 + 1 + 2 + 4 + 6 + 7 + 8 + B + C + E + F + J + N + O + W + e + g + + + 0 + 1 + E + F + J + + + 6 + B + C + W + + + 4 + 7 + 8 + N + O + + + 0 + 1 + 2 + 3 + 4 + 5 + + + 0 + 5 + + + 0 + 1 + 2 + + + 0 + 1 + + + 0 + 1 + 4 + 5 + 6 + + + 2 + 4 + 15 + 17 + 18 + 20 + 21 + 24 + 25 + 26 + 103 + + + A + D + M + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + + + 0 + 1 + 2 + 3 + 4 + 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/generate.sh b/src/server/sparkd/cmds/spartan/market_data/gen/generate.sh new file mode 100755 index 000000000..031db8105 --- /dev/null +++ b/src/server/sparkd/cmds/spartan/market_data/gen/generate.sh @@ -0,0 +1,42 @@ +#!/bin/bash + + +# To update templates_FixBinary.xml: +# ---------------------------------- +# Download the new template from one of the above: +# ftp://ftp.cmegroup.com/SBEFix/Production/Templates/templates_FixBinary.xml +# ftp://ftp.cmegroup.com/SBEFix/NRCert/Templates/templates_FixBinary.xml +# ftp://ftp.cmegroup.com/SBEFix/Cert/Templates/templates_FixBinary.xml +# And copy it to the corresponding directory (prod, nrcert, cert) +# ---------------------------------- + +# To generate CPP +# --------------------------- +# Obtain sbe-all-[version].jar from sbe-logic github. +# Pre-built packages are available at https://search.maven.org/search?q=g:uk.co.real-logic%20sbe +# Run the docker command below which run a java docker container and execute the jar. + +RELEASE_TYPE=${1:-prod} +SBE_VERSION=1.20.4 + +SBE_BIN=sbe-all-$SBE_VERSION.jar +MY_DIR="$(dirname "$(readlink -f "$0")")" +cd $MY_DIR +rm -rf src +mkdir -p src + +docker run --rm -it -w $PWD \ + -v /home:/home \ + -v /etc/group:/etc/group \ + -v /etc/passwd:/etc/passwd \ + -u $UID \ + java \ + java -Dsbe.output.dir=src \ + -Dsbe.generate.ir="false" \ + -Dsbe.target.namespace="mdp3" \ + -Dsbe.target.language=cpp \ + -jar ./sbe-all-$SBE_VERSION.jar \ + $RELEASE_TYPE/templates_FixBinary.xml + +mv src/mdp3/* src/ +rmdir src/mdp3/ diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/nrcert/templates_FixBinary.xml b/src/server/sparkd/cmds/spartan/market_data/gen/nrcert/templates_FixBinary.xml new file mode 100644 index 000000000..cb0c3ade3 --- /dev/null +++ b/src/server/sparkd/cmds/spartan/market_data/gen/nrcert/templates_FixBinary.xml @@ -0,0 +1,955 @@ + + + + + + + + 24 + + + + + + + J + g + 2 + e + + 0 + 0 + + + + 8 + + + + + + + + + + + + + + + + -9 + + + + -9 + + + + -4 + + + + -7 + + + + + + + + + + -7 + + + + -9 + + + + -7 + + + + -9 + + + + + + + + + + + + + + + + + + + + + 0 + 1 + 2 + + + 5 + 7 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + + + 1 + 2 + + + 0 + 1 + 2 + 4 + 6 + 7 + 8 + B + C + E + F + J + N + O + W + e + g + + + 0 + 1 + E + F + J + + + 6 + B + C + W + + + 4 + 7 + 8 + N + O + + + 0 + 1 + 2 + 3 + 4 + 5 + + + 0 + 5 + + + 0 + 1 + 2 + + + 0 + 1 + + + 0 + 1 + 4 + 5 + 6 + + + 2 + 4 + 15 + 17 + 18 + 20 + 21 + 24 + 25 + 26 + 103 + + + A + D + M + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + + + 0 + 1 + 2 + 3 + 4 + 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/prod/templates_FixBinary.xml b/src/server/sparkd/cmds/spartan/market_data/gen/prod/templates_FixBinary.xml new file mode 100644 index 000000000..cb0c3ade3 --- /dev/null +++ b/src/server/sparkd/cmds/spartan/market_data/gen/prod/templates_FixBinary.xml @@ -0,0 +1,955 @@ + + + + + + + + 24 + + + + + + + J + g + 2 + e + + 0 + 0 + + + + 8 + + + + + + + + + + + + + + + + -9 + + + + -9 + + + + -4 + + + + -7 + + + + + + + + + + -7 + + + + -9 + + + + -7 + + + + -9 + + + + + + + + + + + + + + + + + + + + + 0 + 1 + 2 + + + 5 + 7 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + + + 1 + 2 + + + 0 + 1 + 2 + 4 + 6 + 7 + 8 + B + C + E + F + J + N + O + W + e + g + + + 0 + 1 + E + F + J + + + 6 + B + C + W + + + 4 + 7 + 8 + N + O + + + 0 + 1 + 2 + 3 + 4 + 5 + + + 0 + 5 + + + 0 + 1 + 2 + + + 0 + 1 + + + 0 + 1 + 4 + 5 + 6 + + + 2 + 4 + 15 + 17 + 18 + 20 + 21 + 24 + 25 + 26 + 103 + + + A + D + M + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + + + 0 + 1 + 2 + 3 + 4 + 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/sbe-all-1.20.4.jar b/src/server/sparkd/cmds/spartan/market_data/gen/sbe-all-1.20.4.jar new file mode 100644 index 000000000..94e4be40c Binary files /dev/null and b/src/server/sparkd/cmds/spartan/market_data/gen/sbe-all-1.20.4.jar differ diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/AdminHeartbeat12.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/AdminHeartbeat12.h index d8120ef04..bbbfe8022 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/AdminHeartbeat12.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/AdminHeartbeat12.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,195 +86,268 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class AdminHeartbeat12 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class AdminHeartbeat12 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(0); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(12); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - AdminHeartbeat12() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - AdminHeartbeat12( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - AdminHeartbeat12(char *buffer, const std::uint64_t bufferLength) - : AdminHeartbeat12( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + AdminHeartbeat12() = default; - AdminHeartbeat12( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : AdminHeartbeat12( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + AdminHeartbeat12( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + AdminHeartbeat12(char *buffer, const std::uint64_t bufferLength) : + AdminHeartbeat12(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)12; - } + AdminHeartbeat12( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + AdminHeartbeat12(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(0); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "0"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(12); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - AdminHeartbeat12 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = AdminHeartbeat12( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - AdminHeartbeat12 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "0"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = AdminHeartbeat12( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + AdminHeartbeat12 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = AdminHeartbeat12(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - AdminHeartbeat12 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = AdminHeartbeat12( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + AdminHeartbeat12 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = AdminHeartbeat12( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + AdminHeartbeat12 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = AdminHeartbeat12(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + AdminHeartbeat12 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, AdminHeartbeat12 _writer) { - AdminHeartbeat12 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "AdminHeartbeat12", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - builder << '}'; + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - return builder; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, AdminHeartbeat12 _writer) +{ + AdminHeartbeat12 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "AdminHeartbeat12", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + 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 +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/AdminLogin15.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/AdminLogin15.h index f0f5df257..d69e49bc3 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/AdminLogin15.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/AdminLogin15.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,263 +86,342 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class AdminLogin15 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class AdminLogin15 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(1); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(15); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - AdminLogin15() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - AdminLogin15( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - AdminLogin15(char *buffer, const std::uint64_t bufferLength) - : AdminLogin15( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + AdminLogin15() = default; - AdminLogin15( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : AdminLogin15( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + AdminLogin15( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + AdminLogin15(char *buffer, const std::uint64_t bufferLength) : + AdminLogin15(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)15; - } + AdminLogin15( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + AdminLogin15(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(1); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "A"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(15); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - AdminLogin15 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = AdminLogin15( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - AdminLogin15 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "A"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = AdminLogin15( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + AdminLogin15 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = AdminLogin15(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - AdminLogin15 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = AdminLogin15( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + AdminLogin15 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = AdminLogin15( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + AdminLogin15 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = AdminLogin15(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + AdminLogin15 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char * - HeartBtIntMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t heartBtIntId() SBE_NOEXCEPT { - return 108; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - heartBtIntSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool heartBtIntInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *HeartBtIntMetaAttribute(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 heartBtIntId() SBE_NOEXCEPT + { + return 108; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t heartBtIntSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool heartBtIntInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= heartBtIntSinceVersion(); + return m_actingVersion >= heartBtIntSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - heartBtIntEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t heartBtIntEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::int8_t heartBtIntNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } + static SBE_CONSTEXPR std::int8_t heartBtIntNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } - static SBE_CONSTEXPR std::int8_t heartBtIntMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + static SBE_CONSTEXPR std::int8_t heartBtIntMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - static SBE_CONSTEXPR std::int8_t heartBtIntMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t heartBtIntMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::size_t heartBtIntEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t heartBtIntEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::int8_t heartBtInt() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int8_t)); - return (val); - } + SBE_NODISCARD std::int8_t heartBtInt() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int8_t)); + return (val); + } - AdminLogin15 &heartBtInt(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int8_t)); - return *this; - } + AdminLogin15 &heartBtInt(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int8_t)); + return *this; + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, AdminLogin15 _writer) { - AdminLogin15 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "AdminLogin15", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, AdminLogin15 _writer) +{ + AdminLogin15 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "AdminLogin15", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; - builder << R"("HeartBtInt": )"; - builder << +writer.heartBtInt(); + builder << R"("HeartBtInt": )"; + builder << +writer.heartBtInt(); - builder << '}'; + builder << '}'; - return 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 +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/AdminLogout16.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/AdminLogout16.h index 805ce83a7..bc07e1800 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/AdminLogout16.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/AdminLogout16.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,382 +86,478 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class AdminLogout16 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class AdminLogout16 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(180); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(16); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - AdminLogout16() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - AdminLogout16( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - AdminLogout16(char *buffer, const std::uint64_t bufferLength) - : AdminLogout16( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + AdminLogout16() = default; - AdminLogout16( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : AdminLogout16( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + AdminLogout16( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)180; - } + AdminLogout16(char *buffer, const std::uint64_t bufferLength) : + AdminLogout16(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)16; - } + AdminLogout16( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + AdminLogout16(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(180); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "5"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(16); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - AdminLogout16 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = AdminLogout16( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - AdminLogout16 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "5"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = AdminLogout16( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + AdminLogout16 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = AdminLogout16(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - AdminLogout16 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = AdminLogout16( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + AdminLogout16 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = AdminLogout16( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + AdminLogout16 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = AdminLogout16(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + AdminLogout16 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char * - TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t textId() SBE_NOEXCEPT { return 58; } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - textSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool textInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *TextMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t textId() SBE_NOEXCEPT + { + return 58; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t textSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool textInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= textSinceVersion(); + return m_actingVersion >= textSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - textEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t textEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR char textNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char textNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char textMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT { return (char)126; } + static SBE_CONSTEXPR char textMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t textEncodingLength() SBE_NOEXCEPT { - return 180; - } + static SBE_CONSTEXPR std::size_t textEncodingLength() SBE_NOEXCEPT + { + return 180; + } - static SBE_CONSTEXPR std::uint64_t textLength() SBE_NOEXCEPT { return 180; } + static SBE_CONSTEXPR std::uint64_t textLength() SBE_NOEXCEPT + { + return 180; + } - SBE_NODISCARD const char *text() const SBE_NOEXCEPT { - return m_buffer + m_offset + 0; - } + SBE_NODISCARD const char *text() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } - SBE_NODISCARD char *text() SBE_NOEXCEPT { return m_buffer + m_offset + 0; } + SBE_NODISCARD char *text() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } - SBE_NODISCARD char text(const std::uint64_t index) const { - if (index >= 180) { - throw std::runtime_error("index out of range for text [E104]"); - } + SBE_NODISCARD char text(const std::uint64_t index) const + { + if (index >= 180) + { + throw std::runtime_error("index out of range for text [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } - AdminLogout16 &text(const std::uint64_t index, const char value) { - if (index >= 180) { - throw std::runtime_error("index out of range for text [E105]"); - } + AdminLogout16 &text(const std::uint64_t index, const char value) + { + if (index >= 180) + { + throw std::runtime_error("index out of range for text [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getText(char *const dst, const std::uint64_t length) const { - if (length > 180) { - throw std::runtime_error("length too large for getText [E106]"); - } + std::uint64_t getText(char *const dst, const std::uint64_t length) const + { + if (length > 180) + { + throw std::runtime_error("length too large for getText [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 0, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } - AdminLogout16 &putText(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 180); - return *this; - } + AdminLogout16 &putText(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 180); + return *this; + } - std::string getTextAsString() const { - const char *buffer = m_buffer + m_offset + 0; - size_t length = 0; + SBE_NODISCARD std::string getTextAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; - for (; length < 180 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 180 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getTextAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getTextAsString(); + std::string getTextAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getTextAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getTextAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 0; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getTextAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; - for (; length < 180 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 180 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } + return result; + } + #endif + + #if __cplusplus >= 201703L + AdminLogout16 &putText(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 180) + { + throw std::runtime_error("string too large for putText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 180; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + AdminLogout16 &putText(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 180) + { + throw std::runtime_error("string too large for putText [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 180; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, AdminLogout16 _writer) +{ + AdminLogout16 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "AdminLogout16", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("Text": )"; + builder << '"' << + writer.getTextAsJsonEscapedString().c_str() << '"'; + + builder << '}'; + + return builder; +} + +void skip() +{ +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return true; +} + +SBE_NODISCARD static std::size_t computeLength() +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" #endif + std::size_t length = sbeBlockLength(); -#if __cplusplus >= 201703L - AdminLogout16 &putText(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 180) { - throw std::runtime_error("string too large for putText [E106]"); - } - - std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); - for (size_t start = srcLength; start < 180; ++start) { - m_buffer[m_offset + 0 + start] = 0; - } - - return *this; - } -#else - AdminLogout16 &putText(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 180) { - throw std::runtime_error("string too large for putText [E106]"); - } - - std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); - for (size_t start = srcLength; start < 180; ++start) { - m_buffer[m_offset + 0 + start] = 0; - } - - return *this; - } + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop #endif - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, AdminLogout16 _writer) { - AdminLogout16 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "AdminLogout16", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("Text": )"; - builder << '"' << writer.getTextAsJsonEscapedString().c_str() << '"'; - - builder << '}'; - - return builder; - } +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/AggressorSide.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/AggressorSide.h index fe1c5343f..6aa48c603 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/AggressorSide.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/AggressorSide.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,54 +86,54 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class AggressorSide { - public: - enum Value { - NoAggressor = (std::uint8_t)0, - Buy = (std::uint8_t)1, - Sell = (std::uint8_t)2, - NULL_VALUE = (std::uint8_t)255 - }; +class AggressorSide +{ +public: + enum Value + { + NoAggressor = static_cast(0), + Buy = static_cast(1), + Sell = static_cast(2), + NULL_VALUE = static_cast(255) + }; - static AggressorSide::Value get(const std::uint8_t value) { - switch (value) { - case 0: - return NoAggressor; - case 1: - return Buy; - case 2: - return Sell; - case 255: - return NULL_VALUE; - } + static AggressorSide::Value get(const std::uint8_t value) + { + switch (value) + { + case static_cast(0): return NoAggressor; + case static_cast(1): return Buy; + case static_cast(2): return Sell; + case static_cast(255): return NULL_VALUE; + } - throw std::runtime_error("unknown value for enum AggressorSide [E103]"); - } + throw std::runtime_error("unknown value for enum AggressorSide [E103]"); + } - static const char *c_str(const AggressorSide::Value value) { - switch (value) { - case NoAggressor: - return "NoAggressor"; - case Buy: - return "Buy"; - case Sell: - return "Sell"; - case NULL_VALUE: - return "NULL_VALUE"; - } + static const char *c_str(const AggressorSide::Value value) + { + switch (value) + { + case NoAggressor: return "NoAggressor"; + case Buy: return "Buy"; + case Sell: return "Sell"; + case NULL_VALUE: return "NULL_VALUE"; + } - throw std::runtime_error("unknown value for enum AggressorSide [E103]:"); - } + throw std::runtime_error("unknown value for enum AggressorSide [E103]:"); + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &os, AggressorSide::Value m) { - return os << AggressorSide::c_str(m); - } + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, AggressorSide::Value m) + { + return os << AggressorSide::c_str(m); + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/ChannelReset4.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/ChannelReset4.h index c0a8ee32c..eef1353e2 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/ChannelReset4.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/ChannelReset4.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,774 +86,919 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class ChannelReset4 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class ChannelReset4 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(9); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(4); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - ChannelReset4() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - ChannelReset4( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - ChannelReset4(char *buffer, const std::uint64_t bufferLength) - : ChannelReset4( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + ChannelReset4() = default; - ChannelReset4( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : ChannelReset4( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + ChannelReset4( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + ChannelReset4(char *buffer, const std::uint64_t bufferLength) : + ChannelReset4(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)4; - } + ChannelReset4( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + ChannelReset4(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(9); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "X"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(4); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - ChannelReset4 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = ChannelReset4( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - ChannelReset4 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "X"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = ChannelReset4( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + ChannelReset4 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = ChannelReset4(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - ChannelReset4 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = ChannelReset4( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + ChannelReset4 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = ChannelReset4( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + ChannelReset4 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = ChannelReset4(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + ChannelReset4 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() 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); + } - ChannelReset4 &transactTime(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; - } + ChannelReset4 &transactTime(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 *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - class NoMDEntries { + class NoMDEntries + { 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; + 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; - } + 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 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) { + inline void wrapForEncode( + char *buffer, + const std::uint8_t count, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wtype-limits" + #endif + if (count > 254) + { + throw std::runtime_error("count outside of allowed range [E110]"); + } + #if defined(__GNUG__) && !defined(__clang__) + #pragma GCC diagnostic pop + #endif + m_buffer = buffer; + m_bufferLength = bufferLength; + GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength(static_cast(2)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 2; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } + + // NOLINTNEXTLINE(readability-convert-member-functions-to-static) + std::uint64_t sbeCheckPosition(const std::uint64_t position) + { + if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short [E100]"); + } + return position; + } + + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } + + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } + + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoMDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *MDUpdateActionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDUpdateActionId() SBE_NOEXCEPT + { + return 279; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDUpdateActionSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int8_t mDUpdateActionNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t mDUpdateActionMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t mDUpdateActionMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t mDUpdateAction() SBE_NOEXCEPT + { + return static_cast(0); + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char mDEntryTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char mDEntryTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char mDEntryTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t mDEntryTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *mDEntryType() const + { + static const std::uint8_t mDEntryTypeValues[] = { 74 }; + + return (const char *)mDEntryTypeValues; + } + + SBE_NODISCARD char mDEntryType(const std::uint64_t index) const + { + static const std::uint8_t mDEntryTypeValues[] = { 74 }; + + return (char)mDEntryTypeValues[index]; + } + + std::uint64_t getMDEntryType(char *dst, const std::uint64_t length) const + { + static std::uint8_t mDEntryTypeValues[] = { 74 }; + std::uint64_t bytesToCopy = length < sizeof(mDEntryTypeValues) ? length : sizeof(mDEntryTypeValues); + + std::memcpy(dst, mDEntryTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getMDEntryTypeAsString() const + { + static const std::uint8_t MDEntryTypeValues[] = { 74 }; + + return std::string((const char *)MDEntryTypeValues, 1); + } + + std::string getMDEntryTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMDEntryTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char *ApplIDMetaAttribute(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 applIDId() SBE_NOEXCEPT + { + return 1180; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t applIDSinceVersion() SBE_NOEXCEPT + { + return 3; + } + + SBE_NODISCARD bool applIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= applIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t applIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int16_t applIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT16; + } + + static SBE_CONSTEXPR std::int16_t applIDMinValue() SBE_NOEXCEPT + { + return static_cast(-32767); + } + + static SBE_CONSTEXPR std::int16_t applIDMaxValue() SBE_NOEXCEPT + { + return static_cast(32767); + } + + static SBE_CONSTEXPR std::size_t applIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::int16_t applID() const SBE_NOEXCEPT + { + if (m_actingVersion < 3) + { + return static_cast(-32768); + } + + std::int16_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoMDEntries &applID(const std::int16_t value) SBE_NOEXCEPT + { + std::int16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int16_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("ApplID": )"; + builder << +writer.applID(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)2); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 2; - m_actingVersion = actingVersion; - m_initialPosition = *pos; - m_positionPtr = pos; - *m_positionPtr = *m_positionPtr + 3; - } + } + }; - static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT { - return 3; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 2; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char *MDUpdateActionMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDUpdateActionId() SBE_NOEXCEPT { - return 279; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDUpdateActionSinceVersion() SBE_NOEXCEPT { - return 2; - } - - SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDUpdateActionSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 0; - } +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, ChannelReset4 _writer) +{ + ChannelReset4 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "ChannelReset4", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; - static SBE_CONSTEXPR std::int8_t mDUpdateActionNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); - static SBE_CONSTEXPR std::int8_t mDUpdateActionMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + builder << ", "; + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); - static SBE_CONSTEXPR std::int8_t mDUpdateActionMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingLength() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::int8_t - mDUpdateAction() SBE_NOEXCEPT { - return (std::int8_t)0; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR char mDEntryTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char mDEntryTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char mDEntryTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t mDEntryTypeLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD const char *mDEntryType() const { - static const std::uint8_t mDEntryTypeValues[] = {74}; - - return (const char *)mDEntryTypeValues; - } - - SBE_NODISCARD char mDEntryType(const std::uint64_t index) const { - static const std::uint8_t mDEntryTypeValues[] = {74}; - - return (char)mDEntryTypeValues[index]; - } - - std::uint64_t - getMDEntryType(char *dst, const std::uint64_t length) const { - static std::uint8_t mDEntryTypeValues[] = {74}; - std::uint64_t bytesToCopy = length < sizeof(mDEntryTypeValues) - ? length - : sizeof(mDEntryTypeValues); - - std::memcpy(dst, mDEntryTypeValues, static_cast(bytesToCopy)); - return bytesToCopy; - } - - std::string getMDEntryTypeAsString() const { - static const std::uint8_t MDEntryTypeValues[] = {74}; - - return std::string((const char *)MDEntryTypeValues, 1); - } - - std::string getMDEntryTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getMDEntryTypeAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } - } - } - - return oss.str(); - } - - SBE_NODISCARD static const char * - ApplIDMetaAttribute(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 applIDId() SBE_NOEXCEPT { - return 1180; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - applIDSinceVersion() SBE_NOEXCEPT { - return 3; - } - - SBE_NODISCARD bool applIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= applIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - applIDEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int16_t applIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT16; - } - - static SBE_CONSTEXPR std::int16_t applIDMinValue() SBE_NOEXCEPT { - return (std::int16_t)-32767; - } - - static SBE_CONSTEXPR std::int16_t applIDMaxValue() SBE_NOEXCEPT { - return (std::int16_t)32767; - } - - static SBE_CONSTEXPR std::size_t applIDEncodingLength() SBE_NOEXCEPT { - return 2; - } - - SBE_NODISCARD std::int16_t applID() const SBE_NOEXCEPT { - if (m_actingVersion < 3) { - return (std::int16_t)-32768; - } - - std::int16_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } - - NoMDEntries &applID(const std::int16_t value) SBE_NOEXCEPT { - std::int16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int16_t)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("ApplID": )"; - builder << +writer.applID(); - - builder << '}'; - - return builder; - } - }; - - private: - NoMDEntries m_noMDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } - - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, ChannelReset4 _writer) { - ChannelReset4 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "ChannelReset4", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noMDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/Decimal9.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/Decimal9.h index 04c6f16b2..9bcbfe850 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/Decimal9.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/Decimal9.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,210 +86,263 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class Decimal9 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_actingVersion = 0; +class Decimal9 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - Decimal9() = default; + Decimal9() = default; - Decimal9( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_actingVersion(actingVersion) { - if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) { - throw std::runtime_error("buffer too short for flyweight [E107]"); - } - } + Decimal9( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } - Decimal9( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : Decimal9(buffer, 0, bufferLength, actingVersion) {} + Decimal9( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + Decimal9(buffer, 0, bufferLength, actingVersion) + { + } - Decimal9(char *buffer, const std::uint64_t bufferLength) - : Decimal9(buffer, 0, bufferLength, sbeSchemaVersion()) {} + Decimal9( + char *buffer, + const std::uint64_t bufferLength) : + Decimal9(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } - Decimal9 &wrap( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = Decimal9(buffer, offset, bufferLength, actingVersion); - } + Decimal9 &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = Decimal9(buffer, offset, bufferLength, actingVersion); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - encodedLength() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SBE_NODISCARD static const char * - mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mantissaSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t mantissaId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mantissaSinceVersion(); + return m_actingVersion >= mantissaSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mantissaEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mantissaEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT64; - } + static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT64; + } - static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT { - return -9223372036854775807L; - } + static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT + { + return INT64_C(-9223372036854775807); + } - static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT { - return 9223372036854775807L; - } + static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT + { + return INT64_C(9223372036854775807); + } - static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT { - std::int64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT + { + std::int64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - Decimal9 &mantissa(const std::int64_t value) SBE_NOEXCEPT { - std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); - return *this; - } + Decimal9 &mantissa(const std::int64_t value) SBE_NOEXCEPT + { + std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); + return *this; + } - SBE_NODISCARD static const char * - exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } + SBE_NODISCARD static const char *exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - exponentSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t exponentId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= exponentSinceVersion(); + return m_actingVersion >= exponentSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - exponentEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exponentEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } + static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } - static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT { - return (std::int8_t)-9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT + { + return static_cast(-9); + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &builder, Decimal9 writer) { - builder << '{'; - builder << R"("mantissa": )"; - builder << +writer.mantissa(); +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, Decimal9 writer) +{ + builder << '{'; + builder << R"("mantissa": )"; + builder << +writer.mantissa(); - builder << '}'; + builder << '}'; + + return builder; +} - return builder; - } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/Decimal9NULL.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/Decimal9NULL.h index 1090ee32b..83f3f96fe 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/Decimal9NULL.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/Decimal9NULL.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,210 +86,263 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class Decimal9NULL { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_actingVersion = 0; +class Decimal9NULL +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - Decimal9NULL() = default; + Decimal9NULL() = default; - Decimal9NULL( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_actingVersion(actingVersion) { - if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) { - throw std::runtime_error("buffer too short for flyweight [E107]"); - } - } + Decimal9NULL( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } - Decimal9NULL( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : Decimal9NULL(buffer, 0, bufferLength, actingVersion) {} + Decimal9NULL( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + Decimal9NULL(buffer, 0, bufferLength, actingVersion) + { + } - Decimal9NULL(char *buffer, const std::uint64_t bufferLength) - : Decimal9NULL(buffer, 0, bufferLength, sbeSchemaVersion()) {} + Decimal9NULL( + char *buffer, + const std::uint64_t bufferLength) : + Decimal9NULL(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } - Decimal9NULL &wrap( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = Decimal9NULL(buffer, offset, bufferLength, actingVersion); - } + Decimal9NULL &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = Decimal9NULL(buffer, offset, bufferLength, actingVersion); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - encodedLength() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SBE_NODISCARD static const char * - mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mantissaSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t mantissaId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mantissaSinceVersion(); + return m_actingVersion >= mantissaSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mantissaEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mantissaEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT { - return 9223372036854775807L; - } + static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT + { + return INT64_C(9223372036854775807); + } - static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT { - return -9223372036854775807L; - } + static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT + { + return INT64_C(-9223372036854775807); + } - static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT { - return 9223372036854775807L; - } + static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT + { + return INT64_C(9223372036854775807); + } - static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT { - std::int64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT + { + std::int64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - Decimal9NULL &mantissa(const std::int64_t value) SBE_NOEXCEPT { - std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); - return *this; - } + Decimal9NULL &mantissa(const std::int64_t value) SBE_NOEXCEPT + { + std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); + return *this; + } - SBE_NODISCARD static const char * - exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } + SBE_NODISCARD static const char *exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - exponentSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t exponentId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= exponentSinceVersion(); + return m_actingVersion >= exponentSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - exponentEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exponentEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } + static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } - static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT { - return (std::int8_t)-9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT + { + return static_cast(-9); + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &builder, Decimal9NULL writer) { - builder << '{'; - builder << R"("mantissa": )"; - builder << +writer.mantissa(); +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, Decimal9NULL writer) +{ + builder << '{'; + builder << R"("mantissa": )"; + builder << +writer.mantissa(); - builder << '}'; + builder << '}'; + + return builder; +} - return builder; - } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/DecimalQty.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/DecimalQty.h index 2f0664b58..ba707c96c 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/DecimalQty.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/DecimalQty.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,210 +86,263 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class DecimalQty { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_actingVersion = 0; +class DecimalQty +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - DecimalQty() = default; + DecimalQty() = default; - DecimalQty( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_actingVersion(actingVersion) { - if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 4) > m_bufferLength), false)) { - throw std::runtime_error("buffer too short for flyweight [E107]"); - } - } + DecimalQty( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 4) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } - DecimalQty( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : DecimalQty(buffer, 0, bufferLength, actingVersion) {} + DecimalQty( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + DecimalQty(buffer, 0, bufferLength, actingVersion) + { + } - DecimalQty(char *buffer, const std::uint64_t bufferLength) - : DecimalQty(buffer, 0, bufferLength, sbeSchemaVersion()) {} + DecimalQty( + char *buffer, + const std::uint64_t bufferLength) : + DecimalQty(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } - DecimalQty &wrap( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = DecimalQty(buffer, offset, bufferLength, actingVersion); - } + DecimalQty &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = DecimalQty(buffer, offset, bufferLength, actingVersion); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - encodedLength() SBE_NOEXCEPT { - return 4; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SBE_NODISCARD static const char * - mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mantissaSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t mantissaId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mantissaSinceVersion(); + return m_actingVersion >= mantissaSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mantissaEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mantissaEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::int32_t mantissaNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t mantissaNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t mantissaMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t mantissaMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t mantissaMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t mantissaMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t mantissa() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t mantissa() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - DecimalQty &mantissa(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); - return *this; - } + DecimalQty &mantissa(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char * - exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } + SBE_NODISCARD static const char *exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - exponentSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t exponentId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= exponentSinceVersion(); + return m_actingVersion >= exponentSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - exponentEncodingOffset() SBE_NOEXCEPT { - return 4; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exponentEncodingOffset() SBE_NOEXCEPT + { + return 4; + } - static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } + static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } - static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT { - return (std::int8_t)-4; - } + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT + { + return static_cast(-4); + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &builder, DecimalQty writer) { - builder << '{'; - builder << R"("mantissa": )"; - builder << +writer.mantissa(); +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, DecimalQty writer) +{ + builder << '{'; + builder << R"("mantissa": )"; + builder << +writer.mantissa(); - builder << '}'; + builder << '}'; + + return builder; +} - return builder; - } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/EventType.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/EventType.h index 8f236e274..5b0cce853 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/EventType.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/EventType.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,49 +86,51 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class EventType { - public: - enum Value { - Activation = (std::uint8_t)5, - LastEligibleTradeDate = (std::uint8_t)7, - NULL_VALUE = (std::uint8_t)255 - }; +class EventType +{ +public: + enum Value + { + Activation = static_cast(5), + LastEligibleTradeDate = static_cast(7), + NULL_VALUE = static_cast(255) + }; - static EventType::Value get(const std::uint8_t value) { - switch (value) { - case 5: - return Activation; - case 7: - return LastEligibleTradeDate; - case 255: - return NULL_VALUE; - } + static EventType::Value get(const std::uint8_t value) + { + switch (value) + { + case static_cast(5): return Activation; + case static_cast(7): return LastEligibleTradeDate; + case static_cast(255): return NULL_VALUE; + } - throw std::runtime_error("unknown value for enum EventType [E103]"); - } + throw std::runtime_error("unknown value for enum EventType [E103]"); + } - static const char *c_str(const EventType::Value value) { - switch (value) { - case Activation: - return "Activation"; - case LastEligibleTradeDate: - return "LastEligibleTradeDate"; - case NULL_VALUE: - return "NULL_VALUE"; - } + static const char *c_str(const EventType::Value value) + { + switch (value) + { + case Activation: return "Activation"; + case LastEligibleTradeDate: return "LastEligibleTradeDate"; + case NULL_VALUE: return "NULL_VALUE"; + } - throw std::runtime_error("unknown value for enum EventType [E103]:"); - } + throw std::runtime_error("unknown value for enum EventType [E103]:"); + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &os, EventType::Value m) { - return os << EventType::c_str(m); - } + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, EventType::Value m) + { + return os << EventType::c_str(m); + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/FLOAT.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/FLOAT.h index 02626b478..1692bcbfa 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/FLOAT.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/FLOAT.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,210 +86,263 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class FLOAT { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_actingVersion = 0; +class FLOAT +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - FLOAT() = default; + FLOAT() = default; - FLOAT( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_actingVersion(actingVersion) { - if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) { - throw std::runtime_error("buffer too short for flyweight [E107]"); - } - } + FLOAT( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } - FLOAT( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : FLOAT(buffer, 0, bufferLength, actingVersion) {} + FLOAT( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + FLOAT(buffer, 0, bufferLength, actingVersion) + { + } - FLOAT(char *buffer, const std::uint64_t bufferLength) - : FLOAT(buffer, 0, bufferLength, sbeSchemaVersion()) {} + FLOAT( + char *buffer, + const std::uint64_t bufferLength) : + FLOAT(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } - FLOAT &wrap( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = FLOAT(buffer, offset, bufferLength, actingVersion); - } + FLOAT &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = FLOAT(buffer, offset, bufferLength, actingVersion); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - encodedLength() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SBE_NODISCARD static const char * - mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mantissaSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t mantissaId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mantissaSinceVersion(); + return m_actingVersion >= mantissaSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mantissaEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mantissaEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT64; - } + static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT64; + } - static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT { - return -9223372036854775807L; - } + static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT + { + return INT64_C(-9223372036854775807); + } - static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT { - return 9223372036854775807L; - } + static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT + { + return INT64_C(9223372036854775807); + } - static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT { - std::int64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT + { + std::int64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - FLOAT &mantissa(const std::int64_t value) SBE_NOEXCEPT { - std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); - return *this; - } + FLOAT &mantissa(const std::int64_t value) SBE_NOEXCEPT + { + std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); + return *this; + } - SBE_NODISCARD static const char * - exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } + SBE_NODISCARD static const char *exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - exponentSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t exponentId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= exponentSinceVersion(); + return m_actingVersion >= exponentSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - exponentEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exponentEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } + static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } - static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT { - return (std::int8_t)-7; - } + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT + { + return static_cast(-7); + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &builder, FLOAT writer) { - builder << '{'; - builder << R"("mantissa": )"; - builder << +writer.mantissa(); +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, FLOAT writer) +{ + builder << '{'; + builder << R"("mantissa": )"; + builder << +writer.mantissa(); - builder << '}'; + builder << '}'; + + return builder; +} - return builder; - } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/GroupSize.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/GroupSize.h index d0b3a8bd8..e7f9583f3 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/GroupSize.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/GroupSize.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,222 +86,276 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class GroupSize { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_actingVersion = 0; +class GroupSize +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - GroupSize() = default; + GroupSize() = default; - GroupSize( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_actingVersion(actingVersion) { - if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 3) > m_bufferLength), false)) { - throw std::runtime_error("buffer too short for flyweight [E107]"); - } - } + GroupSize( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 3) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } - GroupSize( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : GroupSize(buffer, 0, bufferLength, actingVersion) {} + GroupSize( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + GroupSize(buffer, 0, bufferLength, actingVersion) + { + } - GroupSize(char *buffer, const std::uint64_t bufferLength) - : GroupSize(buffer, 0, bufferLength, sbeSchemaVersion()) {} + GroupSize( + char *buffer, + const std::uint64_t bufferLength) : + GroupSize(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } - GroupSize &wrap( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = GroupSize(buffer, offset, bufferLength, actingVersion); - } + GroupSize &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = GroupSize(buffer, offset, bufferLength, actingVersion); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - encodedLength() SBE_NOEXCEPT { - return 3; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SBE_NODISCARD static const char * - blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - blockLengthSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t blockLengthId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool blockLengthInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t blockLengthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool blockLengthInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= blockLengthSinceVersion(); + return m_actingVersion >= blockLengthSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - blockLengthEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t blockLengthEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint16_t blockLengthNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT16; - } + static SBE_CONSTEXPR std::uint16_t blockLengthNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } - static SBE_CONSTEXPR std::uint16_t blockLengthMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t blockLengthMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t blockLengthMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t blockLengthMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t blockLengthEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t blockLengthEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t blockLength() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::uint16_t blockLength() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - GroupSize &blockLength(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint16_t)); - return *this; - } + GroupSize &blockLength(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint16_t)); + return *this; + } - SBE_NODISCARD static const char * - numInGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *numInGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - numInGroupSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t numInGroupId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool numInGroupInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t numInGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool numInGroupInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= numInGroupSinceVersion(); + return m_actingVersion >= numInGroupSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - numInGroupEncodingOffset() SBE_NOEXCEPT { - return 2; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t numInGroupEncodingOffset() SBE_NOEXCEPT + { + return 2; + } - static SBE_CONSTEXPR std::uint8_t numInGroupNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT8; - } + static SBE_CONSTEXPR std::uint8_t numInGroupNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } - static SBE_CONSTEXPR std::uint8_t numInGroupMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t numInGroupMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t numInGroupMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t numInGroupMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t numInGroupEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t numInGroupEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t numInGroup() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 2, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t numInGroup() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 2, sizeof(std::uint8_t)); + return (val); + } - GroupSize &numInGroup(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 2, &val, sizeof(std::uint8_t)); - return *this; - } + GroupSize &numInGroup(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 2, &val, sizeof(std::uint8_t)); + return *this; + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &builder, GroupSize writer) { - builder << '{'; - builder << R"("blockLength": )"; - builder << +writer.blockLength(); +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, GroupSize writer) +{ + builder << '{'; + builder << R"("blockLength": )"; + builder << +writer.blockLength(); - builder << ", "; - builder << R"("numInGroup": )"; - builder << +writer.numInGroup(); + builder << ", "; + builder << R"("numInGroup": )"; + builder << +writer.numInGroup(); - builder << '}'; + builder << '}'; + + return builder; +} - return builder; - } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/GroupSize8Byte.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/GroupSize8Byte.h index a553bf4c8..967a6d0d8 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/GroupSize8Byte.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/GroupSize8Byte.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,223 +86,276 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class GroupSize8Byte { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_actingVersion = 0; +class GroupSize8Byte +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - GroupSize8Byte() = default; + GroupSize8Byte() = default; - GroupSize8Byte( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_actingVersion(actingVersion) { - if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) { - throw std::runtime_error("buffer too short for flyweight [E107]"); - } - } + GroupSize8Byte( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } - GroupSize8Byte( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : GroupSize8Byte(buffer, 0, bufferLength, actingVersion) {} + GroupSize8Byte( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + GroupSize8Byte(buffer, 0, bufferLength, actingVersion) + { + } - GroupSize8Byte(char *buffer, const std::uint64_t bufferLength) - : GroupSize8Byte(buffer, 0, bufferLength, sbeSchemaVersion()) {} + GroupSize8Byte( + char *buffer, + const std::uint64_t bufferLength) : + GroupSize8Byte(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } - GroupSize8Byte &wrap( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = - GroupSize8Byte(buffer, offset, bufferLength, actingVersion); - } + GroupSize8Byte &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = GroupSize8Byte(buffer, offset, bufferLength, actingVersion); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - encodedLength() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SBE_NODISCARD static const char * - blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - blockLengthSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t blockLengthId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool blockLengthInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t blockLengthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool blockLengthInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= blockLengthSinceVersion(); + return m_actingVersion >= blockLengthSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - blockLengthEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t blockLengthEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint16_t blockLengthNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT16; - } + static SBE_CONSTEXPR std::uint16_t blockLengthNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } - static SBE_CONSTEXPR std::uint16_t blockLengthMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t blockLengthMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t blockLengthMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t blockLengthMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t blockLengthEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t blockLengthEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t blockLength() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::uint16_t blockLength() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - GroupSize8Byte &blockLength(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint16_t)); - return *this; - } + GroupSize8Byte &blockLength(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint16_t)); + return *this; + } - SBE_NODISCARD static const char * - numInGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *numInGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - numInGroupSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t numInGroupId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool numInGroupInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t numInGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool numInGroupInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= numInGroupSinceVersion(); + return m_actingVersion >= numInGroupSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - numInGroupEncodingOffset() SBE_NOEXCEPT { - return 7; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t numInGroupEncodingOffset() SBE_NOEXCEPT + { + return 7; + } - static SBE_CONSTEXPR std::uint8_t numInGroupNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT8; - } + static SBE_CONSTEXPR std::uint8_t numInGroupNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } - static SBE_CONSTEXPR std::uint8_t numInGroupMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t numInGroupMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t numInGroupMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t numInGroupMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t numInGroupEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t numInGroupEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t numInGroup() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 7, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t numInGroup() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 7, sizeof(std::uint8_t)); + return (val); + } - GroupSize8Byte &numInGroup(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 7, &val, sizeof(std::uint8_t)); - return *this; - } + GroupSize8Byte &numInGroup(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 7, &val, sizeof(std::uint8_t)); + return *this; + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, GroupSize8Byte writer) { - builder << '{'; - builder << R"("blockLength": )"; - builder << +writer.blockLength(); +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, GroupSize8Byte writer) +{ + builder << '{'; + builder << R"("blockLength": )"; + builder << +writer.blockLength(); - builder << ", "; - builder << R"("numInGroup": )"; - builder << +writer.numInGroup(); + builder << ", "; + builder << R"("numInGroup": )"; + builder << +writer.numInGroup(); - builder << '}'; + builder << '}'; + + return builder; +} - return builder; - } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/HaltReason.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/HaltReason.h index b3433f540..67989d04e 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/HaltReason.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/HaltReason.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,74 +86,66 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class HaltReason { - public: - enum Value { - GroupSchedule = (std::uint8_t)0, - SurveillanceIntervention = (std::uint8_t)1, - MarketEvent = (std::uint8_t)2, - InstrumentActivation = (std::uint8_t)3, - InstrumentExpiration = (std::uint8_t)4, - Unknown = (std::uint8_t)5, - RecoveryInProcess = (std::uint8_t)6, - NULL_VALUE = (std::uint8_t)255 - }; +class HaltReason +{ +public: + enum Value + { + GroupSchedule = static_cast(0), + SurveillanceIntervention = static_cast(1), + MarketEvent = static_cast(2), + InstrumentActivation = static_cast(3), + InstrumentExpiration = static_cast(4), + Unknown = static_cast(5), + RecoveryInProcess = static_cast(6), + NULL_VALUE = static_cast(255) + }; - static HaltReason::Value get(const std::uint8_t value) { - switch (value) { - case 0: - return GroupSchedule; - case 1: - return SurveillanceIntervention; - case 2: - return MarketEvent; - case 3: - return InstrumentActivation; - case 4: - return InstrumentExpiration; - case 5: - return Unknown; - case 6: - return RecoveryInProcess; - case 255: - return NULL_VALUE; - } + static HaltReason::Value get(const std::uint8_t value) + { + switch (value) + { + case static_cast(0): return GroupSchedule; + case static_cast(1): return SurveillanceIntervention; + case static_cast(2): return MarketEvent; + case static_cast(3): return InstrumentActivation; + case static_cast(4): return InstrumentExpiration; + case static_cast(5): return Unknown; + case static_cast(6): return RecoveryInProcess; + case static_cast(255): return NULL_VALUE; + } - throw std::runtime_error("unknown value for enum HaltReason [E103]"); - } + throw std::runtime_error("unknown value for enum HaltReason [E103]"); + } - static const char *c_str(const HaltReason::Value value) { - switch (value) { - case GroupSchedule: - return "GroupSchedule"; - case SurveillanceIntervention: - return "SurveillanceIntervention"; - case MarketEvent: - return "MarketEvent"; - case InstrumentActivation: - return "InstrumentActivation"; - case InstrumentExpiration: - return "InstrumentExpiration"; - case Unknown: - return "Unknown"; - case RecoveryInProcess: - return "RecoveryInProcess"; - case NULL_VALUE: - return "NULL_VALUE"; - } + static const char *c_str(const HaltReason::Value value) + { + switch (value) + { + case GroupSchedule: return "GroupSchedule"; + case SurveillanceIntervention: return "SurveillanceIntervention"; + case MarketEvent: return "MarketEvent"; + case InstrumentActivation: return "InstrumentActivation"; + case InstrumentExpiration: return "InstrumentExpiration"; + case Unknown: return "Unknown"; + case RecoveryInProcess: return "RecoveryInProcess"; + case NULL_VALUE: return "NULL_VALUE"; + } - throw std::runtime_error("unknown value for enum HaltReason [E103]:"); - } + throw std::runtime_error("unknown value for enum HaltReason [E103]:"); + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &os, HaltReason::Value m) { - return os << HaltReason::c_str(m); - } + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, HaltReason::Value m) + { + return os << HaltReason::c_str(m); + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/InstAttribValue.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/InstAttribValue.h index 9bbc77ddd..e9b8007c0 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/InstAttribValue.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/InstAttribValue.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,893 +86,928 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class InstAttribValue { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_actingVersion = 0; - - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; - - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; - - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; - - InstAttribValue() = default; - - InstAttribValue( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_actingVersion(actingVersion) { - if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 4) > m_bufferLength), false)) { - throw std::runtime_error("buffer too short for flyweight [E107]"); - } - } - - InstAttribValue( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : InstAttribValue(buffer, 0, bufferLength, actingVersion) {} - - InstAttribValue(char *buffer, const std::uint64_t bufferLength) - : InstAttribValue(buffer, 0, bufferLength, sbeSchemaVersion()) {} - - InstAttribValue &wrap( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = - InstAttribValue(buffer, offset, bufferLength, actingVersion); - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - encodedLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } - - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } - - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } - - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } - - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } - - InstAttribValue &clear() { - std::uint32_t zero = 0; - std::memcpy(m_buffer + m_offset, &zero, sizeof(std::uint32_t)); - return *this; - } - - SBE_NODISCARD bool isEmpty() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return 0 == val; - } - - SBE_NODISCARD std::uint32_t rawValue() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return val; - } - - InstAttribValue &rawValue(std::uint32_t value) { - std::memcpy(m_buffer + m_offset, &value, sizeof(std::uint32_t)); - return *this; - } - - static bool electronicMatchEligible(const std::uint32_t bits) { - return (bits & (1u << 0u)) != 0; - } - - static std::uint32_t - electronicMatchEligible(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 0u)) - : static_cast(bits & ~(1u << 0u)); - } - - SBE_NODISCARD bool electronicMatchEligible() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 0u)) != 0; - } - - InstAttribValue &electronicMatchEligible(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 0u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 0u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool orderCrossEligible(const std::uint32_t bits) { - return (bits & (1u << 1u)) != 0; - } - - static std::uint32_t - orderCrossEligible(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 1u)) - : static_cast(bits & ~(1u << 1u)); - } - - SBE_NODISCARD bool orderCrossEligible() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 1u)) != 0; - } - - InstAttribValue &orderCrossEligible(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 1u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 1u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool blockTradeEligible(const std::uint32_t bits) { - return (bits & (1u << 2u)) != 0; - } - - static std::uint32_t - blockTradeEligible(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 2u)) - : static_cast(bits & ~(1u << 2u)); - } - - SBE_NODISCARD bool blockTradeEligible() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 2u)) != 0; - } - - InstAttribValue &blockTradeEligible(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 2u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 2u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool eFPEligible(const std::uint32_t bits) { - return (bits & (1u << 3u)) != 0; - } - - static std::uint32_t - eFPEligible(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 3u)) - : static_cast(bits & ~(1u << 3u)); - } - - SBE_NODISCARD bool eFPEligible() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 3u)) != 0; - } - - InstAttribValue &eFPEligible(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 3u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 3u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool eBFEligible(const std::uint32_t bits) { - return (bits & (1u << 4u)) != 0; - } - - static std::uint32_t - eBFEligible(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 4u)) - : static_cast(bits & ~(1u << 4u)); - } - - SBE_NODISCARD bool eBFEligible() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 4u)) != 0; - } - - InstAttribValue &eBFEligible(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 4u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 4u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool eFSEligible(const std::uint32_t bits) { - return (bits & (1u << 5u)) != 0; - } - - static std::uint32_t - eFSEligible(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 5u)) - : static_cast(bits & ~(1u << 5u)); - } - - SBE_NODISCARD bool eFSEligible() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 5u)) != 0; - } - - InstAttribValue &eFSEligible(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 5u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 5u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool eFREligible(const std::uint32_t bits) { - return (bits & (1u << 6u)) != 0; - } - - static std::uint32_t - eFREligible(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 6u)) - : static_cast(bits & ~(1u << 6u)); - } - - SBE_NODISCARD bool eFREligible() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 6u)) != 0; - } - - InstAttribValue &eFREligible(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 6u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 6u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool oTCEligible(const std::uint32_t bits) { - return (bits & (1u << 7u)) != 0; - } - - static std::uint32_t - oTCEligible(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 7u)) - : static_cast(bits & ~(1u << 7u)); - } - - SBE_NODISCARD bool oTCEligible() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 7u)) != 0; - } - - InstAttribValue &oTCEligible(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 7u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 7u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool iLinkIndicativeMassQuotingEligible(const std::uint32_t bits) { - return (bits & (1u << 8u)) != 0; - } - - static std::uint32_t iLinkIndicativeMassQuotingEligible( - const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 8u)) - : static_cast(bits & ~(1u << 8u)); - } - - SBE_NODISCARD bool iLinkIndicativeMassQuotingEligible() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 8u)) != 0; - } - - InstAttribValue &iLinkIndicativeMassQuotingEligible(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 8u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 8u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool negativeStrikeEligible(const std::uint32_t bits) { - return (bits & (1u << 9u)) != 0; - } - - static std::uint32_t - negativeStrikeEligible(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 9u)) - : static_cast(bits & ~(1u << 9u)); - } - - SBE_NODISCARD bool negativeStrikeEligible() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 9u)) != 0; - } - - InstAttribValue &negativeStrikeEligible(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 9u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 9u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool negativePriceOutrightEligible(const std::uint32_t bits) { - return (bits & (1u << 10u)) != 0; - } - - static std::uint32_t - negativePriceOutrightEligible(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 10u)) - : static_cast(bits & ~(1u << 10u)); - } - - SBE_NODISCARD bool negativePriceOutrightEligible() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 10u)) != 0; - } - - InstAttribValue &negativePriceOutrightEligible(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 10u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 10u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool isFractional(const std::uint32_t bits) { - return (bits & (1u << 11u)) != 0; - } - - static std::uint32_t - isFractional(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 11u)) - : static_cast(bits & ~(1u << 11u)); - } - - SBE_NODISCARD bool isFractional() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 11u)) != 0; - } - - InstAttribValue &isFractional(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 11u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 11u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool volatilityQuotedOption(const std::uint32_t bits) { - return (bits & (1u << 12u)) != 0; - } - - static std::uint32_t - volatilityQuotedOption(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 12u)) - : static_cast(bits & ~(1u << 12u)); - } - - SBE_NODISCARD bool volatilityQuotedOption() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 12u)) != 0; - } - - InstAttribValue &volatilityQuotedOption(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 12u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 12u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool rFQCrossEligible(const std::uint32_t bits) { - return (bits & (1u << 13u)) != 0; - } - - static std::uint32_t - rFQCrossEligible(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 13u)) - : static_cast(bits & ~(1u << 13u)); - } - - SBE_NODISCARD bool rFQCrossEligible() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 13u)) != 0; - } - - InstAttribValue &rFQCrossEligible(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 13u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 13u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool zeroPriceOutrightEligible(const std::uint32_t bits) { - return (bits & (1u << 14u)) != 0; - } - - static std::uint32_t - zeroPriceOutrightEligible(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 14u)) - : static_cast(bits & ~(1u << 14u)); - } - - SBE_NODISCARD bool zeroPriceOutrightEligible() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 14u)) != 0; - } - - InstAttribValue &zeroPriceOutrightEligible(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 14u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 14u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool decayingProductEligibility(const std::uint32_t bits) { - return (bits & (1u << 15u)) != 0; - } - - static std::uint32_t - decayingProductEligibility(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 15u)) - : static_cast(bits & ~(1u << 15u)); - } - - SBE_NODISCARD bool decayingProductEligibility() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 15u)) != 0; - } - - InstAttribValue &decayingProductEligibility(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 15u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 15u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool variableProductEligibility(const std::uint32_t bits) { - return (bits & (1u << 16u)) != 0; - } - - static std::uint32_t - variableProductEligibility(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 16u)) - : static_cast(bits & ~(1u << 16u)); - } - - SBE_NODISCARD bool variableProductEligibility() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 16u)) != 0; - } - - InstAttribValue &variableProductEligibility(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 16u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 16u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool dailyProductEligibility(const std::uint32_t bits) { - return (bits & (1u << 17u)) != 0; - } - - static std::uint32_t - dailyProductEligibility(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 17u)) - : static_cast(bits & ~(1u << 17u)); - } - - SBE_NODISCARD bool dailyProductEligibility() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 17u)) != 0; - } - - InstAttribValue &dailyProductEligibility(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 17u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 17u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool gTOrdersEligibility(const std::uint32_t bits) { - return (bits & (1u << 18u)) != 0; - } - - static std::uint32_t - gTOrdersEligibility(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 18u)) - : static_cast(bits & ~(1u << 18u)); - } - - SBE_NODISCARD bool gTOrdersEligibility() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 18u)) != 0; - } - - InstAttribValue &gTOrdersEligibility(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 18u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 18u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool impliedMatchingEligibility(const std::uint32_t bits) { - return (bits & (1u << 19u)) != 0; - } - - static std::uint32_t - impliedMatchingEligibility(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 19u)) - : static_cast(bits & ~(1u << 19u)); - } - - SBE_NODISCARD bool impliedMatchingEligibility() const { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 19u)) != 0; - } - - InstAttribValue &impliedMatchingEligibility(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 19u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 19u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool triangulationEligible(const std::uint32_t bits) { - return (bits & (1u << 20u)) != 0; - } - - static std::uint32_t - triangulationEligible(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 20u)) - : static_cast(bits & ~(1u << 20u)); - } - - SBE_NODISCARD bool triangulationEligible() const { - if (m_actingVersion < 9) { - return false; - } - - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 20u)) != 0; - } - - InstAttribValue &triangulationEligible(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 20u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 20u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - static bool variableCabEligible(const std::uint32_t bits) { - return (bits & (1u << 21u)) != 0; - } - - static std::uint32_t - variableCabEligible(const std::uint32_t bits, const bool value) { - return value ? static_cast(bits | (1u << 21u)) - : static_cast(bits & ~(1u << 21u)); - } - - SBE_NODISCARD bool variableCabEligible() const { - if (m_actingVersion < 9) { - return false; - } - - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); - return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (1u << 21u)) != 0; - } - - InstAttribValue &variableCabEligible(const bool value) { - std::uint32_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); - bits = SBE_LITTLE_ENDIAN_ENCODE_32( - value ? static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (1u << 21u)) - : static_cast( - SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(1u << 21u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, InstAttribValue writer) { - builder << '['; - bool atLeastOne = false; - if (writer.electronicMatchEligible()) { - builder << R"("electronicMatchEligible")"; - atLeastOne = true; - } - if (writer.orderCrossEligible()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("orderCrossEligible")"; - atLeastOne = true; - } - if (writer.blockTradeEligible()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("blockTradeEligible")"; - atLeastOne = true; - } - if (writer.eFPEligible()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("eFPEligible")"; - atLeastOne = true; - } - if (writer.eBFEligible()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("eBFEligible")"; - atLeastOne = true; - } - if (writer.eFSEligible()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("eFSEligible")"; - atLeastOne = true; - } - if (writer.eFREligible()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("eFREligible")"; - atLeastOne = true; - } - if (writer.oTCEligible()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("oTCEligible")"; - atLeastOne = true; - } - if (writer.iLinkIndicativeMassQuotingEligible()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("iLinkIndicativeMassQuotingEligible")"; - atLeastOne = true; - } - if (writer.negativeStrikeEligible()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("negativeStrikeEligible")"; - atLeastOne = true; - } - if (writer.negativePriceOutrightEligible()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("negativePriceOutrightEligible")"; - atLeastOne = true; - } - if (writer.isFractional()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("isFractional")"; - atLeastOne = true; - } - if (writer.volatilityQuotedOption()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("volatilityQuotedOption")"; - atLeastOne = true; - } - if (writer.rFQCrossEligible()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("rFQCrossEligible")"; - atLeastOne = true; - } - if (writer.zeroPriceOutrightEligible()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("zeroPriceOutrightEligible")"; - atLeastOne = true; - } - if (writer.decayingProductEligibility()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("decayingProductEligibility")"; - atLeastOne = true; - } - if (writer.variableProductEligibility()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("variableProductEligibility")"; - atLeastOne = true; - } - if (writer.dailyProductEligibility()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("dailyProductEligibility")"; - atLeastOne = true; - } - if (writer.gTOrdersEligibility()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("gTOrdersEligibility")"; - atLeastOne = true; - } - if (writer.impliedMatchingEligibility()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("impliedMatchingEligibility")"; - atLeastOne = true; - } - if (writer.triangulationEligible()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("triangulationEligible")"; - atLeastOne = true; - } - if (writer.variableCabEligible()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("variableCabEligible")"; - } - builder << ']'; - return builder; - } +class InstAttribValue +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; + +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; + + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; + + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; + + InstAttribValue() = default; + + InstAttribValue( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 4) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } + + InstAttribValue( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + InstAttribValue(buffer, 0, bufferLength, actingVersion) + { + } + + InstAttribValue( + char *buffer, + const std::uint64_t bufferLength) : + InstAttribValue(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } + + InstAttribValue &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = InstAttribValue(buffer, offset, bufferLength, actingVersion); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } + + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } + + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } + + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } + + InstAttribValue &clear() + { + std::uint32_t zero = 0; + std::memcpy(m_buffer + m_offset, &zero, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD bool isEmpty() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return 0 == val; + } + + SBE_NODISCARD std::uint32_t rawValue() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return val; + } + + InstAttribValue &rawValue(std::uint32_t value) + { + std::memcpy(m_buffer + m_offset, &value, sizeof(std::uint32_t)); + return *this; + } + + static bool electronicMatchEligible(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 0u)) != 0; + } + + static std::uint32_t electronicMatchEligible(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 0u)) : static_cast(bits & ~(UINT32_C(0x1) << 0u)); + } + + SBE_NODISCARD bool electronicMatchEligible() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 0u)) != 0; + } + + InstAttribValue &electronicMatchEligible(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 0u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 0u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool orderCrossEligible(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 1u)) != 0; + } + + static std::uint32_t orderCrossEligible(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 1u)) : static_cast(bits & ~(UINT32_C(0x1) << 1u)); + } + + SBE_NODISCARD bool orderCrossEligible() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 1u)) != 0; + } + + InstAttribValue &orderCrossEligible(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 1u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 1u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool blockTradeEligible(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 2u)) != 0; + } + + static std::uint32_t blockTradeEligible(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 2u)) : static_cast(bits & ~(UINT32_C(0x1) << 2u)); + } + + SBE_NODISCARD bool blockTradeEligible() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 2u)) != 0; + } + + InstAttribValue &blockTradeEligible(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 2u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 2u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool eFPEligible(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 3u)) != 0; + } + + static std::uint32_t eFPEligible(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 3u)) : static_cast(bits & ~(UINT32_C(0x1) << 3u)); + } + + SBE_NODISCARD bool eFPEligible() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 3u)) != 0; + } + + InstAttribValue &eFPEligible(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 3u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 3u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool eBFEligible(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 4u)) != 0; + } + + static std::uint32_t eBFEligible(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 4u)) : static_cast(bits & ~(UINT32_C(0x1) << 4u)); + } + + SBE_NODISCARD bool eBFEligible() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 4u)) != 0; + } + + InstAttribValue &eBFEligible(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 4u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 4u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool eFSEligible(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 5u)) != 0; + } + + static std::uint32_t eFSEligible(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 5u)) : static_cast(bits & ~(UINT32_C(0x1) << 5u)); + } + + SBE_NODISCARD bool eFSEligible() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 5u)) != 0; + } + + InstAttribValue &eFSEligible(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 5u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 5u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool eFREligible(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 6u)) != 0; + } + + static std::uint32_t eFREligible(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 6u)) : static_cast(bits & ~(UINT32_C(0x1) << 6u)); + } + + SBE_NODISCARD bool eFREligible() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 6u)) != 0; + } + + InstAttribValue &eFREligible(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 6u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 6u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool oTCEligible(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 7u)) != 0; + } + + static std::uint32_t oTCEligible(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 7u)) : static_cast(bits & ~(UINT32_C(0x1) << 7u)); + } + + SBE_NODISCARD bool oTCEligible() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 7u)) != 0; + } + + InstAttribValue &oTCEligible(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 7u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 7u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool iLinkIndicativeMassQuotingEligible(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 8u)) != 0; + } + + static std::uint32_t iLinkIndicativeMassQuotingEligible(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 8u)) : static_cast(bits & ~(UINT32_C(0x1) << 8u)); + } + + SBE_NODISCARD bool iLinkIndicativeMassQuotingEligible() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 8u)) != 0; + } + + InstAttribValue &iLinkIndicativeMassQuotingEligible(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 8u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 8u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool negativeStrikeEligible(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 9u)) != 0; + } + + static std::uint32_t negativeStrikeEligible(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 9u)) : static_cast(bits & ~(UINT32_C(0x1) << 9u)); + } + + SBE_NODISCARD bool negativeStrikeEligible() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 9u)) != 0; + } + + InstAttribValue &negativeStrikeEligible(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 9u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 9u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool negativePriceOutrightEligible(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 10u)) != 0; + } + + static std::uint32_t negativePriceOutrightEligible(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 10u)) : static_cast(bits & ~(UINT32_C(0x1) << 10u)); + } + + SBE_NODISCARD bool negativePriceOutrightEligible() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 10u)) != 0; + } + + InstAttribValue &negativePriceOutrightEligible(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 10u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 10u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool isFractional(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 11u)) != 0; + } + + static std::uint32_t isFractional(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 11u)) : static_cast(bits & ~(UINT32_C(0x1) << 11u)); + } + + SBE_NODISCARD bool isFractional() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 11u)) != 0; + } + + InstAttribValue &isFractional(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 11u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 11u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool volatilityQuotedOption(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 12u)) != 0; + } + + static std::uint32_t volatilityQuotedOption(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 12u)) : static_cast(bits & ~(UINT32_C(0x1) << 12u)); + } + + SBE_NODISCARD bool volatilityQuotedOption() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 12u)) != 0; + } + + InstAttribValue &volatilityQuotedOption(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 12u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 12u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool rFQCrossEligible(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 13u)) != 0; + } + + static std::uint32_t rFQCrossEligible(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 13u)) : static_cast(bits & ~(UINT32_C(0x1) << 13u)); + } + + SBE_NODISCARD bool rFQCrossEligible() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 13u)) != 0; + } + + InstAttribValue &rFQCrossEligible(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 13u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 13u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool zeroPriceOutrightEligible(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 14u)) != 0; + } + + static std::uint32_t zeroPriceOutrightEligible(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 14u)) : static_cast(bits & ~(UINT32_C(0x1) << 14u)); + } + + SBE_NODISCARD bool zeroPriceOutrightEligible() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 14u)) != 0; + } + + InstAttribValue &zeroPriceOutrightEligible(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 14u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 14u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool decayingProductEligibility(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 15u)) != 0; + } + + static std::uint32_t decayingProductEligibility(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 15u)) : static_cast(bits & ~(UINT32_C(0x1) << 15u)); + } + + SBE_NODISCARD bool decayingProductEligibility() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 15u)) != 0; + } + + InstAttribValue &decayingProductEligibility(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 15u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 15u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool variableProductEligibility(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 16u)) != 0; + } + + static std::uint32_t variableProductEligibility(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 16u)) : static_cast(bits & ~(UINT32_C(0x1) << 16u)); + } + + SBE_NODISCARD bool variableProductEligibility() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 16u)) != 0; + } + + InstAttribValue &variableProductEligibility(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 16u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 16u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool dailyProductEligibility(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 17u)) != 0; + } + + static std::uint32_t dailyProductEligibility(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 17u)) : static_cast(bits & ~(UINT32_C(0x1) << 17u)); + } + + SBE_NODISCARD bool dailyProductEligibility() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 17u)) != 0; + } + + InstAttribValue &dailyProductEligibility(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 17u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 17u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool gTOrdersEligibility(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 18u)) != 0; + } + + static std::uint32_t gTOrdersEligibility(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 18u)) : static_cast(bits & ~(UINT32_C(0x1) << 18u)); + } + + SBE_NODISCARD bool gTOrdersEligibility() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 18u)) != 0; + } + + InstAttribValue &gTOrdersEligibility(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 18u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 18u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool impliedMatchingEligibility(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 19u)) != 0; + } + + static std::uint32_t impliedMatchingEligibility(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 19u)) : static_cast(bits & ~(UINT32_C(0x1) << 19u)); + } + + SBE_NODISCARD bool impliedMatchingEligibility() const + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 19u)) != 0; + } + + InstAttribValue &impliedMatchingEligibility(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 19u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 19u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool triangulationEligible(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 20u)) != 0; + } + + static std::uint32_t triangulationEligible(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 20u)) : static_cast(bits & ~(UINT32_C(0x1) << 20u)); + } + + SBE_NODISCARD bool triangulationEligible() const + { + if (m_actingVersion < 9) + { + return false; + } + + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 20u)) != 0; + } + + InstAttribValue &triangulationEligible(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 20u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 20u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + static bool variableCabEligible(const std::uint32_t bits) + { + return (bits & (UINT32_C(0x1) << 21u)) != 0; + } + + static std::uint32_t variableCabEligible(const std::uint32_t bits, const bool value) + { + return value ? static_cast(bits | (UINT32_C(0x1) << 21u)) : static_cast(bits & ~(UINT32_C(0x1) << 21u)); + } + + SBE_NODISCARD bool variableCabEligible() const + { + if (m_actingVersion < 9) + { + return false; + } + + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint32_t)); + return (SBE_LITTLE_ENDIAN_ENCODE_32(val) & (UINT32_C(0x1) << 21u)) != 0; + } + + InstAttribValue &variableCabEligible(const bool value) + { + std::uint32_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint32_t)); + bits = SBE_LITTLE_ENDIAN_ENCODE_32(value ? static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) | (UINT32_C(0x1) << 21u)) : static_cast(SBE_LITTLE_ENDIAN_ENCODE_32(bits) & ~(UINT32_C(0x1) << 21u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint32_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, InstAttribValue writer) + { + builder << '['; + bool atLeastOne = false; + if (writer.electronicMatchEligible()) + { + builder << R"("electronicMatchEligible")"; + atLeastOne = true; + } + if (writer.orderCrossEligible()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("orderCrossEligible")"; + atLeastOne = true; + } + if (writer.blockTradeEligible()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("blockTradeEligible")"; + atLeastOne = true; + } + if (writer.eFPEligible()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("eFPEligible")"; + atLeastOne = true; + } + if (writer.eBFEligible()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("eBFEligible")"; + atLeastOne = true; + } + if (writer.eFSEligible()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("eFSEligible")"; + atLeastOne = true; + } + if (writer.eFREligible()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("eFREligible")"; + atLeastOne = true; + } + if (writer.oTCEligible()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("oTCEligible")"; + atLeastOne = true; + } + if (writer.iLinkIndicativeMassQuotingEligible()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("iLinkIndicativeMassQuotingEligible")"; + atLeastOne = true; + } + if (writer.negativeStrikeEligible()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("negativeStrikeEligible")"; + atLeastOne = true; + } + if (writer.negativePriceOutrightEligible()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("negativePriceOutrightEligible")"; + atLeastOne = true; + } + if (writer.isFractional()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("isFractional")"; + atLeastOne = true; + } + if (writer.volatilityQuotedOption()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("volatilityQuotedOption")"; + atLeastOne = true; + } + if (writer.rFQCrossEligible()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("rFQCrossEligible")"; + atLeastOne = true; + } + if (writer.zeroPriceOutrightEligible()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("zeroPriceOutrightEligible")"; + atLeastOne = true; + } + if (writer.decayingProductEligibility()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("decayingProductEligibility")"; + atLeastOne = true; + } + if (writer.variableProductEligibility()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("variableProductEligibility")"; + atLeastOne = true; + } + if (writer.dailyProductEligibility()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("dailyProductEligibility")"; + atLeastOne = true; + } + if (writer.gTOrdersEligibility()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("gTOrdersEligibility")"; + atLeastOne = true; + } + if (writer.impliedMatchingEligibility()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("impliedMatchingEligibility")"; + atLeastOne = true; + } + if (writer.triangulationEligible()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("triangulationEligible")"; + atLeastOne = true; + } + if (writer.variableCabEligible()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("variableCabEligible")"; + } + builder << ']'; + return builder; + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/LegSide.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/LegSide.h index 128b6ec03..755014faa 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/LegSide.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/LegSide.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,49 +86,51 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class LegSide { - public: - enum Value { - BuySide = (std::uint8_t)1, - SellSide = (std::uint8_t)2, - NULL_VALUE = (std::uint8_t)255 - }; +class LegSide +{ +public: + enum Value + { + BuySide = static_cast(1), + SellSide = static_cast(2), + NULL_VALUE = static_cast(255) + }; - static LegSide::Value get(const std::uint8_t value) { - switch (value) { - case 1: - return BuySide; - case 2: - return SellSide; - case 255: - return NULL_VALUE; - } + static LegSide::Value get(const std::uint8_t value) + { + switch (value) + { + case static_cast(1): return BuySide; + case static_cast(2): return SellSide; + case static_cast(255): return NULL_VALUE; + } - throw std::runtime_error("unknown value for enum LegSide [E103]"); - } + throw std::runtime_error("unknown value for enum LegSide [E103]"); + } - static const char *c_str(const LegSide::Value value) { - switch (value) { - case BuySide: - return "BuySide"; - case SellSide: - return "SellSide"; - case NULL_VALUE: - return "NULL_VALUE"; - } + static const char *c_str(const LegSide::Value value) + { + switch (value) + { + case BuySide: return "BuySide"; + case SellSide: return "SellSide"; + case NULL_VALUE: return "NULL_VALUE"; + } - throw std::runtime_error("unknown value for enum LegSide [E103]:"); - } + throw std::runtime_error("unknown value for enum LegSide [E103]:"); + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &os, LegSide::Value m) { - return os << LegSide::c_str(m); - } + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, LegSide::Value m) + { + return os << LegSide::c_str(m); + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDEntryType.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDEntryType.h index 881a3f9be..7df78d7a6 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDEntryType.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDEntryType.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,124 +86,96 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class MDEntryType { - public: - enum Value { - Bid = (char)48, - Offer = (char)49, - Trade = (char)50, - OpenPrice = (char)52, - SettlementPrice = (char)54, - TradingSessionHighPrice = (char)55, - TradingSessionLowPrice = (char)56, - ClearedVolume = (char)66, - OpenInterest = (char)67, - ImpliedBid = (char)69, - ImpliedOffer = (char)70, - BookReset = (char)74, - SessionHighBid = (char)78, - SessionLowOffer = (char)79, - FixingPrice = (char)87, - ElectronicVolume = (char)101, - ThresholdLimitsandPriceBandVariation = (char)103, - NULL_VALUE = (char)0 - }; +class MDEntryType +{ +public: + enum Value + { + Bid = static_cast(48), + Offer = static_cast(49), + Trade = static_cast(50), + OpenPrice = static_cast(52), + SettlementPrice = static_cast(54), + TradingSessionHighPrice = static_cast(55), + TradingSessionLowPrice = static_cast(56), + ClearedVolume = static_cast(66), + OpenInterest = static_cast(67), + ImpliedBid = static_cast(69), + ImpliedOffer = static_cast(70), + BookReset = static_cast(74), + SessionHighBid = static_cast(78), + SessionLowOffer = static_cast(79), + FixingPrice = static_cast(87), + ElectronicVolume = static_cast(101), + ThresholdLimitsandPriceBandVariation = static_cast(103), + NULL_VALUE = static_cast(0) + }; - static MDEntryType::Value get(const char value) { - switch (value) { - case 48: - return Bid; - case 49: - return Offer; - case 50: - return Trade; - case 52: - return OpenPrice; - case 54: - return SettlementPrice; - case 55: - return TradingSessionHighPrice; - case 56: - return TradingSessionLowPrice; - case 66: - return ClearedVolume; - case 67: - return OpenInterest; - case 69: - return ImpliedBid; - case 70: - return ImpliedOffer; - case 74: - return BookReset; - case 78: - return SessionHighBid; - case 79: - return SessionLowOffer; - case 87: - return FixingPrice; - case 101: - return ElectronicVolume; - case 103: - return ThresholdLimitsandPriceBandVariation; - case 0: - return NULL_VALUE; - } + static MDEntryType::Value get(const char value) + { + switch (value) + { + case static_cast(48): return Bid; + case static_cast(49): return Offer; + case static_cast(50): return Trade; + case static_cast(52): return OpenPrice; + case static_cast(54): return SettlementPrice; + case static_cast(55): return TradingSessionHighPrice; + case static_cast(56): return TradingSessionLowPrice; + case static_cast(66): return ClearedVolume; + case static_cast(67): return OpenInterest; + case static_cast(69): return ImpliedBid; + case static_cast(70): return ImpliedOffer; + case static_cast(74): return BookReset; + case static_cast(78): return SessionHighBid; + case static_cast(79): return SessionLowOffer; + case static_cast(87): return FixingPrice; + case static_cast(101): return ElectronicVolume; + case static_cast(103): return ThresholdLimitsandPriceBandVariation; + case static_cast(0): return NULL_VALUE; + } - throw std::runtime_error("unknown value for enum MDEntryType [E103]"); - } + throw std::runtime_error("unknown value for enum MDEntryType [E103]"); + } - static const char *c_str(const MDEntryType::Value value) { - switch (value) { - case Bid: - return "Bid"; - case Offer: - return "Offer"; - case Trade: - return "Trade"; - case OpenPrice: - return "OpenPrice"; - case SettlementPrice: - return "SettlementPrice"; - case TradingSessionHighPrice: - return "TradingSessionHighPrice"; - case TradingSessionLowPrice: - return "TradingSessionLowPrice"; - case ClearedVolume: - return "ClearedVolume"; - case OpenInterest: - return "OpenInterest"; - case ImpliedBid: - return "ImpliedBid"; - case ImpliedOffer: - return "ImpliedOffer"; - case BookReset: - return "BookReset"; - case SessionHighBid: - return "SessionHighBid"; - case SessionLowOffer: - return "SessionLowOffer"; - case FixingPrice: - return "FixingPrice"; - case ElectronicVolume: - return "ElectronicVolume"; - case ThresholdLimitsandPriceBandVariation: - return "ThresholdLimitsandPriceBandVariation"; - case NULL_VALUE: - return "NULL_VALUE"; - } + static const char *c_str(const MDEntryType::Value value) + { + switch (value) + { + case Bid: return "Bid"; + case Offer: return "Offer"; + case Trade: return "Trade"; + case OpenPrice: return "OpenPrice"; + case SettlementPrice: return "SettlementPrice"; + case TradingSessionHighPrice: return "TradingSessionHighPrice"; + case TradingSessionLowPrice: return "TradingSessionLowPrice"; + case ClearedVolume: return "ClearedVolume"; + case OpenInterest: return "OpenInterest"; + case ImpliedBid: return "ImpliedBid"; + case ImpliedOffer: return "ImpliedOffer"; + case BookReset: return "BookReset"; + case SessionHighBid: return "SessionHighBid"; + case SessionLowOffer: return "SessionLowOffer"; + case FixingPrice: return "FixingPrice"; + case ElectronicVolume: return "ElectronicVolume"; + case ThresholdLimitsandPriceBandVariation: return "ThresholdLimitsandPriceBandVariation"; + case NULL_VALUE: return "NULL_VALUE"; + } - throw std::runtime_error("unknown value for enum MDEntryType [E103]:"); - } + throw std::runtime_error("unknown value for enum MDEntryType [E103]:"); + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &os, MDEntryType::Value m) { - return os << MDEntryType::c_str(m); - } + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, MDEntryType::Value m) + { + return os << MDEntryType::c_str(m); + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDEntryTypeBook.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDEntryTypeBook.h index e0b36e97e..b6982ee43 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDEntryTypeBook.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDEntryTypeBook.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,65 +86,60 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class MDEntryTypeBook { - public: - enum Value { - Bid = (char)48, - Offer = (char)49, - ImpliedBid = (char)69, - ImpliedOffer = (char)70, - BookReset = (char)74, - NULL_VALUE = (char)0 - }; +class MDEntryTypeBook +{ +public: + enum Value + { + Bid = static_cast(48), + Offer = static_cast(49), + ImpliedBid = static_cast(69), + ImpliedOffer = static_cast(70), + BookReset = static_cast(74), + NULL_VALUE = static_cast(0) + }; - static MDEntryTypeBook::Value get(const char value) { - switch (value) { - case 48: - return Bid; - case 49: - return Offer; - case 69: - return ImpliedBid; - case 70: - return ImpliedOffer; - case 74: - return BookReset; - case 0: - return NULL_VALUE; - } + static MDEntryTypeBook::Value get(const char value) + { + switch (value) + { + case static_cast(48): return Bid; + case static_cast(49): return Offer; + case static_cast(69): return ImpliedBid; + case static_cast(70): return ImpliedOffer; + case static_cast(74): return BookReset; + case static_cast(0): return NULL_VALUE; + } - throw std::runtime_error("unknown value for enum MDEntryTypeBook [E103]"); - } + throw std::runtime_error("unknown value for enum MDEntryTypeBook [E103]"); + } - static const char *c_str(const MDEntryTypeBook::Value value) { - switch (value) { - case Bid: - return "Bid"; - case Offer: - return "Offer"; - case ImpliedBid: - return "ImpliedBid"; - case ImpliedOffer: - return "ImpliedOffer"; - case BookReset: - return "BookReset"; - case NULL_VALUE: - return "NULL_VALUE"; - } + static const char *c_str(const MDEntryTypeBook::Value value) + { + switch (value) + { + case Bid: return "Bid"; + case Offer: return "Offer"; + case ImpliedBid: return "ImpliedBid"; + case ImpliedOffer: return "ImpliedOffer"; + case BookReset: return "BookReset"; + case NULL_VALUE: return "NULL_VALUE"; + } - throw std::runtime_error( - "unknown value for enum MDEntryTypeBook [E103]:"); - } + throw std::runtime_error("unknown value for enum MDEntryTypeBook [E103]:"); + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &os, MDEntryTypeBook::Value m) { - return os << MDEntryTypeBook::c_str(m); - } + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, MDEntryTypeBook::Value m) + { + return os << MDEntryTypeBook::c_str(m); + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDEntryTypeDailyStatistics.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDEntryTypeDailyStatistics.h index a0a74d8fd..e621c1b57 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDEntryTypeDailyStatistics.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDEntryTypeDailyStatistics.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,62 +86,57 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class MDEntryTypeDailyStatistics { - public: - enum Value { - SettlementPrice = (char)54, - ClearedVolume = (char)66, - OpenInterest = (char)67, - FixingPrice = (char)87, - NULL_VALUE = (char)0 - }; +class MDEntryTypeDailyStatistics +{ +public: + enum Value + { + SettlementPrice = static_cast(54), + ClearedVolume = static_cast(66), + OpenInterest = static_cast(67), + FixingPrice = static_cast(87), + NULL_VALUE = static_cast(0) + }; - static MDEntryTypeDailyStatistics::Value get(const char value) { - switch (value) { - case 54: - return SettlementPrice; - case 66: - return ClearedVolume; - case 67: - return OpenInterest; - case 87: - return FixingPrice; - case 0: - return NULL_VALUE; - } + static MDEntryTypeDailyStatistics::Value get(const char value) + { + switch (value) + { + case static_cast(54): return SettlementPrice; + case static_cast(66): return ClearedVolume; + case static_cast(67): return OpenInterest; + case static_cast(87): return FixingPrice; + case static_cast(0): return NULL_VALUE; + } - throw std::runtime_error( - "unknown value for enum MDEntryTypeDailyStatistics [E103]"); - } + throw std::runtime_error("unknown value for enum MDEntryTypeDailyStatistics [E103]"); + } - static const char *c_str(const MDEntryTypeDailyStatistics::Value value) { - switch (value) { - case SettlementPrice: - return "SettlementPrice"; - case ClearedVolume: - return "ClearedVolume"; - case OpenInterest: - return "OpenInterest"; - case FixingPrice: - return "FixingPrice"; - case NULL_VALUE: - return "NULL_VALUE"; - } + static const char *c_str(const MDEntryTypeDailyStatistics::Value value) + { + switch (value) + { + case SettlementPrice: return "SettlementPrice"; + case ClearedVolume: return "ClearedVolume"; + case OpenInterest: return "OpenInterest"; + case FixingPrice: return "FixingPrice"; + case NULL_VALUE: return "NULL_VALUE"; + } - throw std::runtime_error( - "unknown value for enum MDEntryTypeDailyStatistics [E103]:"); - } + throw std::runtime_error("unknown value for enum MDEntryTypeDailyStatistics [E103]:"); + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &os, - MDEntryTypeDailyStatistics::Value m) { - return os << MDEntryTypeDailyStatistics::c_str(m); - } + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, MDEntryTypeDailyStatistics::Value m) + { + return os << MDEntryTypeDailyStatistics::c_str(m); + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDEntryTypeStatistics.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDEntryTypeStatistics.h index acdd8fbee..93d7ff037 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDEntryTypeStatistics.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDEntryTypeStatistics.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,66 +86,60 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class MDEntryTypeStatistics { - public: - enum Value { - OpenPrice = (char)52, - HighTrade = (char)55, - LowTrade = (char)56, - HighestBid = (char)78, - LowestOffer = (char)79, - NULL_VALUE = (char)0 - }; +class MDEntryTypeStatistics +{ +public: + enum Value + { + OpenPrice = static_cast(52), + HighTrade = static_cast(55), + LowTrade = static_cast(56), + HighestBid = static_cast(78), + LowestOffer = static_cast(79), + NULL_VALUE = static_cast(0) + }; - static MDEntryTypeStatistics::Value get(const char value) { - switch (value) { - case 52: - return OpenPrice; - case 55: - return HighTrade; - case 56: - return LowTrade; - case 78: - return HighestBid; - case 79: - return LowestOffer; - case 0: - return NULL_VALUE; - } + static MDEntryTypeStatistics::Value get(const char value) + { + switch (value) + { + case static_cast(52): return OpenPrice; + case static_cast(55): return HighTrade; + case static_cast(56): return LowTrade; + case static_cast(78): return HighestBid; + case static_cast(79): return LowestOffer; + case static_cast(0): return NULL_VALUE; + } - throw std::runtime_error( - "unknown value for enum MDEntryTypeStatistics [E103]"); - } + throw std::runtime_error("unknown value for enum MDEntryTypeStatistics [E103]"); + } - static const char *c_str(const MDEntryTypeStatistics::Value value) { - switch (value) { - case OpenPrice: - return "OpenPrice"; - case HighTrade: - return "HighTrade"; - case LowTrade: - return "LowTrade"; - case HighestBid: - return "HighestBid"; - case LowestOffer: - return "LowestOffer"; - case NULL_VALUE: - return "NULL_VALUE"; - } + static const char *c_str(const MDEntryTypeStatistics::Value value) + { + switch (value) + { + case OpenPrice: return "OpenPrice"; + case HighTrade: return "HighTrade"; + case LowTrade: return "LowTrade"; + case HighestBid: return "HighestBid"; + case LowestOffer: return "LowestOffer"; + case NULL_VALUE: return "NULL_VALUE"; + } - throw std::runtime_error( - "unknown value for enum MDEntryTypeStatistics [E103]:"); - } + throw std::runtime_error("unknown value for enum MDEntryTypeStatistics [E103]:"); + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &os, MDEntryTypeStatistics::Value m) { - return os << MDEntryTypeStatistics::c_str(m); - } + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, MDEntryTypeStatistics::Value m) + { + return os << MDEntryTypeStatistics::c_str(m); + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshBook32.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshBook32.h index cba7e8b8a..a7e0ad62b 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshBook32.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshBook32.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,1576 +86,1824 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDIncrementalRefreshBook32 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDIncrementalRefreshBook32 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(11); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(32); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDIncrementalRefreshBook32() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDIncrementalRefreshBook32( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDIncrementalRefreshBook32(char *buffer, const std::uint64_t bufferLength) - : MDIncrementalRefreshBook32( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDIncrementalRefreshBook32() = default; - MDIncrementalRefreshBook32( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDIncrementalRefreshBook32( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDIncrementalRefreshBook32( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)11; - } + MDIncrementalRefreshBook32(char *buffer, const std::uint64_t bufferLength) : + MDIncrementalRefreshBook32(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)32; - } + MDIncrementalRefreshBook32( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDIncrementalRefreshBook32(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(11); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "X"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(32); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDIncrementalRefreshBook32 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshBook32( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDIncrementalRefreshBook32 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "X"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDIncrementalRefreshBook32( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDIncrementalRefreshBook32 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshBook32(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDIncrementalRefreshBook32 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshBook32( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDIncrementalRefreshBook32 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDIncrementalRefreshBook32( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDIncrementalRefreshBook32 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshBook32(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDIncrementalRefreshBook32 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() 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); + } - MDIncrementalRefreshBook32 & - transactTime(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; - } + MDIncrementalRefreshBook32 &transactTime(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 *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - class NoMDEntries { + class NoMDEntries + { 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; + 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; - } + 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 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) { + 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(32)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 32; + 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 32; + } + + 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 NoMDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT + { + return 270; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICENULL m_mDEntryPx; + +public: + SBE_NODISCARD PRICENULL &mDEntryPx() + { + m_mDEntryPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_mDEntryPx; + } + + SBE_NODISCARD static const char *MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT + { + return 271; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntrySizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntrySizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t mDEntrySize() 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); + } + + NoMDEntries &mDEntrySize(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 *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT + { + return 83; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t rptSeqSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= rptSeqSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t rptSeqEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *NumberOfOrdersMetaAttribute(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 numberOfOrdersId() SBE_NOEXCEPT + { + return 346; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t numberOfOrdersSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool numberOfOrdersInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= numberOfOrdersSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t numberOfOrdersEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t numberOfOrdersEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t numberOfOrders() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &numberOfOrders(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *MDPriceLevelMetaAttribute(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 mDPriceLevelId() SBE_NOEXCEPT + { + return 1023; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDPriceLevelSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDPriceLevelInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDPriceLevelSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDPriceLevelEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::uint8_t mDPriceLevelNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t mDPriceLevelMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t mDPriceLevelMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t mDPriceLevelEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t mDPriceLevel() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint8_t)); + return (val); + } + + NoMDEntries &mDPriceLevel(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MDUpdateActionMetaAttribute(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 mDUpdateActionId() SBE_NOEXCEPT + { + return 279; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDUpdateActionSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 25; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 25, sizeof(std::uint8_t)); + return MDUpdateAction::get((val)); + } + + NoMDEntries &mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 25, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 26; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDEntryTypeBook::Value mDEntryType() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 26, sizeof(char)); + return MDEntryTypeBook::get((val)); + } + + NoMDEntries &mDEntryType(const MDEntryTypeBook::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 26, &val, sizeof(char)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("MDEntryPx": )"; + builder << writer.mDEntryPx(); + + builder << ", "; + builder << R"("MDEntrySize": )"; + builder << +writer.mDEntrySize(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("RptSeq": )"; + builder << +writer.rptSeq(); + + builder << ", "; + builder << R"("NumberOfOrders": )"; + builder << +writer.numberOfOrders(); + + builder << ", "; + builder << R"("MDPriceLevel": )"; + builder << +writer.mDPriceLevel(); + + builder << ", "; + builder << R"("MDUpdateAction": )"; + builder << '"' << writer.mDUpdateAction() << '"'; + + builder << ", "; + builder << R"("MDEntryType": )"; + builder << '"' << writer.mDEntryType() << '"'; + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)32); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 32; - 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; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 32; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT { - return 270; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryPxSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDEntryPxSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryPxEncodingOffset() SBE_NOEXCEPT { - return 0; - } + } + class NoOrderIDEntries + { private: - PRICENULL m_mDEntryPx; + 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: - SBE_NODISCARD PRICENULL &mDEntryPx() { - m_mDEntryPx.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_mDEntryPx; - } - - SBE_NODISCARD static const char * - MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT { - return 271; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntrySizeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntrySizeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t mDEntrySize() 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); - } - - NoMDEntries &mDEntrySize(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 * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { - return 48; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= securityIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 12; - } - - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT { return 83; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - rptSeqSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= rptSeqSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - rptSeqEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT { - return 4294967294; - } - - static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); - return *this; - } - - SBE_NODISCARD static const char *NumberOfOrdersMetaAttribute( - 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 numberOfOrdersId() SBE_NOEXCEPT { - return 346; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - numberOfOrdersSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool numberOfOrdersInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= numberOfOrdersSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - numberOfOrdersEncodingOffset() SBE_NOEXCEPT { - return 20; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - numberOfOrdersEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t numberOfOrders() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &numberOfOrders(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char *MDPriceLevelMetaAttribute( - 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 mDPriceLevelId() SBE_NOEXCEPT { - return 1023; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDPriceLevelSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDPriceLevelInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDPriceLevelSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDPriceLevelEncodingOffset() SBE_NOEXCEPT { - return 24; - } - - static SBE_CONSTEXPR std::uint8_t mDPriceLevelNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT8; - } - - static SBE_CONSTEXPR std::uint8_t mDPriceLevelMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } - - static SBE_CONSTEXPR std::uint8_t mDPriceLevelMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } - - static SBE_CONSTEXPR std::size_t - mDPriceLevelEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::uint8_t mDPriceLevel() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint8_t)); - return (val); - } - - NoMDEntries &mDPriceLevel(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char *MDUpdateActionMetaAttribute( - 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 mDUpdateActionId() SBE_NOEXCEPT { - return 279; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDUpdateActionSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 25; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 25, sizeof(std::uint8_t)); - return MDUpdateAction::get((val)); - } - - NoMDEntries & - mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 25, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 26; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDEntryTypeBook::Value mDEntryType() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 26, sizeof(char)); - return MDEntryTypeBook::get((val)); - } - - NoMDEntries & - mDEntryType(const MDEntryTypeBook::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 26, &val, sizeof(char)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("MDEntryPx": )"; - builder << writer.mDEntryPx(); - - builder << ", "; - builder << R"("MDEntrySize": )"; - builder << +writer.mDEntrySize(); - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("RptSeq": )"; - builder << +writer.rptSeq(); - - builder << ", "; - builder << R"("NumberOfOrders": )"; - builder << +writer.numberOfOrders(); - - builder << ", "; - builder << R"("MDPriceLevel": )"; - builder << +writer.mDPriceLevel(); - - builder << ", "; - builder << R"("MDUpdateAction": )"; - builder << '"' << writer.mDUpdateAction() << '"'; - - builder << ", "; - builder << R"("MDEntryType": )"; - builder << '"' << writer.mDEntryType() << '"'; - - builder << '}'; - - return builder; - } - }; - - private: - NoMDEntries m_noMDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } - - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoOrderIDEntries { - 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) { - GroupSize8Byte 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 + 8; - } - - inline void wrapForEncode( - char *buffer, - const std::uint8_t count, - std::uint64_t *pos, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize8Byte 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 + 8; + } + + 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; + GroupSize8Byte dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength(static_cast(24)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 24; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 8; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 24; + } + + 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 NoOrderIDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize8Byte dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *OrderIDMetaAttribute(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 orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoOrderIDEntries &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *MDOrderPriorityMetaAttribute(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 mDOrderPriorityId() SBE_NOEXCEPT + { + return 37707; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDOrderPrioritySinceVersion() SBE_NOEXCEPT + { + return 7; + } + + SBE_NODISCARD bool mDOrderPriorityInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDOrderPrioritySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDOrderPriorityEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityNullValue() SBE_NOEXCEPT + { + return UINT64_C(0xffffffffffffffff); + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t mDOrderPriorityEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t mDOrderPriority() const SBE_NOEXCEPT + { + if (m_actingVersion < 7) + { + return UINT64_C(0xffffffffffffffff); + } + + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoOrderIDEntries &mDOrderPriority(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *MDDisplayQtyMetaAttribute(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 mDDisplayQtyId() SBE_NOEXCEPT + { + return 37706; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDDisplayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDDisplayQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDDisplayQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDDisplayQtyEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t mDDisplayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t mDDisplayQty() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderIDEntries &mDDisplayQty(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *ReferenceIDMetaAttribute(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 referenceIDId() SBE_NOEXCEPT + { + return 9633; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t referenceIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool referenceIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= referenceIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t referenceIDEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint8_t referenceIDNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t referenceIDMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t referenceIDMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t referenceIDEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t referenceID() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint8_t)); + return (val); + } + + NoOrderIDEntries &referenceID(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *OrderUpdateActionMetaAttribute(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 orderUpdateActionId() SBE_NOEXCEPT + { + return 37708; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 7; + } + + SBE_NODISCARD bool orderUpdateActionInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderUpdateActionSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderUpdateAction::Value orderUpdateAction() const + { + if (m_actingVersion < 7) + { + return OrderUpdateAction::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 21, sizeof(std::uint8_t)); + return OrderUpdateAction::get((val)); + } + + NoOrderIDEntries &orderUpdateAction(const OrderUpdateAction::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 21, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoOrderIDEntries writer) + { + builder << '{'; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("MDOrderPriority": )"; + builder << +writer.mDOrderPriority(); + + builder << ", "; + builder << R"("MDDisplayQty": )"; + builder << +writer.mDDisplayQty(); + + builder << ", "; + builder << R"("ReferenceID": )"; + builder << +writer.referenceID(); + + builder << ", "; + builder << R"("OrderUpdateAction": )"; + builder << '"' << writer.orderUpdateAction() << '"'; + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize8Byte dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)24); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 24; - m_actingVersion = actingVersion; - m_initialPosition = *pos; - m_positionPtr = pos; - *m_positionPtr = *m_positionPtr + 8; - } + } + }; - static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT { - return 8; - } +private: + NoOrderIDEntries m_noOrderIDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 24; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoOrderIDEntriesId() SBE_NOEXCEPT + { + return 37705; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoOrderIDEntries &noOrderIDEntries() + { + m_noOrderIDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderIDEntries; + } - 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; - } + NoOrderIDEntries &noOrderIDEntriesCount(const std::uint8_t count) + { + m_noOrderIDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderIDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noOrderIDEntriesSinceVersion() SBE_NOEXCEPT + { + return 7; + } - 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 NoOrderIDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize8Byte dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - OrderIDMetaAttribute(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 orderIDId() SBE_NOEXCEPT { return 37; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - orderIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noOrderIDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= orderIDSinceVersion(); + return m_actingVersion >= noOrderIDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - orderIDEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } - - static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoOrderIDEntries &orderID(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); - return *this; - } - - SBE_NODISCARD static const char *MDOrderPriorityMetaAttribute( - 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 mDOrderPriorityId() SBE_NOEXCEPT { - return 37707; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDOrderPrioritySinceVersion() SBE_NOEXCEPT { - return 7; - } - - SBE_NODISCARD bool mDOrderPriorityInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDOrderPrioritySinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDOrderPriorityEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityNullValue() SBE_NOEXCEPT { - return 0xffffffffffffffffL; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t - mDOrderPriorityEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t mDOrderPriority() const SBE_NOEXCEPT { - if (m_actingVersion < 7) { - return 0xffffffffffffffffL; - } - - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoOrderIDEntries & - mDOrderPriority(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); - return *this; - } - - SBE_NODISCARD static const char *MDDisplayQtyMetaAttribute( - 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 mDDisplayQtyId() SBE_NOEXCEPT { - return 37706; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDDisplayQtySinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDDisplayQtyInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDDisplayQtySinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDDisplayQtyEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - mDDisplayQtyEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t mDDisplayQty() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoOrderIDEntries &mDDisplayQty(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - ReferenceIDMetaAttribute(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 referenceIDId() SBE_NOEXCEPT { - return 9633; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - referenceIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool referenceIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= referenceIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - referenceIDEncodingOffset() SBE_NOEXCEPT { - return 20; - } - - static SBE_CONSTEXPR std::uint8_t referenceIDNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } - - static SBE_CONSTEXPR std::uint8_t referenceIDMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } - - static SBE_CONSTEXPR std::uint8_t referenceIDMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } - - static SBE_CONSTEXPR std::size_t - referenceIDEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::uint8_t referenceID() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint8_t)); - return (val); - } - - NoOrderIDEntries &referenceID(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char *OrderUpdateActionMetaAttribute( - 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 orderUpdateActionId() SBE_NOEXCEPT { - return 37708; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - orderUpdateActionSinceVersion() SBE_NOEXCEPT { - return 7; - } - - SBE_NODISCARD bool orderUpdateActionInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= orderUpdateActionSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - orderUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 21; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - orderUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD OrderUpdateAction::Value - orderUpdateAction() const SBE_NOEXCEPT { - if (m_actingVersion < 7) { - return OrderUpdateAction::NULL_VALUE; - } - - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 21, sizeof(std::uint8_t)); - return OrderUpdateAction::get((val)); - } - - NoOrderIDEntries & - orderUpdateAction(const OrderUpdateAction::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 21, &val, sizeof(std::uint8_t)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoOrderIDEntries writer) { - builder << '{'; - builder << R"("OrderID": )"; - builder << +writer.orderID(); - - builder << ", "; - builder << R"("MDOrderPriority": )"; - builder << +writer.mDOrderPriority(); - - builder << ", "; - builder << R"("MDDisplayQty": )"; - builder << +writer.mDDisplayQty(); - - builder << ", "; - builder << R"("ReferenceID": )"; - builder << +writer.referenceID(); - - builder << ", "; - builder << R"("OrderUpdateAction": )"; - builder << '"' << writer.orderUpdateAction() << '"'; - - builder << '}'; - - return builder; - } - }; - - private: - NoOrderIDEntries m_noOrderIDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoOrderIDEntriesId() SBE_NOEXCEPT { - return 37705; - } - - SBE_NODISCARD inline NoOrderIDEntries &noOrderIDEntries() { - m_noOrderIDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noOrderIDEntries; - } - - NoOrderIDEntries &noOrderIDEntriesCount(const std::uint8_t count) { - m_noOrderIDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noOrderIDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noOrderIDEntriesSinceVersion() SBE_NOEXCEPT { - return 7; - } - - SBE_NODISCARD bool noOrderIDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noOrderIDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDIncrementalRefreshBook32 _writer) { - MDIncrementalRefreshBook32 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDIncrementalRefreshBook32", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDIncrementalRefreshBook32 _writer) +{ + MDIncrementalRefreshBook32 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDIncrementalRefreshBook32", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoOrderIDEntries": [)"; - writer.noOrderIDEntries().forEach( - [&](NoOrderIDEntries &noOrderIDEntries) { - if (atLeastOne) { - builder << ", "; - } - atLeastOne = true; - builder << noOrderIDEntries; - }); - builder << ']'; - } + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoOrderIDEntries": [)"; + writer.noOrderIDEntries().forEach([&](NoOrderIDEntries& noOrderIDEntries) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderIDEntries; + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); + noOrderIDEntries().forEach([](NoOrderIDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength( + std::size_t noMDEntriesLength = 0, + std::size_t noOrderIDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + length += NoOrderIDEntries::sbeHeaderSize(); + if (noOrderIDEntriesLength > 254LL) + { + throw std::runtime_error("noOrderIDEntriesLength outside of allowed range [E110]"); + } + length += noOrderIDEntriesLength *NoOrderIDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshBook46.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshBook46.h index 95ca84361..52dd4a9e8 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshBook46.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshBook46.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,1576 +86,1824 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDIncrementalRefreshBook46 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDIncrementalRefreshBook46 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(11); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(46); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDIncrementalRefreshBook46() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDIncrementalRefreshBook46( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDIncrementalRefreshBook46(char *buffer, const std::uint64_t bufferLength) - : MDIncrementalRefreshBook46( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDIncrementalRefreshBook46() = default; - MDIncrementalRefreshBook46( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDIncrementalRefreshBook46( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDIncrementalRefreshBook46( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)11; - } + MDIncrementalRefreshBook46(char *buffer, const std::uint64_t bufferLength) : + MDIncrementalRefreshBook46(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)46; - } + MDIncrementalRefreshBook46( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDIncrementalRefreshBook46(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(11); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "X"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(46); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDIncrementalRefreshBook46 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshBook46( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDIncrementalRefreshBook46 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "X"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDIncrementalRefreshBook46( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDIncrementalRefreshBook46 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshBook46(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDIncrementalRefreshBook46 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshBook46( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDIncrementalRefreshBook46 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDIncrementalRefreshBook46( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDIncrementalRefreshBook46 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshBook46(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDIncrementalRefreshBook46 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() 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); + } - MDIncrementalRefreshBook46 & - transactTime(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; - } + MDIncrementalRefreshBook46 &transactTime(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 *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - class NoMDEntries { + class NoMDEntries + { 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; + 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; - } + 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 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) { + 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(32)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 32; + 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 32; + } + + 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 NoMDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT + { + return 270; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryPxSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICENULL9 m_mDEntryPx; + +public: + SBE_NODISCARD PRICENULL9 &mDEntryPx() + { + m_mDEntryPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_mDEntryPx; + } + + SBE_NODISCARD static const char *MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT + { + return 271; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntrySizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntrySizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t mDEntrySize() 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); + } + + NoMDEntries &mDEntrySize(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 *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT + { + return 83; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t rptSeqSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= rptSeqSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t rptSeqEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *NumberOfOrdersMetaAttribute(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 numberOfOrdersId() SBE_NOEXCEPT + { + return 346; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t numberOfOrdersSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool numberOfOrdersInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= numberOfOrdersSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t numberOfOrdersEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t numberOfOrdersEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t numberOfOrders() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &numberOfOrders(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *MDPriceLevelMetaAttribute(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 mDPriceLevelId() SBE_NOEXCEPT + { + return 1023; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDPriceLevelSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDPriceLevelInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDPriceLevelSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDPriceLevelEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::uint8_t mDPriceLevelNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } + + static SBE_CONSTEXPR std::uint8_t mDPriceLevelMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t mDPriceLevelMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t mDPriceLevelEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t mDPriceLevel() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint8_t)); + return (val); + } + + NoMDEntries &mDPriceLevel(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MDUpdateActionMetaAttribute(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 mDUpdateActionId() SBE_NOEXCEPT + { + return 279; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDUpdateActionSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 25; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 25, sizeof(std::uint8_t)); + return MDUpdateAction::get((val)); + } + + NoMDEntries &mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 25, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 26; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDEntryTypeBook::Value mDEntryType() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 26, sizeof(char)); + return MDEntryTypeBook::get((val)); + } + + NoMDEntries &mDEntryType(const MDEntryTypeBook::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 26, &val, sizeof(char)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("MDEntryPx": )"; + builder << writer.mDEntryPx(); + + builder << ", "; + builder << R"("MDEntrySize": )"; + builder << +writer.mDEntrySize(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("RptSeq": )"; + builder << +writer.rptSeq(); + + builder << ", "; + builder << R"("NumberOfOrders": )"; + builder << +writer.numberOfOrders(); + + builder << ", "; + builder << R"("MDPriceLevel": )"; + builder << +writer.mDPriceLevel(); + + builder << ", "; + builder << R"("MDUpdateAction": )"; + builder << '"' << writer.mDUpdateAction() << '"'; + + builder << ", "; + builder << R"("MDEntryType": )"; + builder << '"' << writer.mDEntryType() << '"'; + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)32); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 32; - 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; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 32; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT { - return 270; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryPxSinceVersion() SBE_NOEXCEPT { - return 9; - } - - SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDEntryPxSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryPxEncodingOffset() SBE_NOEXCEPT { - return 0; - } + } + class NoOrderIDEntries + { private: - PRICENULL9 m_mDEntryPx; + 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: - SBE_NODISCARD PRICENULL9 &mDEntryPx() { - m_mDEntryPx.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_mDEntryPx; - } - - SBE_NODISCARD static const char * - MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT { - return 271; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntrySizeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntrySizeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t mDEntrySize() 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); - } - - NoMDEntries &mDEntrySize(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 * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { - return 48; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= securityIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 12; - } - - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT { return 83; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - rptSeqSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= rptSeqSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - rptSeqEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT { - return 4294967294; - } - - static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); - return *this; - } - - SBE_NODISCARD static const char *NumberOfOrdersMetaAttribute( - 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 numberOfOrdersId() SBE_NOEXCEPT { - return 346; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - numberOfOrdersSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool numberOfOrdersInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= numberOfOrdersSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - numberOfOrdersEncodingOffset() SBE_NOEXCEPT { - return 20; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - numberOfOrdersEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t numberOfOrders() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &numberOfOrders(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char *MDPriceLevelMetaAttribute( - 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 mDPriceLevelId() SBE_NOEXCEPT { - return 1023; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDPriceLevelSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDPriceLevelInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDPriceLevelSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDPriceLevelEncodingOffset() SBE_NOEXCEPT { - return 24; - } - - static SBE_CONSTEXPR std::uint8_t mDPriceLevelNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT8; - } - - static SBE_CONSTEXPR std::uint8_t mDPriceLevelMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } - - static SBE_CONSTEXPR std::uint8_t mDPriceLevelMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } - - static SBE_CONSTEXPR std::size_t - mDPriceLevelEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::uint8_t mDPriceLevel() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint8_t)); - return (val); - } - - NoMDEntries &mDPriceLevel(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char *MDUpdateActionMetaAttribute( - 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 mDUpdateActionId() SBE_NOEXCEPT { - return 279; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDUpdateActionSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 25; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 25, sizeof(std::uint8_t)); - return MDUpdateAction::get((val)); - } - - NoMDEntries & - mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 25, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 26; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDEntryTypeBook::Value mDEntryType() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 26, sizeof(char)); - return MDEntryTypeBook::get((val)); - } - - NoMDEntries & - mDEntryType(const MDEntryTypeBook::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 26, &val, sizeof(char)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("MDEntryPx": )"; - builder << writer.mDEntryPx(); - - builder << ", "; - builder << R"("MDEntrySize": )"; - builder << +writer.mDEntrySize(); - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("RptSeq": )"; - builder << +writer.rptSeq(); - - builder << ", "; - builder << R"("NumberOfOrders": )"; - builder << +writer.numberOfOrders(); - - builder << ", "; - builder << R"("MDPriceLevel": )"; - builder << +writer.mDPriceLevel(); - - builder << ", "; - builder << R"("MDUpdateAction": )"; - builder << '"' << writer.mDUpdateAction() << '"'; - - builder << ", "; - builder << R"("MDEntryType": )"; - builder << '"' << writer.mDEntryType() << '"'; - - builder << '}'; - - return builder; - } - }; - - private: - NoMDEntries m_noMDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } - - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoOrderIDEntries { - 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) { - GroupSize8Byte 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 + 8; - } - - inline void wrapForEncode( - char *buffer, - const std::uint8_t count, - std::uint64_t *pos, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize8Byte 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 + 8; + } + + 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; + GroupSize8Byte dimensions(buffer, *pos, bufferLength, actingVersion); + dimensions.blockLength(static_cast(24)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 24; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 8; + } + + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 24; + } + + 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 NoOrderIDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize8Byte dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *OrderIDMetaAttribute(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 orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoOrderIDEntries &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *MDOrderPriorityMetaAttribute(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 mDOrderPriorityId() SBE_NOEXCEPT + { + return 37707; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDOrderPrioritySinceVersion() SBE_NOEXCEPT + { + return 7; + } + + SBE_NODISCARD bool mDOrderPriorityInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDOrderPrioritySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDOrderPriorityEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityNullValue() SBE_NOEXCEPT + { + return UINT64_C(0xffffffffffffffff); + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t mDOrderPriorityEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t mDOrderPriority() const SBE_NOEXCEPT + { + if (m_actingVersion < 7) + { + return UINT64_C(0xffffffffffffffff); + } + + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoOrderIDEntries &mDOrderPriority(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *MDDisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDDisplayQtyId() SBE_NOEXCEPT + { + return 37706; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDDisplayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDDisplayQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDDisplayQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDDisplayQtyEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t mDDisplayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t mDDisplayQty() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoOrderIDEntries &mDDisplayQty(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *ReferenceIDMetaAttribute(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 referenceIDId() SBE_NOEXCEPT + { + return 9633; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t referenceIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool referenceIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= referenceIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t referenceIDEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint8_t referenceIDNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } + + static SBE_CONSTEXPR std::uint8_t referenceIDMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint8_t referenceIDMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } + + static SBE_CONSTEXPR std::size_t referenceIDEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::uint8_t referenceID() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint8_t)); + return (val); + } + + NoOrderIDEntries &referenceID(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *OrderUpdateActionMetaAttribute(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 orderUpdateActionId() SBE_NOEXCEPT + { + return 37708; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 7; + } + + SBE_NODISCARD bool orderUpdateActionInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderUpdateActionSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OrderUpdateAction::Value orderUpdateAction() const + { + if (m_actingVersion < 7) + { + return OrderUpdateAction::NULL_VALUE; + } + + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 21, sizeof(std::uint8_t)); + return OrderUpdateAction::get((val)); + } + + NoOrderIDEntries &orderUpdateAction(const OrderUpdateAction::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 21, &val, sizeof(std::uint8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoOrderIDEntries writer) + { + builder << '{'; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("MDOrderPriority": )"; + builder << +writer.mDOrderPriority(); + + builder << ", "; + builder << R"("MDDisplayQty": )"; + builder << +writer.mDDisplayQty(); + + builder << ", "; + builder << R"("ReferenceID": )"; + builder << +writer.referenceID(); + + builder << ", "; + builder << R"("OrderUpdateAction": )"; + builder << '"' << writer.orderUpdateAction() << '"'; + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize8Byte dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)24); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 24; - m_actingVersion = actingVersion; - m_initialPosition = *pos; - m_positionPtr = pos; - *m_positionPtr = *m_positionPtr + 8; - } + } + }; - static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT { - return 8; - } +private: + NoOrderIDEntries m_noOrderIDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 24; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoOrderIDEntriesId() SBE_NOEXCEPT + { + return 37705; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoOrderIDEntries &noOrderIDEntries() + { + m_noOrderIDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderIDEntries; + } - 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; - } + NoOrderIDEntries &noOrderIDEntriesCount(const std::uint8_t count) + { + m_noOrderIDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderIDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noOrderIDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoOrderIDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize8Byte dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - OrderIDMetaAttribute(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 orderIDId() SBE_NOEXCEPT { return 37; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - orderIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noOrderIDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= orderIDSinceVersion(); + return m_actingVersion >= noOrderIDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - orderIDEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } - - static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoOrderIDEntries &orderID(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); - return *this; - } - - SBE_NODISCARD static const char *MDOrderPriorityMetaAttribute( - 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 mDOrderPriorityId() SBE_NOEXCEPT { - return 37707; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDOrderPrioritySinceVersion() SBE_NOEXCEPT { - return 7; - } - - SBE_NODISCARD bool mDOrderPriorityInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDOrderPrioritySinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDOrderPriorityEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityNullValue() SBE_NOEXCEPT { - return 0xffffffffffffffffL; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t - mDOrderPriorityEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t mDOrderPriority() const SBE_NOEXCEPT { - if (m_actingVersion < 7) { - return 0xffffffffffffffffL; - } - - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoOrderIDEntries & - mDOrderPriority(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); - return *this; - } - - SBE_NODISCARD static const char *MDDisplayQtyMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDDisplayQtyId() SBE_NOEXCEPT { - return 37706; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDDisplayQtySinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDDisplayQtyInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDDisplayQtySinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDDisplayQtyEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - mDDisplayQtyEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t mDDisplayQty() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoOrderIDEntries &mDDisplayQty(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - ReferenceIDMetaAttribute(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 referenceIDId() SBE_NOEXCEPT { - return 9633; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - referenceIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool referenceIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= referenceIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - referenceIDEncodingOffset() SBE_NOEXCEPT { - return 20; - } - - static SBE_CONSTEXPR std::uint8_t referenceIDNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } - - static SBE_CONSTEXPR std::uint8_t referenceIDMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } - - static SBE_CONSTEXPR std::uint8_t referenceIDMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } - - static SBE_CONSTEXPR std::size_t - referenceIDEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::uint8_t referenceID() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint8_t)); - return (val); - } - - NoOrderIDEntries &referenceID(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char *OrderUpdateActionMetaAttribute( - 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 orderUpdateActionId() SBE_NOEXCEPT { - return 37708; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - orderUpdateActionSinceVersion() SBE_NOEXCEPT { - return 7; - } - - SBE_NODISCARD bool orderUpdateActionInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= orderUpdateActionSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - orderUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 21; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - orderUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD OrderUpdateAction::Value - orderUpdateAction() const SBE_NOEXCEPT { - if (m_actingVersion < 7) { - return OrderUpdateAction::NULL_VALUE; - } - - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 21, sizeof(std::uint8_t)); - return OrderUpdateAction::get((val)); - } - - NoOrderIDEntries & - orderUpdateAction(const OrderUpdateAction::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 21, &val, sizeof(std::uint8_t)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoOrderIDEntries writer) { - builder << '{'; - builder << R"("OrderID": )"; - builder << +writer.orderID(); - - builder << ", "; - builder << R"("MDOrderPriority": )"; - builder << +writer.mDOrderPriority(); - - builder << ", "; - builder << R"("MDDisplayQty": )"; - builder << +writer.mDDisplayQty(); - - builder << ", "; - builder << R"("ReferenceID": )"; - builder << +writer.referenceID(); - - builder << ", "; - builder << R"("OrderUpdateAction": )"; - builder << '"' << writer.orderUpdateAction() << '"'; - - builder << '}'; - - return builder; - } - }; - - private: - NoOrderIDEntries m_noOrderIDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoOrderIDEntriesId() SBE_NOEXCEPT { - return 37705; - } - - SBE_NODISCARD inline NoOrderIDEntries &noOrderIDEntries() { - m_noOrderIDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noOrderIDEntries; - } - - NoOrderIDEntries &noOrderIDEntriesCount(const std::uint8_t count) { - m_noOrderIDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noOrderIDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noOrderIDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noOrderIDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noOrderIDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDIncrementalRefreshBook46 _writer) { - MDIncrementalRefreshBook46 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDIncrementalRefreshBook46", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDIncrementalRefreshBook46 _writer) +{ + MDIncrementalRefreshBook46 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDIncrementalRefreshBook46", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoOrderIDEntries": [)"; - writer.noOrderIDEntries().forEach( - [&](NoOrderIDEntries &noOrderIDEntries) { - if (atLeastOne) { - builder << ", "; - } - atLeastOne = true; - builder << noOrderIDEntries; - }); - builder << ']'; - } + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoOrderIDEntries": [)"; + writer.noOrderIDEntries().forEach([&](NoOrderIDEntries& noOrderIDEntries) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderIDEntries; + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); + noOrderIDEntries().forEach([](NoOrderIDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength( + std::size_t noMDEntriesLength = 0, + std::size_t noOrderIDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + length += NoOrderIDEntries::sbeHeaderSize(); + if (noOrderIDEntriesLength > 254LL) + { + throw std::runtime_error("noOrderIDEntriesLength outside of allowed range [E110]"); + } + length += noOrderIDEntriesLength *NoOrderIDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshDailyStatistics33.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshDailyStatistics33.h index a3e90ad14..e0a4d9c3e 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshDailyStatistics33.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshDailyStatistics33.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,1023 +86,1179 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDIncrementalRefreshDailyStatistics33 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDIncrementalRefreshDailyStatistics33 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(11); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(33); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDIncrementalRefreshDailyStatistics33() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDIncrementalRefreshDailyStatistics33( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDIncrementalRefreshDailyStatistics33( - char *buffer, const std::uint64_t bufferLength) - : MDIncrementalRefreshDailyStatistics33( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDIncrementalRefreshDailyStatistics33() = default; - MDIncrementalRefreshDailyStatistics33( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDIncrementalRefreshDailyStatistics33( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDIncrementalRefreshDailyStatistics33( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)11; - } + MDIncrementalRefreshDailyStatistics33(char *buffer, const std::uint64_t bufferLength) : + MDIncrementalRefreshDailyStatistics33(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)33; - } + MDIncrementalRefreshDailyStatistics33( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDIncrementalRefreshDailyStatistics33(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(11); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "X"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(33); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDIncrementalRefreshDailyStatistics33 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshDailyStatistics33( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDIncrementalRefreshDailyStatistics33 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "X"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDIncrementalRefreshDailyStatistics33( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDIncrementalRefreshDailyStatistics33 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshDailyStatistics33(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDIncrementalRefreshDailyStatistics33 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshDailyStatistics33( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDIncrementalRefreshDailyStatistics33 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDIncrementalRefreshDailyStatistics33( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDIncrementalRefreshDailyStatistics33 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshDailyStatistics33(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDIncrementalRefreshDailyStatistics33 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() 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); + } - MDIncrementalRefreshDailyStatistics33 & - transactTime(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; - } + MDIncrementalRefreshDailyStatistics33 &transactTime(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 *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - class NoMDEntries { + class NoMDEntries + { 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; + 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; - } + 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 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) { + 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(32)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 32; + 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 32; + } + + 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 NoMDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT + { + return 270; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICENULL m_mDEntryPx; + +public: + SBE_NODISCARD PRICENULL &mDEntryPx() + { + m_mDEntryPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_mDEntryPx; + } + + SBE_NODISCARD static const char *MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT + { + return 271; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntrySizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntrySizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t mDEntrySize() 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); + } + + NoMDEntries &mDEntrySize(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 *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT + { + return 83; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t rptSeqSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= rptSeqSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t rptSeqEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute(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 tradingReferenceDateId() SBE_NOEXCEPT + { + return 5796; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingReferenceDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= tradingReferenceDateSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } + + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } + + static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoMDEntries &tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char *SettlPriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT + { + return 731; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t settlPriceTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= settlPriceTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingOffset() SBE_NOEXCEPT + { + return 22; + } + + private: + SettlPriceType m_settlPriceType; + + public: + SBE_NODISCARD SettlPriceType &settlPriceType() + { + m_settlPriceType.wrap(m_buffer, m_offset + 22, m_actingVersion, m_bufferLength); + return m_settlPriceType; + } + + static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char *MDUpdateActionMetaAttribute(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 mDUpdateActionId() SBE_NOEXCEPT + { + return 279; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDUpdateActionSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 23; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 23, sizeof(std::uint8_t)); + return MDUpdateAction::get((val)); + } + + NoMDEntries &mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 23, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDEntryTypeDailyStatistics::Value mDEntryType() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(char)); + return MDEntryTypeDailyStatistics::get((val)); + } + + NoMDEntries &mDEntryType(const MDEntryTypeDailyStatistics::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(char)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("MDEntryPx": )"; + builder << writer.mDEntryPx(); + + builder << ", "; + builder << R"("MDEntrySize": )"; + builder << +writer.mDEntrySize(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("RptSeq": )"; + builder << +writer.rptSeq(); + + builder << ", "; + builder << R"("TradingReferenceDate": )"; + builder << +writer.tradingReferenceDate(); + + builder << ", "; + builder << R"("SettlPriceType": )"; + builder << writer.settlPriceType(); + + builder << ", "; + builder << R"("MDUpdateAction": )"; + builder << '"' << writer.mDUpdateAction() << '"'; + + builder << ", "; + builder << R"("MDEntryType": )"; + builder << '"' << writer.mDEntryType() << '"'; + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)32); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 32; - 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; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 32; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT { - return 270; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryPxSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDEntryPxSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryPxEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - private: - PRICENULL m_mDEntryPx; - - public: - SBE_NODISCARD PRICENULL &mDEntryPx() { - m_mDEntryPx.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_mDEntryPx; - } - - SBE_NODISCARD static const char * - MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT { - return 271; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntrySizeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntrySizeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t mDEntrySize() 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); - } - - NoMDEntries &mDEntrySize(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 * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { - return 48; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= securityIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 12; - } - - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT { return 83; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - rptSeqSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= rptSeqSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - rptSeqEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT { - return 4294967294; - } - - static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); - return *this; - } - - SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute( - 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 tradingReferenceDateId() SBE_NOEXCEPT { - return 5796; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradingReferenceDateSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= tradingReferenceDateSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingOffset() SBE_NOEXCEPT { - return 20; - } - - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateNullValue() SBE_NOEXCEPT { - return (std::uint16_t)65535; - } - - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } - - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } - - static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingLength() SBE_NOEXCEPT { - return 2; - } - - SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } - - NoMDEntries & - tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint16_t)); - return *this; - } - - SBE_NODISCARD static const char *SettlPriceTypeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT { - return 731; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - settlPriceTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= settlPriceTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingOffset() SBE_NOEXCEPT { - return 22; - } - - private: - SettlPriceType m_settlPriceType; - - public: - SBE_NODISCARD SettlPriceType &settlPriceType() { - m_settlPriceType.wrap( - m_buffer, m_offset + 22, m_actingVersion, m_bufferLength); - return m_settlPriceType; - } - - static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD static const char *MDUpdateActionMetaAttribute( - 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 mDUpdateActionId() SBE_NOEXCEPT { - return 279; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDUpdateActionSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 23; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 23, sizeof(std::uint8_t)); - return MDUpdateAction::get((val)); - } - - NoMDEntries & - mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 23, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 24; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDEntryTypeDailyStatistics::Value - mDEntryType() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 24, sizeof(char)); - return MDEntryTypeDailyStatistics::get((val)); - } - - NoMDEntries & - mDEntryType(const MDEntryTypeDailyStatistics::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 24, &val, sizeof(char)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("MDEntryPx": )"; - builder << writer.mDEntryPx(); - - builder << ", "; - builder << R"("MDEntrySize": )"; - builder << +writer.mDEntrySize(); - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("RptSeq": )"; - builder << +writer.rptSeq(); - - builder << ", "; - builder << R"("TradingReferenceDate": )"; - builder << +writer.tradingReferenceDate(); - - builder << ", "; - builder << R"("SettlPriceType": )"; - builder << writer.settlPriceType(); - - builder << ", "; - builder << R"("MDUpdateAction": )"; - builder << '"' << writer.mDUpdateAction() << '"'; - - builder << ", "; - builder << R"("MDEntryType": )"; - builder << '"' << writer.mDEntryType() << '"'; - - builder << '}'; - - return builder; - } - }; - - private: - NoMDEntries m_noMDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } - - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDIncrementalRefreshDailyStatistics33 _writer) { - MDIncrementalRefreshDailyStatistics33 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDIncrementalRefreshDailyStatistics33", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDIncrementalRefreshDailyStatistics33 _writer) +{ + MDIncrementalRefreshDailyStatistics33 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDIncrementalRefreshDailyStatistics33", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noMDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshDailyStatistics49.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshDailyStatistics49.h index c575542aa..0098573eb 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshDailyStatistics49.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshDailyStatistics49.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,1023 +86,1179 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDIncrementalRefreshDailyStatistics49 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDIncrementalRefreshDailyStatistics49 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(11); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(49); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDIncrementalRefreshDailyStatistics49() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDIncrementalRefreshDailyStatistics49( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDIncrementalRefreshDailyStatistics49( - char *buffer, const std::uint64_t bufferLength) - : MDIncrementalRefreshDailyStatistics49( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDIncrementalRefreshDailyStatistics49() = default; - MDIncrementalRefreshDailyStatistics49( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDIncrementalRefreshDailyStatistics49( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDIncrementalRefreshDailyStatistics49( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)11; - } + MDIncrementalRefreshDailyStatistics49(char *buffer, const std::uint64_t bufferLength) : + MDIncrementalRefreshDailyStatistics49(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)49; - } + MDIncrementalRefreshDailyStatistics49( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDIncrementalRefreshDailyStatistics49(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(11); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "X"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(49); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDIncrementalRefreshDailyStatistics49 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshDailyStatistics49( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDIncrementalRefreshDailyStatistics49 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "X"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDIncrementalRefreshDailyStatistics49( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDIncrementalRefreshDailyStatistics49 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshDailyStatistics49(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDIncrementalRefreshDailyStatistics49 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshDailyStatistics49( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDIncrementalRefreshDailyStatistics49 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDIncrementalRefreshDailyStatistics49( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDIncrementalRefreshDailyStatistics49 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshDailyStatistics49(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDIncrementalRefreshDailyStatistics49 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() 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); + } - MDIncrementalRefreshDailyStatistics49 & - transactTime(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; - } + MDIncrementalRefreshDailyStatistics49 &transactTime(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 *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - class NoMDEntries { + class NoMDEntries + { 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; + 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; - } + 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 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) { + 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(32)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 32; + 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 32; + } + + 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 NoMDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT + { + return 270; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryPxSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICENULL9 m_mDEntryPx; + +public: + SBE_NODISCARD PRICENULL9 &mDEntryPx() + { + m_mDEntryPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_mDEntryPx; + } + + SBE_NODISCARD static const char *MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT + { + return 271; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntrySizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntrySizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t mDEntrySize() 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); + } + + NoMDEntries &mDEntrySize(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 *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT + { + return 83; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t rptSeqSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= rptSeqSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t rptSeqEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute(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 tradingReferenceDateId() SBE_NOEXCEPT + { + return 5796; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingReferenceDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= tradingReferenceDateSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } + + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } + + static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoMDEntries &tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char *SettlPriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT + { + return 731; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t settlPriceTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= settlPriceTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingOffset() SBE_NOEXCEPT + { + return 22; + } + + private: + SettlPriceType m_settlPriceType; + + public: + SBE_NODISCARD SettlPriceType &settlPriceType() + { + m_settlPriceType.wrap(m_buffer, m_offset + 22, m_actingVersion, m_bufferLength); + return m_settlPriceType; + } + + static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char *MDUpdateActionMetaAttribute(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 mDUpdateActionId() SBE_NOEXCEPT + { + return 279; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDUpdateActionSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 23; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 23, sizeof(std::uint8_t)); + return MDUpdateAction::get((val)); + } + + NoMDEntries &mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 23, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDEntryTypeDailyStatistics::Value mDEntryType() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(char)); + return MDEntryTypeDailyStatistics::get((val)); + } + + NoMDEntries &mDEntryType(const MDEntryTypeDailyStatistics::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(char)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("MDEntryPx": )"; + builder << writer.mDEntryPx(); + + builder << ", "; + builder << R"("MDEntrySize": )"; + builder << +writer.mDEntrySize(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("RptSeq": )"; + builder << +writer.rptSeq(); + + builder << ", "; + builder << R"("TradingReferenceDate": )"; + builder << +writer.tradingReferenceDate(); + + builder << ", "; + builder << R"("SettlPriceType": )"; + builder << writer.settlPriceType(); + + builder << ", "; + builder << R"("MDUpdateAction": )"; + builder << '"' << writer.mDUpdateAction() << '"'; + + builder << ", "; + builder << R"("MDEntryType": )"; + builder << '"' << writer.mDEntryType() << '"'; + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)32); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 32; - 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; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 32; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT { - return 270; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryPxSinceVersion() SBE_NOEXCEPT { - return 9; - } - - SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDEntryPxSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryPxEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - private: - PRICENULL9 m_mDEntryPx; - - public: - SBE_NODISCARD PRICENULL9 &mDEntryPx() { - m_mDEntryPx.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_mDEntryPx; - } - - SBE_NODISCARD static const char * - MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT { - return 271; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntrySizeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntrySizeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t mDEntrySize() 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); - } - - NoMDEntries &mDEntrySize(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 * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { - return 48; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= securityIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 12; - } - - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT { return 83; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - rptSeqSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= rptSeqSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - rptSeqEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT { - return 4294967294; - } - - static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); - return *this; - } - - SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute( - 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 tradingReferenceDateId() SBE_NOEXCEPT { - return 5796; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradingReferenceDateSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= tradingReferenceDateSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingOffset() SBE_NOEXCEPT { - return 20; - } - - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateNullValue() SBE_NOEXCEPT { - return (std::uint16_t)65535; - } - - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } - - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } - - static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingLength() SBE_NOEXCEPT { - return 2; - } - - SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } - - NoMDEntries & - tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint16_t)); - return *this; - } - - SBE_NODISCARD static const char *SettlPriceTypeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT { - return 731; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - settlPriceTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= settlPriceTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingOffset() SBE_NOEXCEPT { - return 22; - } - - private: - SettlPriceType m_settlPriceType; - - public: - SBE_NODISCARD SettlPriceType &settlPriceType() { - m_settlPriceType.wrap( - m_buffer, m_offset + 22, m_actingVersion, m_bufferLength); - return m_settlPriceType; - } - - static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD static const char *MDUpdateActionMetaAttribute( - 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 mDUpdateActionId() SBE_NOEXCEPT { - return 279; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDUpdateActionSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 23; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 23, sizeof(std::uint8_t)); - return MDUpdateAction::get((val)); - } - - NoMDEntries & - mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 23, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 24; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDEntryTypeDailyStatistics::Value - mDEntryType() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 24, sizeof(char)); - return MDEntryTypeDailyStatistics::get((val)); - } - - NoMDEntries & - mDEntryType(const MDEntryTypeDailyStatistics::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 24, &val, sizeof(char)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("MDEntryPx": )"; - builder << writer.mDEntryPx(); - - builder << ", "; - builder << R"("MDEntrySize": )"; - builder << +writer.mDEntrySize(); - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("RptSeq": )"; - builder << +writer.rptSeq(); - - builder << ", "; - builder << R"("TradingReferenceDate": )"; - builder << +writer.tradingReferenceDate(); - - builder << ", "; - builder << R"("SettlPriceType": )"; - builder << writer.settlPriceType(); - - builder << ", "; - builder << R"("MDUpdateAction": )"; - builder << '"' << writer.mDUpdateAction() << '"'; - - builder << ", "; - builder << R"("MDEntryType": )"; - builder << '"' << writer.mDEntryType() << '"'; - - builder << '}'; - - return builder; - } - }; - - private: - NoMDEntries m_noMDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } - - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDIncrementalRefreshDailyStatistics49 _writer) { - MDIncrementalRefreshDailyStatistics49 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDIncrementalRefreshDailyStatistics49", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDIncrementalRefreshDailyStatistics49 _writer) +{ + MDIncrementalRefreshDailyStatistics49 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDIncrementalRefreshDailyStatistics49", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noMDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshLimitsBanding34.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshLimitsBanding34.h index 4c8ef58af..2ba597cff 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshLimitsBanding34.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshLimitsBanding34.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,993 +86,1142 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDIncrementalRefreshLimitsBanding34 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDIncrementalRefreshLimitsBanding34 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(11); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(34); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDIncrementalRefreshLimitsBanding34() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDIncrementalRefreshLimitsBanding34( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDIncrementalRefreshLimitsBanding34( - char *buffer, const std::uint64_t bufferLength) - : MDIncrementalRefreshLimitsBanding34( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDIncrementalRefreshLimitsBanding34() = default; - MDIncrementalRefreshLimitsBanding34( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDIncrementalRefreshLimitsBanding34( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDIncrementalRefreshLimitsBanding34( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)11; - } + MDIncrementalRefreshLimitsBanding34(char *buffer, const std::uint64_t bufferLength) : + MDIncrementalRefreshLimitsBanding34(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)34; - } + MDIncrementalRefreshLimitsBanding34( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDIncrementalRefreshLimitsBanding34(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(11); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "X"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(34); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDIncrementalRefreshLimitsBanding34 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshLimitsBanding34( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDIncrementalRefreshLimitsBanding34 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "X"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDIncrementalRefreshLimitsBanding34( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDIncrementalRefreshLimitsBanding34 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshLimitsBanding34(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDIncrementalRefreshLimitsBanding34 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshLimitsBanding34( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDIncrementalRefreshLimitsBanding34 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDIncrementalRefreshLimitsBanding34( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDIncrementalRefreshLimitsBanding34 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshLimitsBanding34(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDIncrementalRefreshLimitsBanding34 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() 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); + } - MDIncrementalRefreshLimitsBanding34 & - transactTime(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; - } + MDIncrementalRefreshLimitsBanding34 &transactTime(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 *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - class NoMDEntries { + class NoMDEntries + { 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; + 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; - } + 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 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) { + 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(32)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 32; + 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 32; + } + + 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 NoMDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *HighLimitPriceMetaAttribute(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 highLimitPriceId() SBE_NOEXCEPT + { + return 1149; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t highLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= highLimitPriceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t highLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICENULL m_highLimitPrice; + +public: + SBE_NODISCARD PRICENULL &highLimitPrice() + { + m_highLimitPrice.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_highLimitPrice; + } + + SBE_NODISCARD static const char *LowLimitPriceMetaAttribute(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 lowLimitPriceId() SBE_NOEXCEPT + { + return 1148; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lowLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= lowLimitPriceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lowLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + +private: + PRICENULL m_lowLimitPrice; + +public: + SBE_NODISCARD PRICENULL &lowLimitPrice() + { + m_lowLimitPrice.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_lowLimitPrice; + } + + SBE_NODISCARD static const char *MaxPriceVariationMetaAttribute(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 maxPriceVariationId() SBE_NOEXCEPT + { + return 1143; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxPriceVariationSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool maxPriceVariationInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= maxPriceVariationSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxPriceVariationEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + +private: + PRICENULL m_maxPriceVariation; + +public: + SBE_NODISCARD PRICENULL &maxPriceVariation() + { + m_maxPriceVariation.wrap(m_buffer, m_offset + 16, m_actingVersion, m_bufferLength); + return m_maxPriceVariation; + } + + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT + { + return 83; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t rptSeqSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= rptSeqSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t rptSeqEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *MDUpdateActionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDUpdateActionId() SBE_NOEXCEPT + { + return 279; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDUpdateActionSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR std::int8_t mDUpdateActionNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t mDUpdateActionMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t mDUpdateActionMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t mDUpdateAction() SBE_NOEXCEPT + { + return static_cast(0); + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR char mDEntryTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char mDEntryTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char mDEntryTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t mDEntryTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *mDEntryType() const + { + static const std::uint8_t mDEntryTypeValues[] = { 103 }; + + return (const char *)mDEntryTypeValues; + } + + SBE_NODISCARD char mDEntryType(const std::uint64_t index) const + { + static const std::uint8_t mDEntryTypeValues[] = { 103 }; + + return (char)mDEntryTypeValues[index]; + } + + std::uint64_t getMDEntryType(char *dst, const std::uint64_t length) const + { + static std::uint8_t mDEntryTypeValues[] = { 103 }; + std::uint64_t bytesToCopy = length < sizeof(mDEntryTypeValues) ? length : sizeof(mDEntryTypeValues); + + std::memcpy(dst, mDEntryTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getMDEntryTypeAsString() const + { + static const std::uint8_t MDEntryTypeValues[] = { 103 }; + + return std::string((const char *)MDEntryTypeValues, 1); + } + + std::string getMDEntryTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMDEntryTypeAsString(); + + 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(); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("HighLimitPrice": )"; + builder << writer.highLimitPrice(); + + builder << ", "; + builder << R"("LowLimitPrice": )"; + builder << writer.lowLimitPrice(); + + builder << ", "; + builder << R"("MaxPriceVariation": )"; + builder << writer.maxPriceVariation(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("RptSeq": )"; + builder << +writer.rptSeq(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)32); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 32; - 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; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 32; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char *HighLimitPriceMetaAttribute( - 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 highLimitPriceId() SBE_NOEXCEPT { - return 1149; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - highLimitPriceSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= highLimitPriceSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - highLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - private: - PRICENULL m_highLimitPrice; - - public: - SBE_NODISCARD PRICENULL &highLimitPrice() { - m_highLimitPrice.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_highLimitPrice; - } - - SBE_NODISCARD static const char *LowLimitPriceMetaAttribute( - 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 lowLimitPriceId() SBE_NOEXCEPT { - return 1148; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lowLimitPriceSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= lowLimitPriceSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lowLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - private: - PRICENULL m_lowLimitPrice; - - public: - SBE_NODISCARD PRICENULL &lowLimitPrice() { - m_lowLimitPrice.wrap( - m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); - return m_lowLimitPrice; - } - - SBE_NODISCARD static const char *MaxPriceVariationMetaAttribute( - 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 maxPriceVariationId() SBE_NOEXCEPT { - return 1143; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maxPriceVariationSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool maxPriceVariationInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= maxPriceVariationSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maxPriceVariationEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - private: - PRICENULL m_maxPriceVariation; - - public: - SBE_NODISCARD PRICENULL &maxPriceVariation() { - m_maxPriceVariation.wrap( - m_buffer, m_offset + 16, m_actingVersion, m_bufferLength); - return m_maxPriceVariation; - } - - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { - return 48; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= securityIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 24; - } - - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT { return 83; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - rptSeqSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= rptSeqSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - rptSeqEncodingOffset() SBE_NOEXCEPT { - return 28; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT { - return 4294967294; - } - - static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint32_t)); - return *this; - } - - SBE_NODISCARD static const char *MDUpdateActionMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDUpdateActionId() SBE_NOEXCEPT { - return 279; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDUpdateActionSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 32; - } - - static SBE_CONSTEXPR std::int8_t mDUpdateActionNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t mDUpdateActionMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t mDUpdateActionMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingLength() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::int8_t - mDUpdateAction() SBE_NOEXCEPT { - return (std::int8_t)0; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 32; - } - - static SBE_CONSTEXPR char mDEntryTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char mDEntryTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char mDEntryTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t mDEntryTypeLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD const char *mDEntryType() const { - static const std::uint8_t mDEntryTypeValues[] = {103}; - - return (const char *)mDEntryTypeValues; - } - - SBE_NODISCARD char mDEntryType(const std::uint64_t index) const { - static const std::uint8_t mDEntryTypeValues[] = {103}; - - return (char)mDEntryTypeValues[index]; - } - - std::uint64_t - getMDEntryType(char *dst, const std::uint64_t length) const { - static std::uint8_t mDEntryTypeValues[] = {103}; - std::uint64_t bytesToCopy = length < sizeof(mDEntryTypeValues) - ? length - : sizeof(mDEntryTypeValues); - - std::memcpy(dst, mDEntryTypeValues, static_cast(bytesToCopy)); - return bytesToCopy; - } - - std::string getMDEntryTypeAsString() const { - static const std::uint8_t MDEntryTypeValues[] = {103}; - - return std::string((const char *)MDEntryTypeValues, 1); - } - - std::string getMDEntryTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getMDEntryTypeAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } - } - } - - return oss.str(); - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("HighLimitPrice": )"; - builder << writer.highLimitPrice(); - - builder << ", "; - builder << R"("LowLimitPrice": )"; - builder << writer.lowLimitPrice(); - - builder << ", "; - builder << R"("MaxPriceVariation": )"; - builder << writer.maxPriceVariation(); - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("RptSeq": )"; - builder << +writer.rptSeq(); - - builder << '}'; - - return builder; - } - }; - - private: - NoMDEntries m_noMDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } - - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDIncrementalRefreshLimitsBanding34 _writer) { - MDIncrementalRefreshLimitsBanding34 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDIncrementalRefreshLimitsBanding34", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDIncrementalRefreshLimitsBanding34 _writer) +{ + MDIncrementalRefreshLimitsBanding34 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDIncrementalRefreshLimitsBanding34", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noMDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshLimitsBanding50.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshLimitsBanding50.h index a0ac0992b..c2f2058cd 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshLimitsBanding50.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshLimitsBanding50.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,993 +86,1142 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDIncrementalRefreshLimitsBanding50 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDIncrementalRefreshLimitsBanding50 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(11); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(50); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDIncrementalRefreshLimitsBanding50() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDIncrementalRefreshLimitsBanding50( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDIncrementalRefreshLimitsBanding50( - char *buffer, const std::uint64_t bufferLength) - : MDIncrementalRefreshLimitsBanding50( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDIncrementalRefreshLimitsBanding50() = default; - MDIncrementalRefreshLimitsBanding50( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDIncrementalRefreshLimitsBanding50( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDIncrementalRefreshLimitsBanding50( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)11; - } + MDIncrementalRefreshLimitsBanding50(char *buffer, const std::uint64_t bufferLength) : + MDIncrementalRefreshLimitsBanding50(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)50; - } + MDIncrementalRefreshLimitsBanding50( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDIncrementalRefreshLimitsBanding50(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(11); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "X"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(50); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDIncrementalRefreshLimitsBanding50 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshLimitsBanding50( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDIncrementalRefreshLimitsBanding50 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "X"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDIncrementalRefreshLimitsBanding50( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDIncrementalRefreshLimitsBanding50 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshLimitsBanding50(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDIncrementalRefreshLimitsBanding50 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshLimitsBanding50( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDIncrementalRefreshLimitsBanding50 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDIncrementalRefreshLimitsBanding50( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDIncrementalRefreshLimitsBanding50 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshLimitsBanding50(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDIncrementalRefreshLimitsBanding50 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() 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); + } - MDIncrementalRefreshLimitsBanding50 & - transactTime(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; - } + MDIncrementalRefreshLimitsBanding50 &transactTime(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 *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - class NoMDEntries { + class NoMDEntries + { 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; + 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; - } + 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 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) { + 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(32)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 32; + 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 32; + } + + 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 NoMDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *HighLimitPriceMetaAttribute(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 highLimitPriceId() SBE_NOEXCEPT + { + return 1149; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t highLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= highLimitPriceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t highLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICENULL9 m_highLimitPrice; + +public: + SBE_NODISCARD PRICENULL9 &highLimitPrice() + { + m_highLimitPrice.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_highLimitPrice; + } + + SBE_NODISCARD static const char *LowLimitPriceMetaAttribute(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 lowLimitPriceId() SBE_NOEXCEPT + { + return 1148; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lowLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= lowLimitPriceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lowLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + +private: + PRICENULL9 m_lowLimitPrice; + +public: + SBE_NODISCARD PRICENULL9 &lowLimitPrice() + { + m_lowLimitPrice.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_lowLimitPrice; + } + + SBE_NODISCARD static const char *MaxPriceVariationMetaAttribute(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 maxPriceVariationId() SBE_NOEXCEPT + { + return 1143; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxPriceVariationSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool maxPriceVariationInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= maxPriceVariationSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxPriceVariationEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + +private: + PRICENULL9 m_maxPriceVariation; + +public: + SBE_NODISCARD PRICENULL9 &maxPriceVariation() + { + m_maxPriceVariation.wrap(m_buffer, m_offset + 16, m_actingVersion, m_bufferLength); + return m_maxPriceVariation; + } + + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT + { + return 83; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t rptSeqSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= rptSeqSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t rptSeqEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *MDUpdateActionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDUpdateActionId() SBE_NOEXCEPT + { + return 279; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDUpdateActionSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR std::int8_t mDUpdateActionNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t mDUpdateActionMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t mDUpdateActionMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t mDUpdateAction() SBE_NOEXCEPT + { + return static_cast(0); + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + static SBE_CONSTEXPR char mDEntryTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char mDEntryTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char mDEntryTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t mDEntryTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *mDEntryType() const + { + static const std::uint8_t mDEntryTypeValues[] = { 103 }; + + return (const char *)mDEntryTypeValues; + } + + SBE_NODISCARD char mDEntryType(const std::uint64_t index) const + { + static const std::uint8_t mDEntryTypeValues[] = { 103 }; + + return (char)mDEntryTypeValues[index]; + } + + std::uint64_t getMDEntryType(char *dst, const std::uint64_t length) const + { + static std::uint8_t mDEntryTypeValues[] = { 103 }; + std::uint64_t bytesToCopy = length < sizeof(mDEntryTypeValues) ? length : sizeof(mDEntryTypeValues); + + std::memcpy(dst, mDEntryTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getMDEntryTypeAsString() const + { + static const std::uint8_t MDEntryTypeValues[] = { 103 }; + + return std::string((const char *)MDEntryTypeValues, 1); + } + + std::string getMDEntryTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMDEntryTypeAsString(); + + 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(); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("HighLimitPrice": )"; + builder << writer.highLimitPrice(); + + builder << ", "; + builder << R"("LowLimitPrice": )"; + builder << writer.lowLimitPrice(); + + builder << ", "; + builder << R"("MaxPriceVariation": )"; + builder << writer.maxPriceVariation(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("RptSeq": )"; + builder << +writer.rptSeq(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)32); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 32; - 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; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 32; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char *HighLimitPriceMetaAttribute( - 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 highLimitPriceId() SBE_NOEXCEPT { - return 1149; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - highLimitPriceSinceVersion() SBE_NOEXCEPT { - return 9; - } - - SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= highLimitPriceSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - highLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - private: - PRICENULL9 m_highLimitPrice; - - public: - SBE_NODISCARD PRICENULL9 &highLimitPrice() { - m_highLimitPrice.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_highLimitPrice; - } - - SBE_NODISCARD static const char *LowLimitPriceMetaAttribute( - 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 lowLimitPriceId() SBE_NOEXCEPT { - return 1148; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lowLimitPriceSinceVersion() SBE_NOEXCEPT { - return 9; - } - - SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= lowLimitPriceSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lowLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - private: - PRICENULL9 m_lowLimitPrice; - - public: - SBE_NODISCARD PRICENULL9 &lowLimitPrice() { - m_lowLimitPrice.wrap( - m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); - return m_lowLimitPrice; - } - - SBE_NODISCARD static const char *MaxPriceVariationMetaAttribute( - 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 maxPriceVariationId() SBE_NOEXCEPT { - return 1143; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maxPriceVariationSinceVersion() SBE_NOEXCEPT { - return 9; - } - - SBE_NODISCARD bool maxPriceVariationInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= maxPriceVariationSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maxPriceVariationEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - private: - PRICENULL9 m_maxPriceVariation; - - public: - SBE_NODISCARD PRICENULL9 &maxPriceVariation() { - m_maxPriceVariation.wrap( - m_buffer, m_offset + 16, m_actingVersion, m_bufferLength); - return m_maxPriceVariation; - } - - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { - return 48; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= securityIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 24; - } - - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT { return 83; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - rptSeqSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= rptSeqSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - rptSeqEncodingOffset() SBE_NOEXCEPT { - return 28; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT { - return 4294967294; - } - - static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint32_t)); - return *this; - } - - SBE_NODISCARD static const char *MDUpdateActionMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDUpdateActionId() SBE_NOEXCEPT { - return 279; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDUpdateActionSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 32; - } - - static SBE_CONSTEXPR std::int8_t mDUpdateActionNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t mDUpdateActionMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t mDUpdateActionMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingLength() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::int8_t - mDUpdateAction() SBE_NOEXCEPT { - return (std::int8_t)0; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 32; - } - - static SBE_CONSTEXPR char mDEntryTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char mDEntryTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char mDEntryTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t mDEntryTypeLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD const char *mDEntryType() const { - static const std::uint8_t mDEntryTypeValues[] = {103}; - - return (const char *)mDEntryTypeValues; - } - - SBE_NODISCARD char mDEntryType(const std::uint64_t index) const { - static const std::uint8_t mDEntryTypeValues[] = {103}; - - return (char)mDEntryTypeValues[index]; - } - - std::uint64_t - getMDEntryType(char *dst, const std::uint64_t length) const { - static std::uint8_t mDEntryTypeValues[] = {103}; - std::uint64_t bytesToCopy = length < sizeof(mDEntryTypeValues) - ? length - : sizeof(mDEntryTypeValues); - - std::memcpy(dst, mDEntryTypeValues, static_cast(bytesToCopy)); - return bytesToCopy; - } - - std::string getMDEntryTypeAsString() const { - static const std::uint8_t MDEntryTypeValues[] = {103}; - - return std::string((const char *)MDEntryTypeValues, 1); - } - - std::string getMDEntryTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getMDEntryTypeAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } - } - } - - return oss.str(); - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("HighLimitPrice": )"; - builder << writer.highLimitPrice(); - - builder << ", "; - builder << R"("LowLimitPrice": )"; - builder << writer.lowLimitPrice(); - - builder << ", "; - builder << R"("MaxPriceVariation": )"; - builder << writer.maxPriceVariation(); - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("RptSeq": )"; - builder << +writer.rptSeq(); - - builder << '}'; - - return builder; - } - }; - - private: - NoMDEntries m_noMDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } - - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDIncrementalRefreshLimitsBanding50 _writer) { - MDIncrementalRefreshLimitsBanding50 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDIncrementalRefreshLimitsBanding50", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDIncrementalRefreshLimitsBanding50 _writer) +{ + MDIncrementalRefreshLimitsBanding50 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDIncrementalRefreshLimitsBanding50", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noMDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshOrderBook43.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshOrderBook43.h index 69236fdcd..5bf8a2702 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshOrderBook43.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshOrderBook43.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,973 +86,1133 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDIncrementalRefreshOrderBook43 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDIncrementalRefreshOrderBook43 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(11); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(43); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDIncrementalRefreshOrderBook43() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDIncrementalRefreshOrderBook43( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDIncrementalRefreshOrderBook43( - char *buffer, const std::uint64_t bufferLength) - : MDIncrementalRefreshOrderBook43( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDIncrementalRefreshOrderBook43() = default; - MDIncrementalRefreshOrderBook43( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDIncrementalRefreshOrderBook43( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDIncrementalRefreshOrderBook43( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)11; - } + MDIncrementalRefreshOrderBook43(char *buffer, const std::uint64_t bufferLength) : + MDIncrementalRefreshOrderBook43(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)43; - } + MDIncrementalRefreshOrderBook43( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDIncrementalRefreshOrderBook43(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(11); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "X"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(43); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDIncrementalRefreshOrderBook43 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshOrderBook43( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDIncrementalRefreshOrderBook43 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "X"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDIncrementalRefreshOrderBook43( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDIncrementalRefreshOrderBook43 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshOrderBook43(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDIncrementalRefreshOrderBook43 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshOrderBook43( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDIncrementalRefreshOrderBook43 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDIncrementalRefreshOrderBook43( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDIncrementalRefreshOrderBook43 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshOrderBook43(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDIncrementalRefreshOrderBook43 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() 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); + } - MDIncrementalRefreshOrderBook43 & - transactTime(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; - } + MDIncrementalRefreshOrderBook43 &transactTime(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 *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - class NoMDEntries { + class NoMDEntries + { 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; + 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; - } + 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 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) { + 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(40)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 40; + 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 40; + } + + 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 NoMDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *OrderIDMetaAttribute(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 orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 7; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return UINT64_C(0xffffffffffffffff); + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + if (m_actingVersion < 7) + { + return UINT64_C(0xffffffffffffffff); + } + + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoMDEntries &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *MDOrderPriorityMetaAttribute(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 mDOrderPriorityId() SBE_NOEXCEPT + { + return 37707; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDOrderPrioritySinceVersion() SBE_NOEXCEPT + { + return 7; + } + + SBE_NODISCARD bool mDOrderPriorityInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDOrderPrioritySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDOrderPriorityEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityNullValue() SBE_NOEXCEPT + { + return UINT64_C(0xffffffffffffffff); + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t mDOrderPriorityEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t mDOrderPriority() const SBE_NOEXCEPT + { + if (m_actingVersion < 7) + { + return UINT64_C(0xffffffffffffffff); + } + + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoMDEntries &mDOrderPriority(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT + { + return 270; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryPxEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + +private: + PRICENULL m_mDEntryPx; + +public: + SBE_NODISCARD PRICENULL &mDEntryPx() + { + m_mDEntryPx.wrap(m_buffer, m_offset + 16, m_actingVersion, m_bufferLength); + return m_mDEntryPx; + } + + SBE_NODISCARD static const char *MDDisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDDisplayQtyId() SBE_NOEXCEPT + { + return 37706; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDDisplayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDDisplayQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDDisplayQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDDisplayQtyEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t mDDisplayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t mDDisplayQty() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &mDDisplayQty(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *MDUpdateActionMetaAttribute(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 mDUpdateActionId() SBE_NOEXCEPT + { + return 279; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDUpdateActionSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint8_t)); + return MDUpdateAction::get((val)); + } + + NoMDEntries &mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 33; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDEntryTypeBook::Value mDEntryType() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 33, sizeof(char)); + return MDEntryTypeBook::get((val)); + } + + NoMDEntries &mDEntryType(const MDEntryTypeBook::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 33, &val, sizeof(char)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("MDOrderPriority": )"; + builder << +writer.mDOrderPriority(); + + builder << ", "; + builder << R"("MDEntryPx": )"; + builder << writer.mDEntryPx(); + + builder << ", "; + builder << R"("MDDisplayQty": )"; + builder << +writer.mDDisplayQty(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("MDUpdateAction": )"; + builder << '"' << writer.mDUpdateAction() << '"'; + + builder << ", "; + builder << R"("MDEntryType": )"; + builder << '"' << writer.mDEntryType() << '"'; + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)40); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 40; - 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; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 40; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - OrderIDMetaAttribute(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 orderIDId() SBE_NOEXCEPT { return 37; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - orderIDSinceVersion() SBE_NOEXCEPT { - return 7; - } - - SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= orderIDSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - orderIDEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT { - return 0xffffffffffffffffL; - } - - static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT { - if (m_actingVersion < 7) { - return 0xffffffffffffffffL; - } - - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoMDEntries &orderID(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); - return *this; - } - - SBE_NODISCARD static const char *MDOrderPriorityMetaAttribute( - 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 mDOrderPriorityId() SBE_NOEXCEPT { - return 37707; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDOrderPrioritySinceVersion() SBE_NOEXCEPT { - return 7; - } - - SBE_NODISCARD bool mDOrderPriorityInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDOrderPrioritySinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDOrderPriorityEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityNullValue() SBE_NOEXCEPT { - return 0xffffffffffffffffL; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t - mDOrderPriorityEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t mDOrderPriority() const SBE_NOEXCEPT { - if (m_actingVersion < 7) { - return 0xffffffffffffffffL; - } - - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoMDEntries &mDOrderPriority(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT { - return 270; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryPxSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryPxSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryPxEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - private: - PRICENULL m_mDEntryPx; - - public: - SBE_NODISCARD PRICENULL &mDEntryPx() { - m_mDEntryPx.wrap( - m_buffer, m_offset + 16, m_actingVersion, m_bufferLength); - return m_mDEntryPx; - } - - SBE_NODISCARD static const char *MDDisplayQtyMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDDisplayQtyId() SBE_NOEXCEPT { - return 37706; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDDisplayQtySinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDDisplayQtyInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDDisplayQtySinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDDisplayQtyEncodingOffset() SBE_NOEXCEPT { - return 24; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - mDDisplayQtyEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t mDDisplayQty() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &mDDisplayQty(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { - return 48; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= securityIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 28; - } - - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char *MDUpdateActionMetaAttribute( - 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 mDUpdateActionId() SBE_NOEXCEPT { - return 279; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDUpdateActionSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 32; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint8_t)); - return MDUpdateAction::get((val)); - } - - NoMDEntries & - mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 33; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDEntryTypeBook::Value mDEntryType() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 33, sizeof(char)); - return MDEntryTypeBook::get((val)); - } - - NoMDEntries & - mDEntryType(const MDEntryTypeBook::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 33, &val, sizeof(char)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("OrderID": )"; - builder << +writer.orderID(); - - builder << ", "; - builder << R"("MDOrderPriority": )"; - builder << +writer.mDOrderPriority(); - - builder << ", "; - builder << R"("MDEntryPx": )"; - builder << writer.mDEntryPx(); - - builder << ", "; - builder << R"("MDDisplayQty": )"; - builder << +writer.mDDisplayQty(); - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("MDUpdateAction": )"; - builder << '"' << writer.mDUpdateAction() << '"'; - - builder << ", "; - builder << R"("MDEntryType": )"; - builder << '"' << writer.mDEntryType() << '"'; - - builder << '}'; - - return builder; - } - }; - - private: - NoMDEntries m_noMDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } - - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDIncrementalRefreshOrderBook43 _writer) { - MDIncrementalRefreshOrderBook43 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDIncrementalRefreshOrderBook43", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDIncrementalRefreshOrderBook43 _writer) +{ + MDIncrementalRefreshOrderBook43 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDIncrementalRefreshOrderBook43", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noMDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshOrderBook47.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshOrderBook47.h index a0df04a4d..cab5a8132 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshOrderBook47.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshOrderBook47.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,973 +86,1133 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDIncrementalRefreshOrderBook47 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDIncrementalRefreshOrderBook47 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(11); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(47); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDIncrementalRefreshOrderBook47() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDIncrementalRefreshOrderBook47( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDIncrementalRefreshOrderBook47( - char *buffer, const std::uint64_t bufferLength) - : MDIncrementalRefreshOrderBook47( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDIncrementalRefreshOrderBook47() = default; - MDIncrementalRefreshOrderBook47( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDIncrementalRefreshOrderBook47( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDIncrementalRefreshOrderBook47( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)11; - } + MDIncrementalRefreshOrderBook47(char *buffer, const std::uint64_t bufferLength) : + MDIncrementalRefreshOrderBook47(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)47; - } + MDIncrementalRefreshOrderBook47( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDIncrementalRefreshOrderBook47(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(11); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "X"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(47); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDIncrementalRefreshOrderBook47 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshOrderBook47( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDIncrementalRefreshOrderBook47 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "X"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDIncrementalRefreshOrderBook47( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDIncrementalRefreshOrderBook47 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshOrderBook47(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDIncrementalRefreshOrderBook47 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshOrderBook47( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDIncrementalRefreshOrderBook47 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDIncrementalRefreshOrderBook47( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDIncrementalRefreshOrderBook47 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshOrderBook47(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDIncrementalRefreshOrderBook47 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() 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); + } - MDIncrementalRefreshOrderBook47 & - transactTime(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; - } + MDIncrementalRefreshOrderBook47 &transactTime(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 *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - class NoMDEntries { + class NoMDEntries + { 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; + 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; - } + 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 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) { + 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(40)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 40; + 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 40; + } + + 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 NoMDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 7; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return UINT64_C(0xffffffffffffffff); + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + if (m_actingVersion < 7) + { + return UINT64_C(0xffffffffffffffff); + } + + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoMDEntries &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *MDOrderPriorityMetaAttribute(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 mDOrderPriorityId() SBE_NOEXCEPT + { + return 37707; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDOrderPrioritySinceVersion() SBE_NOEXCEPT + { + return 7; + } + + SBE_NODISCARD bool mDOrderPriorityInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDOrderPrioritySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDOrderPriorityEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityNullValue() SBE_NOEXCEPT + { + return UINT64_C(0xffffffffffffffff); + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t mDOrderPriorityEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t mDOrderPriority() const SBE_NOEXCEPT + { + if (m_actingVersion < 7) + { + return UINT64_C(0xffffffffffffffff); + } + + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoMDEntries &mDOrderPriority(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT + { + return 270; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryPxSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryPxEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + +private: + PRICENULL9 m_mDEntryPx; + +public: + SBE_NODISCARD PRICENULL9 &mDEntryPx() + { + m_mDEntryPx.wrap(m_buffer, m_offset + 16, m_actingVersion, m_bufferLength); + return m_mDEntryPx; + } + + SBE_NODISCARD static const char *MDDisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDDisplayQtyId() SBE_NOEXCEPT + { + return 37706; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDDisplayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDDisplayQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDDisplayQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDDisplayQtyEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t mDDisplayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t mDDisplayQty() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &mDDisplayQty(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *MDUpdateActionMetaAttribute(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 mDUpdateActionId() SBE_NOEXCEPT + { + return 279; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDUpdateActionSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint8_t)); + return MDUpdateAction::get((val)); + } + + NoMDEntries &mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 33; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDEntryTypeBook::Value mDEntryType() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 33, sizeof(char)); + return MDEntryTypeBook::get((val)); + } + + NoMDEntries &mDEntryType(const MDEntryTypeBook::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 33, &val, sizeof(char)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("MDOrderPriority": )"; + builder << +writer.mDOrderPriority(); + + builder << ", "; + builder << R"("MDEntryPx": )"; + builder << writer.mDEntryPx(); + + builder << ", "; + builder << R"("MDDisplayQty": )"; + builder << +writer.mDDisplayQty(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("MDUpdateAction": )"; + builder << '"' << writer.mDUpdateAction() << '"'; + + builder << ", "; + builder << R"("MDEntryType": )"; + builder << '"' << writer.mDEntryType() << '"'; + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)40); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 40; - 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; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 40; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT { return 37; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - orderIDSinceVersion() SBE_NOEXCEPT { - return 7; - } - - SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= orderIDSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - orderIDEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT { - return 0xffffffffffffffffL; - } - - static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT { - if (m_actingVersion < 7) { - return 0xffffffffffffffffL; - } - - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoMDEntries &orderID(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); - return *this; - } - - SBE_NODISCARD static const char *MDOrderPriorityMetaAttribute( - 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 mDOrderPriorityId() SBE_NOEXCEPT { - return 37707; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDOrderPrioritySinceVersion() SBE_NOEXCEPT { - return 7; - } - - SBE_NODISCARD bool mDOrderPriorityInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDOrderPrioritySinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDOrderPriorityEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityNullValue() SBE_NOEXCEPT { - return 0xffffffffffffffffL; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t - mDOrderPriorityEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t mDOrderPriority() const SBE_NOEXCEPT { - if (m_actingVersion < 7) { - return 0xffffffffffffffffL; - } - - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoMDEntries &mDOrderPriority(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT { - return 270; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryPxSinceVersion() SBE_NOEXCEPT { - return 9; - } - - SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryPxSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryPxEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - private: - PRICENULL9 m_mDEntryPx; - - public: - SBE_NODISCARD PRICENULL9 &mDEntryPx() { - m_mDEntryPx.wrap( - m_buffer, m_offset + 16, m_actingVersion, m_bufferLength); - return m_mDEntryPx; - } - - SBE_NODISCARD static const char *MDDisplayQtyMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDDisplayQtyId() SBE_NOEXCEPT { - return 37706; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDDisplayQtySinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDDisplayQtyInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDDisplayQtySinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDDisplayQtyEncodingOffset() SBE_NOEXCEPT { - return 24; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - mDDisplayQtyEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t mDDisplayQty() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &mDDisplayQty(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { - return 48; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= securityIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 28; - } - - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char *MDUpdateActionMetaAttribute( - 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 mDUpdateActionId() SBE_NOEXCEPT { - return 279; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDUpdateActionSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 32; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint8_t)); - return MDUpdateAction::get((val)); - } - - NoMDEntries & - mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 33; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDEntryTypeBook::Value mDEntryType() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 33, sizeof(char)); - return MDEntryTypeBook::get((val)); - } - - NoMDEntries & - mDEntryType(const MDEntryTypeBook::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 33, &val, sizeof(char)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("OrderID": )"; - builder << +writer.orderID(); - - builder << ", "; - builder << R"("MDOrderPriority": )"; - builder << +writer.mDOrderPriority(); - - builder << ", "; - builder << R"("MDEntryPx": )"; - builder << writer.mDEntryPx(); - - builder << ", "; - builder << R"("MDDisplayQty": )"; - builder << +writer.mDDisplayQty(); - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("MDUpdateAction": )"; - builder << '"' << writer.mDUpdateAction() << '"'; - - builder << ", "; - builder << R"("MDEntryType": )"; - builder << '"' << writer.mDEntryType() << '"'; - - builder << '}'; - - return builder; - } - }; - - private: - NoMDEntries m_noMDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } - - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDIncrementalRefreshOrderBook47 _writer) { - MDIncrementalRefreshOrderBook47 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDIncrementalRefreshOrderBook47", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDIncrementalRefreshOrderBook47 _writer) +{ + MDIncrementalRefreshOrderBook47 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDIncrementalRefreshOrderBook47", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noMDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshSessionStatistics35.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshSessionStatistics35.h index 3f1342ab8..e5d7794b3 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshSessionStatistics35.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshSessionStatistics35.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,957 +86,1113 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDIncrementalRefreshSessionStatistics35 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDIncrementalRefreshSessionStatistics35 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(11); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(35); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDIncrementalRefreshSessionStatistics35() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDIncrementalRefreshSessionStatistics35( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDIncrementalRefreshSessionStatistics35( - char *buffer, const std::uint64_t bufferLength) - : MDIncrementalRefreshSessionStatistics35( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDIncrementalRefreshSessionStatistics35() = default; - MDIncrementalRefreshSessionStatistics35( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDIncrementalRefreshSessionStatistics35( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDIncrementalRefreshSessionStatistics35( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)11; - } + MDIncrementalRefreshSessionStatistics35(char *buffer, const std::uint64_t bufferLength) : + MDIncrementalRefreshSessionStatistics35(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)35; - } + MDIncrementalRefreshSessionStatistics35( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDIncrementalRefreshSessionStatistics35(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(11); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "X"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(35); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDIncrementalRefreshSessionStatistics35 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshSessionStatistics35( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDIncrementalRefreshSessionStatistics35 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "X"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDIncrementalRefreshSessionStatistics35( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDIncrementalRefreshSessionStatistics35 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshSessionStatistics35(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDIncrementalRefreshSessionStatistics35 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshSessionStatistics35( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDIncrementalRefreshSessionStatistics35 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDIncrementalRefreshSessionStatistics35( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDIncrementalRefreshSessionStatistics35 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshSessionStatistics35(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDIncrementalRefreshSessionStatistics35 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() 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); + } - MDIncrementalRefreshSessionStatistics35 & - transactTime(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; - } + MDIncrementalRefreshSessionStatistics35 &transactTime(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 *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - class NoMDEntries { + class NoMDEntries + { 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; + 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; - } + 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 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) { + 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(24)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 24; + 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 24; + } + + 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 NoMDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT + { + return 270; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE m_mDEntryPx; + +public: + SBE_NODISCARD PRICE &mDEntryPx() + { + m_mDEntryPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_mDEntryPx; + } + + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &securityID(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 *RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT + { + return 83; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t rptSeqSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= rptSeqSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t rptSeqEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *OpenCloseSettlFlagMetaAttribute(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 openCloseSettlFlagId() SBE_NOEXCEPT + { + return 286; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t openCloseSettlFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool openCloseSettlFlagInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= openCloseSettlFlagSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t openCloseSettlFlagEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t openCloseSettlFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OpenCloseSettlFlag::Value openCloseSettlFlag() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return OpenCloseSettlFlag::get((val)); + } + + NoMDEntries &openCloseSettlFlag(const OpenCloseSettlFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MDUpdateActionMetaAttribute(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 mDUpdateActionId() SBE_NOEXCEPT + { + return 279; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDUpdateActionSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); + return MDUpdateAction::get((val)); + } + + NoMDEntries &mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDEntryTypeStatistics::Value mDEntryType() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 18, sizeof(char)); + return MDEntryTypeStatistics::get((val)); + } + + NoMDEntries &mDEntryType(const MDEntryTypeStatistics::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 18, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char *MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT + { + return 271; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntrySizeSinceVersion() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntrySizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingOffset() SBE_NOEXCEPT + { + return 19; + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t mDEntrySize() const SBE_NOEXCEPT + { + if (m_actingVersion < 8) + { + return INT32_C(2147483647); + } + + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 19, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &mDEntrySize(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 19, &val, sizeof(std::int32_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("MDEntryPx": )"; + builder << writer.mDEntryPx(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("RptSeq": )"; + builder << +writer.rptSeq(); + + builder << ", "; + builder << R"("OpenCloseSettlFlag": )"; + builder << '"' << writer.openCloseSettlFlag() << '"'; + + builder << ", "; + builder << R"("MDUpdateAction": )"; + builder << '"' << writer.mDUpdateAction() << '"'; + + builder << ", "; + builder << R"("MDEntryType": )"; + builder << '"' << writer.mDEntryType() << '"'; + + builder << ", "; + builder << R"("MDEntrySize": )"; + builder << +writer.mDEntrySize(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)24); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 24; - 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; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 24; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT { - return 270; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryPxSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDEntryPxSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryPxEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - private: - PRICE m_mDEntryPx; - - public: - SBE_NODISCARD PRICE &mDEntryPx() { - m_mDEntryPx.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_mDEntryPx; - } - - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { - return 48; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= securityIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &securityID(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 * - RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT { return 83; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - rptSeqSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= rptSeqSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - rptSeqEncodingOffset() SBE_NOEXCEPT { - return 12; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT { - return 4294967294; - } - - static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint32_t)); - return *this; - } - - SBE_NODISCARD static const char *OpenCloseSettlFlagMetaAttribute( - 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 openCloseSettlFlagId() SBE_NOEXCEPT { - return 286; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - openCloseSettlFlagSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool openCloseSettlFlagInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= openCloseSettlFlagSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - openCloseSettlFlagEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - openCloseSettlFlagEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD OpenCloseSettlFlag::Value - openCloseSettlFlag() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); - return OpenCloseSettlFlag::get((val)); - } - - NoMDEntries & - openCloseSettlFlag(const OpenCloseSettlFlag::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char *MDUpdateActionMetaAttribute( - 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 mDUpdateActionId() SBE_NOEXCEPT { - return 279; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDUpdateActionSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 17; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); - return MDUpdateAction::get((val)); - } - - NoMDEntries & - mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 18; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDEntryTypeStatistics::Value - mDEntryType() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 18, sizeof(char)); - return MDEntryTypeStatistics::get((val)); - } - - NoMDEntries & - mDEntryType(const MDEntryTypeStatistics::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 18, &val, sizeof(char)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT { - return 271; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntrySizeSinceVersion() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntrySizeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingOffset() SBE_NOEXCEPT { - return 19; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t mDEntrySize() const SBE_NOEXCEPT { - if (m_actingVersion < 8) { - return 2147483647; - } - - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 19, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &mDEntrySize(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 19, &val, sizeof(std::int32_t)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("MDEntryPx": )"; - builder << writer.mDEntryPx(); - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("RptSeq": )"; - builder << +writer.rptSeq(); - - builder << ", "; - builder << R"("OpenCloseSettlFlag": )"; - builder << '"' << writer.openCloseSettlFlag() << '"'; - - builder << ", "; - builder << R"("MDUpdateAction": )"; - builder << '"' << writer.mDUpdateAction() << '"'; - - builder << ", "; - builder << R"("MDEntryType": )"; - builder << '"' << writer.mDEntryType() << '"'; - - builder << ", "; - builder << R"("MDEntrySize": )"; - builder << +writer.mDEntrySize(); - - builder << '}'; - - return builder; - } - }; - - private: - NoMDEntries m_noMDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } - - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDIncrementalRefreshSessionStatistics35 _writer) { - MDIncrementalRefreshSessionStatistics35 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDIncrementalRefreshSessionStatistics35", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDIncrementalRefreshSessionStatistics35 _writer) +{ + MDIncrementalRefreshSessionStatistics35 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDIncrementalRefreshSessionStatistics35", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noMDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshSessionStatistics51.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshSessionStatistics51.h index f7603fd2d..f2c4e333f 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshSessionStatistics51.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshSessionStatistics51.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,953 +86,1108 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDIncrementalRefreshSessionStatistics51 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDIncrementalRefreshSessionStatistics51 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(11); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(51); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDIncrementalRefreshSessionStatistics51() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDIncrementalRefreshSessionStatistics51( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDIncrementalRefreshSessionStatistics51( - char *buffer, const std::uint64_t bufferLength) - : MDIncrementalRefreshSessionStatistics51( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDIncrementalRefreshSessionStatistics51() = default; - MDIncrementalRefreshSessionStatistics51( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDIncrementalRefreshSessionStatistics51( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDIncrementalRefreshSessionStatistics51( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)11; - } + MDIncrementalRefreshSessionStatistics51(char *buffer, const std::uint64_t bufferLength) : + MDIncrementalRefreshSessionStatistics51(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)51; - } + MDIncrementalRefreshSessionStatistics51( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDIncrementalRefreshSessionStatistics51(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(11); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "X"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(51); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDIncrementalRefreshSessionStatistics51 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshSessionStatistics51( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDIncrementalRefreshSessionStatistics51 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "X"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDIncrementalRefreshSessionStatistics51( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDIncrementalRefreshSessionStatistics51 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshSessionStatistics51(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDIncrementalRefreshSessionStatistics51 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshSessionStatistics51( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDIncrementalRefreshSessionStatistics51 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDIncrementalRefreshSessionStatistics51( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDIncrementalRefreshSessionStatistics51 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshSessionStatistics51(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDIncrementalRefreshSessionStatistics51 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() 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); + } - MDIncrementalRefreshSessionStatistics51 & - transactTime(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; - } + MDIncrementalRefreshSessionStatistics51 &transactTime(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 *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - class NoMDEntries { + class NoMDEntries + { 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; + 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; - } + 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 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) { + 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(24)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 24; + 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 24; + } + + 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 NoMDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT + { + return 270; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryPxSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICE9 m_mDEntryPx; + +public: + SBE_NODISCARD PRICE9 &mDEntryPx() + { + m_mDEntryPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_mDEntryPx; + } + + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &securityID(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 *RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT + { + return 83; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t rptSeqSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= rptSeqSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t rptSeqEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *OpenCloseSettlFlagMetaAttribute(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 openCloseSettlFlagId() SBE_NOEXCEPT + { + return 286; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t openCloseSettlFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool openCloseSettlFlagInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= openCloseSettlFlagSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t openCloseSettlFlagEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t openCloseSettlFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OpenCloseSettlFlag::Value openCloseSettlFlag() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); + return OpenCloseSettlFlag::get((val)); + } + + NoMDEntries &openCloseSettlFlag(const OpenCloseSettlFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MDUpdateActionMetaAttribute(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 mDUpdateActionId() SBE_NOEXCEPT + { + return 279; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDUpdateActionSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); + return MDUpdateAction::get((val)); + } + + NoMDEntries &mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 18; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDEntryTypeStatistics::Value mDEntryType() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 18, sizeof(char)); + return MDEntryTypeStatistics::get((val)); + } + + NoMDEntries &mDEntryType(const MDEntryTypeStatistics::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 18, &val, sizeof(char)); + return *this; + } + + SBE_NODISCARD static const char *MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT + { + return 271; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntrySizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntrySizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingOffset() SBE_NOEXCEPT + { + return 19; + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t mDEntrySize() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 19, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &mDEntrySize(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 19, &val, sizeof(std::int32_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("MDEntryPx": )"; + builder << writer.mDEntryPx(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("RptSeq": )"; + builder << +writer.rptSeq(); + + builder << ", "; + builder << R"("OpenCloseSettlFlag": )"; + builder << '"' << writer.openCloseSettlFlag() << '"'; + + builder << ", "; + builder << R"("MDUpdateAction": )"; + builder << '"' << writer.mDUpdateAction() << '"'; + + builder << ", "; + builder << R"("MDEntryType": )"; + builder << '"' << writer.mDEntryType() << '"'; + + builder << ", "; + builder << R"("MDEntrySize": )"; + builder << +writer.mDEntrySize(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)24); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 24; - 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; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 24; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT { - return 270; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryPxSinceVersion() SBE_NOEXCEPT { - return 9; - } - - SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDEntryPxSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryPxEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - private: - PRICE9 m_mDEntryPx; - - public: - SBE_NODISCARD PRICE9 &mDEntryPx() { - m_mDEntryPx.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_mDEntryPx; - } - - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { - return 48; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= securityIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &securityID(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 * - RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT { return 83; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - rptSeqSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= rptSeqSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - rptSeqEncodingOffset() SBE_NOEXCEPT { - return 12; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT { - return 4294967294; - } - - static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint32_t)); - return *this; - } - - SBE_NODISCARD static const char *OpenCloseSettlFlagMetaAttribute( - 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 openCloseSettlFlagId() SBE_NOEXCEPT { - return 286; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - openCloseSettlFlagSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool openCloseSettlFlagInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= openCloseSettlFlagSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - openCloseSettlFlagEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - openCloseSettlFlagEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD OpenCloseSettlFlag::Value - openCloseSettlFlag() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint8_t)); - return OpenCloseSettlFlag::get((val)); - } - - NoMDEntries & - openCloseSettlFlag(const OpenCloseSettlFlag::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char *MDUpdateActionMetaAttribute( - 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 mDUpdateActionId() SBE_NOEXCEPT { - return 279; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDUpdateActionSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 17; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); - return MDUpdateAction::get((val)); - } - - NoMDEntries & - mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 18; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDEntryTypeStatistics::Value - mDEntryType() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 18, sizeof(char)); - return MDEntryTypeStatistics::get((val)); - } - - NoMDEntries & - mDEntryType(const MDEntryTypeStatistics::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 18, &val, sizeof(char)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT { - return 271; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntrySizeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntrySizeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingOffset() SBE_NOEXCEPT { - return 19; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t mDEntrySize() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 19, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &mDEntrySize(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 19, &val, sizeof(std::int32_t)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("MDEntryPx": )"; - builder << writer.mDEntryPx(); - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("RptSeq": )"; - builder << +writer.rptSeq(); - - builder << ", "; - builder << R"("OpenCloseSettlFlag": )"; - builder << '"' << writer.openCloseSettlFlag() << '"'; - - builder << ", "; - builder << R"("MDUpdateAction": )"; - builder << '"' << writer.mDUpdateAction() << '"'; - - builder << ", "; - builder << R"("MDEntryType": )"; - builder << '"' << writer.mDEntryType() << '"'; - - builder << ", "; - builder << R"("MDEntrySize": )"; - builder << +writer.mDEntrySize(); - - builder << '}'; - - return builder; - } - }; - - private: - NoMDEntries m_noMDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } - - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDIncrementalRefreshSessionStatistics51 _writer) { - MDIncrementalRefreshSessionStatistics51 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDIncrementalRefreshSessionStatistics51", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDIncrementalRefreshSessionStatistics51 _writer) +{ + MDIncrementalRefreshSessionStatistics51 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDIncrementalRefreshSessionStatistics51", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noMDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshTradeSummary42.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshTradeSummary42.h index 067d0dc96..2c6d35750 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshTradeSummary42.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshTradeSummary42.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,1495 +86,1734 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDIncrementalRefreshTradeSummary42 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDIncrementalRefreshTradeSummary42 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(11); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(42); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDIncrementalRefreshTradeSummary42() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDIncrementalRefreshTradeSummary42( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDIncrementalRefreshTradeSummary42( - char *buffer, const std::uint64_t bufferLength) - : MDIncrementalRefreshTradeSummary42( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDIncrementalRefreshTradeSummary42() = default; - MDIncrementalRefreshTradeSummary42( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDIncrementalRefreshTradeSummary42( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDIncrementalRefreshTradeSummary42( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)11; - } + MDIncrementalRefreshTradeSummary42(char *buffer, const std::uint64_t bufferLength) : + MDIncrementalRefreshTradeSummary42(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)42; - } + MDIncrementalRefreshTradeSummary42( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDIncrementalRefreshTradeSummary42(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(11); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "X"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(42); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDIncrementalRefreshTradeSummary42 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshTradeSummary42( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDIncrementalRefreshTradeSummary42 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "X"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDIncrementalRefreshTradeSummary42( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDIncrementalRefreshTradeSummary42 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshTradeSummary42(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDIncrementalRefreshTradeSummary42 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshTradeSummary42( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDIncrementalRefreshTradeSummary42 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDIncrementalRefreshTradeSummary42( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDIncrementalRefreshTradeSummary42 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshTradeSummary42(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } - - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } - - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } - - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } - - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= transactTimeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } - - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - MDIncrementalRefreshTradeSummary42 & - transactTime(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 *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - private: - MatchEventIndicator m_matchEventIndicator; - - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } - - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } - - class NoMDEntries { - 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((std::uint16_t)32); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 32; - 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 32; - } - - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } - - std::uint64_t sbeCheckPosition(const std::uint64_t position) { - if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) { + // 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; - } + } + return position; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT { - return m_count; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT { - return m_index < m_count; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDIncrementalRefreshTradeSummary42 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - inline NoMDEntries &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; + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - return *this; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } -#endif + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } - SBE_NODISCARD static const char * - MDEntryPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint16_t mDEntryPxId() SBE_NOEXCEPT { - return 270; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryPxSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDEntryPxSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryPxEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MDIncrementalRefreshTradeSummary42 &transactTime(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 *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= matchEventIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + +private: + MatchEventIndicator m_matchEventIndicator; + +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } + + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + class NoMDEntries + { private: - PRICE m_mDEntryPx; + 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: - SBE_NODISCARD PRICE &mDEntryPx() { - m_mDEntryPx.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_mDEntryPx; - } - - SBE_NODISCARD static const char * - MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT { - return 271; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntrySizeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntrySizeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t mDEntrySize() 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); - } - - NoMDEntries &mDEntrySize(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 * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { - return 48; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= securityIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 12; - } - - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT { return 83; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - rptSeqSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= rptSeqSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - rptSeqEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT { - return 4294967294; - } - - static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); - return *this; - } - - SBE_NODISCARD static const char *NumberOfOrdersMetaAttribute( - 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 numberOfOrdersId() SBE_NOEXCEPT { - return 346; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - numberOfOrdersSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool numberOfOrdersInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= numberOfOrdersSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - numberOfOrdersEncodingOffset() SBE_NOEXCEPT { - return 20; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - numberOfOrdersEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t numberOfOrders() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &numberOfOrders(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char *AggressorSideMetaAttribute( - 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 aggressorSideId() SBE_NOEXCEPT { - return 5797; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - aggressorSideSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool aggressorSideInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= aggressorSideSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - aggressorSideEncodingOffset() SBE_NOEXCEPT { - return 24; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - aggressorSideEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD AggressorSide::Value aggressorSide() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint8_t)); - return AggressorSide::get((val)); - } - - NoMDEntries & - aggressorSide(const AggressorSide::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char *MDUpdateActionMetaAttribute( - 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 mDUpdateActionId() SBE_NOEXCEPT { - return 279; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDUpdateActionSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 25; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 25, sizeof(std::uint8_t)); - return MDUpdateAction::get((val)); - } - - NoMDEntries & - mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 25, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 26; - } - - static SBE_CONSTEXPR char mDEntryTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char mDEntryTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char mDEntryTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t mDEntryTypeLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD const char *mDEntryType() const { - static const std::uint8_t mDEntryTypeValues[] = {50}; - - return (const char *)mDEntryTypeValues; - } - - SBE_NODISCARD char mDEntryType(const std::uint64_t index) const { - static const std::uint8_t mDEntryTypeValues[] = {50}; - - return (char)mDEntryTypeValues[index]; - } - - std::uint64_t - getMDEntryType(char *dst, const std::uint64_t length) const { - static std::uint8_t mDEntryTypeValues[] = {50}; - std::uint64_t bytesToCopy = length < sizeof(mDEntryTypeValues) - ? length - : sizeof(mDEntryTypeValues); - - std::memcpy(dst, mDEntryTypeValues, static_cast(bytesToCopy)); - return bytesToCopy; - } - - std::string getMDEntryTypeAsString() const { - static const std::uint8_t MDEntryTypeValues[] = {50}; - - return std::string((const char *)MDEntryTypeValues, 1); - } - - std::string getMDEntryTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getMDEntryTypeAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } + 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(32)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 32; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } - return oss.str(); - } + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD static const char *MDTradeEntryIDMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 32; + } - static SBE_CONSTEXPR std::uint16_t mDTradeEntryIDId() SBE_NOEXCEPT { - return 37711; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDTradeEntryIDSinceVersion() SBE_NOEXCEPT { - return 7; - } + // 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; + } - SBE_NODISCARD bool mDTradeEntryIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDTradeEntryIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDTradeEntryIDEncodingOffset() SBE_NOEXCEPT { - return 26; - } + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - static SBE_CONSTEXPR std::uint32_t - mDTradeEntryIDNullValue() SBE_NOEXCEPT { - return 4294967295; - } + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } - static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMinValue() SBE_NOEXCEPT { - return 0; - } + inline NoMDEntries &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; - static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + return *this; + } - static SBE_CONSTEXPR std::size_t - mDTradeEntryIDEncodingLength() SBE_NOEXCEPT { - return 4; - } + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } - SBE_NODISCARD std::uint32_t mDTradeEntryID() const SBE_NOEXCEPT { - if (m_actingVersion < 7) { - return 4294967295; - } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 26, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - NoMDEntries &mDTradeEntryID(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 26, &val, sizeof(std::uint32_t)); - return *this; - } + #endif - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("MDEntryPx": )"; - builder << writer.mDEntryPx(); + SBE_NODISCARD static const char *MDEntryPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - builder << ", "; - builder << R"("MDEntrySize": )"; - builder << +writer.mDEntrySize(); + static SBE_CONSTEXPR std::uint16_t mDEntryPxId() SBE_NOEXCEPT + { + return 270; + } - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } - builder << ", "; - builder << R"("RptSeq": )"; - builder << +writer.rptSeq(); + SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } - builder << ", "; - builder << R"("NumberOfOrders": )"; - builder << +writer.numberOfOrders(); + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - builder << ", "; - builder << R"("AggressorSide": )"; - builder << '"' << writer.aggressorSide() << '"'; +private: + PRICE m_mDEntryPx; - builder << ", "; - builder << R"("MDUpdateAction": )"; - builder << '"' << writer.mDUpdateAction() << '"'; +public: + SBE_NODISCARD PRICE &mDEntryPx() + { + m_mDEntryPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_mDEntryPx; + } - builder << ", "; - builder << R"("MDTradeEntryID": )"; - builder << +writer.mDTradeEntryID(); + SBE_NODISCARD static const char *MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - builder << '}'; + static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT + { + return 271; + } - return builder; - } - }; + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntrySizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - private: - NoMDEntries m_noMDEntries; + SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntrySizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } + static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } + static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } + static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } - class NoOrderIDEntries { - 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::int32_t mDEntrySize() 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); + } - SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { - return m_positionPtr; - } + NoMDEntries &mDEntrySize(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; + } - public: - inline void wrapForDecode( - char *buffer, - std::uint64_t *pos, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - GroupSize8Byte 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 + 8; - } + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - inline void wrapForEncode( - char *buffer, - const std::uint8_t count, - std::uint64_t *pos, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT + { + return 83; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t rptSeqSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= rptSeqSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t rptSeqEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *NumberOfOrdersMetaAttribute(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 numberOfOrdersId() SBE_NOEXCEPT + { + return 346; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t numberOfOrdersSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool numberOfOrdersInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= numberOfOrdersSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t numberOfOrdersEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t numberOfOrdersEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t numberOfOrders() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &numberOfOrders(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *AggressorSideMetaAttribute(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 aggressorSideId() SBE_NOEXCEPT + { + return 5797; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t aggressorSideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool aggressorSideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= aggressorSideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t aggressorSideEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t aggressorSideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD AggressorSide::Value aggressorSide() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint8_t)); + return AggressorSide::get((val)); + } + + NoMDEntries &aggressorSide(const AggressorSide::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MDUpdateActionMetaAttribute(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 mDUpdateActionId() SBE_NOEXCEPT + { + return 279; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDUpdateActionSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 25; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 25, sizeof(std::uint8_t)); + return MDUpdateAction::get((val)); + } + + NoMDEntries &mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 25, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 26; + } + + static SBE_CONSTEXPR char mDEntryTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char mDEntryTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char mDEntryTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t mDEntryTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *mDEntryType() const + { + static const std::uint8_t mDEntryTypeValues[] = { 50 }; + + return (const char *)mDEntryTypeValues; + } + + SBE_NODISCARD char mDEntryType(const std::uint64_t index) const + { + static const std::uint8_t mDEntryTypeValues[] = { 50 }; + + return (char)mDEntryTypeValues[index]; + } + + std::uint64_t getMDEntryType(char *dst, const std::uint64_t length) const + { + static std::uint8_t mDEntryTypeValues[] = { 50 }; + std::uint64_t bytesToCopy = length < sizeof(mDEntryTypeValues) ? length : sizeof(mDEntryTypeValues); + + std::memcpy(dst, mDEntryTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getMDEntryTypeAsString() const + { + static const std::uint8_t MDEntryTypeValues[] = { 50 }; + + return std::string((const char *)MDEntryTypeValues, 1); + } + + std::string getMDEntryTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMDEntryTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char *MDTradeEntryIDMetaAttribute(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 mDTradeEntryIDId() SBE_NOEXCEPT + { + return 37711; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDTradeEntryIDSinceVersion() SBE_NOEXCEPT + { + return 7; + } + + SBE_NODISCARD bool mDTradeEntryIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDTradeEntryIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDTradeEntryIDEncodingOffset() SBE_NOEXCEPT + { + return 26; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDNullValue() SBE_NOEXCEPT + { + return UINT32_C(0xffffffff); + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t mDTradeEntryIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t mDTradeEntryID() const SBE_NOEXCEPT + { + if (m_actingVersion < 7) + { + return UINT32_C(0xffffffff); + } + + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 26, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &mDTradeEntryID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 26, &val, sizeof(std::uint32_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("MDEntryPx": )"; + builder << writer.mDEntryPx(); + + builder << ", "; + builder << R"("MDEntrySize": )"; + builder << +writer.mDEntrySize(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("RptSeq": )"; + builder << +writer.rptSeq(); + + builder << ", "; + builder << R"("NumberOfOrders": )"; + builder << +writer.numberOfOrders(); + + builder << ", "; + builder << R"("AggressorSide": )"; + builder << '"' << writer.aggressorSide() << '"'; + + builder << ", "; + builder << R"("MDUpdateAction": )"; + builder << '"' << writer.mDUpdateAction() << '"'; + + builder << ", "; + builder << R"("MDTradeEntryID": )"; + builder << +writer.mDTradeEntryID(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize8Byte dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)16); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 16; - m_actingVersion = actingVersion; - m_initialPosition = *pos; - m_positionPtr = pos; - *m_positionPtr = *m_positionPtr + 8; - } + } + }; - static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT { - return 8; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 16; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoOrderIDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize8Byte dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - OrderIDMetaAttribute(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 orderIDId() SBE_NOEXCEPT { return 37; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - orderIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= orderIDSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - orderIDEncodingOffset() SBE_NOEXCEPT { - return 0; - } + class NoOrderIDEntries + { + 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; - static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } - static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT { - return 0x0L; - } + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize8Byte 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 + 8; + } - static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + 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; + GroupSize8Byte 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 + 8; + } - static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 16; + } - NoOrderIDEntries &orderID(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); - return *this; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - SBE_NODISCARD static const char * - LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + // 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; + } - static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT { return 32; } + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lastQtySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoOrderIDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize8Byte dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *OrderIDMetaAttribute(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 orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoOrderIDEntries &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= lastQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastQtyEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int32_t lastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t lastQtyMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t lastQtyMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t lastQty() 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); + } + + NoOrderIDEntries &lastQty(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; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoOrderIDEntries writer) + { + builder << '{'; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("LastQty": )"; + builder << +writer.lastQty(); + + 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: + NoOrderIDEntries m_noOrderIDEntries; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoOrderIDEntriesId() SBE_NOEXCEPT + { + return 37705; + } + + SBE_NODISCARD inline NoOrderIDEntries &noOrderIDEntries() + { + m_noOrderIDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderIDEntries; + } + + NoOrderIDEntries &noOrderIDEntriesCount(const std::uint8_t count) + { + m_noOrderIDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderIDEntries; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noOrderIDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noOrderIDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lastQtySinceVersion(); + return m_actingVersion >= noOrderIDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lastQtyEncodingOffset() SBE_NOEXCEPT { - return 8; - } +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDIncrementalRefreshTradeSummary42 _writer) +{ + MDIncrementalRefreshTradeSummary42 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDIncrementalRefreshTradeSummary42", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; - static SBE_CONSTEXPR std::int32_t lastQtyNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); - static SBE_CONSTEXPR std::int32_t lastQtyMinValue() SBE_NOEXCEPT { - return -2147483647; - } + builder << ", "; + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); - static SBE_CONSTEXPR std::int32_t lastQtyMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t lastQty() 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); - } - - NoOrderIDEntries &lastQty(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; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoOrderIDEntries writer) { - builder << '{'; - builder << R"("OrderID": )"; - builder << +writer.orderID(); - - builder << ", "; - builder << R"("LastQty": )"; - builder << +writer.lastQty(); - - builder << '}'; - - return builder; - } - }; - - private: - NoOrderIDEntries m_noOrderIDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoOrderIDEntriesId() SBE_NOEXCEPT { - return 37705; - } - - SBE_NODISCARD inline NoOrderIDEntries &noOrderIDEntries() { - m_noOrderIDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noOrderIDEntries; - } - - NoOrderIDEntries &noOrderIDEntriesCount(const std::uint8_t count) { - m_noOrderIDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noOrderIDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noOrderIDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noOrderIDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noOrderIDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDIncrementalRefreshTradeSummary42 _writer) { - MDIncrementalRefreshTradeSummary42 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDIncrementalRefreshTradeSummary42", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoOrderIDEntries": [)"; - writer.noOrderIDEntries().forEach( - [&](NoOrderIDEntries &noOrderIDEntries) { - if (atLeastOne) { - builder << ", "; - } - atLeastOne = true; - builder << noOrderIDEntries; - }); - builder << ']'; - } + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoOrderIDEntries": [)"; + writer.noOrderIDEntries().forEach([&](NoOrderIDEntries& noOrderIDEntries) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderIDEntries; + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); + noOrderIDEntries().forEach([](NoOrderIDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength( + std::size_t noMDEntriesLength = 0, + std::size_t noOrderIDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + length += NoOrderIDEntries::sbeHeaderSize(); + if (noOrderIDEntriesLength > 254LL) + { + throw std::runtime_error("noOrderIDEntriesLength outside of allowed range [E110]"); + } + length += noOrderIDEntriesLength *NoOrderIDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshTradeSummary48.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshTradeSummary48.h index 2799a10d7..42083b632 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshTradeSummary48.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshTradeSummary48.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,1491 +86,1729 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDIncrementalRefreshTradeSummary48 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDIncrementalRefreshTradeSummary48 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(11); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(48); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDIncrementalRefreshTradeSummary48() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDIncrementalRefreshTradeSummary48( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDIncrementalRefreshTradeSummary48( - char *buffer, const std::uint64_t bufferLength) - : MDIncrementalRefreshTradeSummary48( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDIncrementalRefreshTradeSummary48() = default; - MDIncrementalRefreshTradeSummary48( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDIncrementalRefreshTradeSummary48( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDIncrementalRefreshTradeSummary48( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)11; - } + MDIncrementalRefreshTradeSummary48(char *buffer, const std::uint64_t bufferLength) : + MDIncrementalRefreshTradeSummary48(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)48; - } + MDIncrementalRefreshTradeSummary48( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDIncrementalRefreshTradeSummary48(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(11); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "X"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(48); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDIncrementalRefreshTradeSummary48 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshTradeSummary48( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDIncrementalRefreshTradeSummary48 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "X"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDIncrementalRefreshTradeSummary48( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDIncrementalRefreshTradeSummary48 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshTradeSummary48(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDIncrementalRefreshTradeSummary48 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshTradeSummary48( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDIncrementalRefreshTradeSummary48 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDIncrementalRefreshTradeSummary48( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDIncrementalRefreshTradeSummary48 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshTradeSummary48(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } - - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } - - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } - - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } - - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= transactTimeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } - - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - MDIncrementalRefreshTradeSummary48 & - transactTime(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 *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - private: - MatchEventIndicator m_matchEventIndicator; - - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } - - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } - - class NoMDEntries { - 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((std::uint16_t)32); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 32; - 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 32; - } - - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } - - std::uint64_t sbeCheckPosition(const std::uint64_t position) { - if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) { + // 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; - } + } + return position; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT { - return m_count; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT { - return m_index < m_count; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDIncrementalRefreshTradeSummary48 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - inline NoMDEntries &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; + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - return *this; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } -#endif + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } - SBE_NODISCARD static const char * - MDEntryPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint16_t mDEntryPxId() SBE_NOEXCEPT { - return 270; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryPxSinceVersion() SBE_NOEXCEPT { - return 9; - } - - SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDEntryPxSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryPxEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + MDIncrementalRefreshTradeSummary48 &transactTime(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 *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= matchEventIndicatorSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + +private: + MatchEventIndicator m_matchEventIndicator; + +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } + + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + class NoMDEntries + { private: - PRICE9 m_mDEntryPx; + 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: - SBE_NODISCARD PRICE9 &mDEntryPx() { - m_mDEntryPx.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_mDEntryPx; - } - - SBE_NODISCARD static const char * - MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT { - return 271; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntrySizeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntrySizeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t mDEntrySize() 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); - } - - NoMDEntries &mDEntrySize(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 * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { - return 48; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= securityIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 12; - } - - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT { return 83; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - rptSeqSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= rptSeqSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - rptSeqEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT { - return 4294967294; - } - - static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); - return *this; - } - - SBE_NODISCARD static const char *NumberOfOrdersMetaAttribute( - 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 numberOfOrdersId() SBE_NOEXCEPT { - return 346; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - numberOfOrdersSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool numberOfOrdersInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= numberOfOrdersSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - numberOfOrdersEncodingOffset() SBE_NOEXCEPT { - return 20; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - numberOfOrdersEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t numberOfOrders() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &numberOfOrders(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char *AggressorSideMetaAttribute( - 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 aggressorSideId() SBE_NOEXCEPT { - return 5797; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - aggressorSideSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool aggressorSideInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= aggressorSideSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - aggressorSideEncodingOffset() SBE_NOEXCEPT { - return 24; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - aggressorSideEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD AggressorSide::Value aggressorSide() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint8_t)); - return AggressorSide::get((val)); - } - - NoMDEntries & - aggressorSide(const AggressorSide::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char *MDUpdateActionMetaAttribute( - 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 mDUpdateActionId() SBE_NOEXCEPT { - return 279; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDUpdateActionSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 25; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 25, sizeof(std::uint8_t)); - return MDUpdateAction::get((val)); - } - - NoMDEntries & - mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 25, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 26; - } - - static SBE_CONSTEXPR char mDEntryTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char mDEntryTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char mDEntryTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t mDEntryTypeLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD const char *mDEntryType() const { - static const std::uint8_t mDEntryTypeValues[] = {50}; - - return (const char *)mDEntryTypeValues; - } - - SBE_NODISCARD char mDEntryType(const std::uint64_t index) const { - static const std::uint8_t mDEntryTypeValues[] = {50}; - - return (char)mDEntryTypeValues[index]; - } - - std::uint64_t - getMDEntryType(char *dst, const std::uint64_t length) const { - static std::uint8_t mDEntryTypeValues[] = {50}; - std::uint64_t bytesToCopy = length < sizeof(mDEntryTypeValues) - ? length - : sizeof(mDEntryTypeValues); - - std::memcpy(dst, mDEntryTypeValues, static_cast(bytesToCopy)); - return bytesToCopy; - } - - std::string getMDEntryTypeAsString() const { - static const std::uint8_t MDEntryTypeValues[] = {50}; - - return std::string((const char *)MDEntryTypeValues, 1); - } - - std::string getMDEntryTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getMDEntryTypeAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } + 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(32)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 32; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } - return oss.str(); - } + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD static const char *MDTradeEntryIDMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 32; + } - static SBE_CONSTEXPR std::uint16_t mDTradeEntryIDId() SBE_NOEXCEPT { - return 37711; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDTradeEntryIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + // 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; + } - SBE_NODISCARD bool mDTradeEntryIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDTradeEntryIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDTradeEntryIDEncodingOffset() SBE_NOEXCEPT { - return 26; - } + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - static SBE_CONSTEXPR std::uint32_t - mDTradeEntryIDNullValue() SBE_NOEXCEPT { - return 4294967295; - } + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } - static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMinValue() SBE_NOEXCEPT { - return 0; - } + inline NoMDEntries &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; - static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + return *this; + } - static SBE_CONSTEXPR std::size_t - mDTradeEntryIDEncodingLength() SBE_NOEXCEPT { - return 4; - } + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } - SBE_NODISCARD std::uint32_t mDTradeEntryID() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 26, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - NoMDEntries &mDTradeEntryID(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 26, &val, sizeof(std::uint32_t)); - return *this; - } + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("MDEntryPx": )"; - builder << writer.mDEntryPx(); + #endif - builder << ", "; - builder << R"("MDEntrySize": )"; - builder << +writer.mDEntrySize(); + SBE_NODISCARD static const char *MDEntryPxMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Price"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); + static SBE_CONSTEXPR std::uint16_t mDEntryPxId() SBE_NOEXCEPT + { + return 270; + } - builder << ", "; - builder << R"("RptSeq": )"; - builder << +writer.rptSeq(); + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryPxSinceVersion() SBE_NOEXCEPT + { + return 9; + } - builder << ", "; - builder << R"("NumberOfOrders": )"; - builder << +writer.numberOfOrders(); + SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } - builder << ", "; - builder << R"("AggressorSide": )"; - builder << '"' << writer.aggressorSide() << '"'; + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - builder << ", "; - builder << R"("MDUpdateAction": )"; - builder << '"' << writer.mDUpdateAction() << '"'; +private: + PRICE9 m_mDEntryPx; - builder << ", "; - builder << R"("MDTradeEntryID": )"; - builder << +writer.mDTradeEntryID(); +public: + SBE_NODISCARD PRICE9 &mDEntryPx() + { + m_mDEntryPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_mDEntryPx; + } - builder << '}'; + SBE_NODISCARD static const char *MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - return builder; - } - }; + static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT + { + return 271; + } - private: - NoMDEntries m_noMDEntries; + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntrySizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } + SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntrySizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } + static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } + static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - class NoOrderIDEntries { - 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; + static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { - return m_positionPtr; - } + SBE_NODISCARD std::int32_t mDEntrySize() 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); + } - public: - inline void wrapForDecode( - char *buffer, - std::uint64_t *pos, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - GroupSize8Byte 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 + 8; - } + NoMDEntries &mDEntrySize(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; + } - inline void wrapForEncode( - char *buffer, - const std::uint8_t count, - std::uint64_t *pos, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT + { + return 83; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t rptSeqSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= rptSeqSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t rptSeqEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *NumberOfOrdersMetaAttribute(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 numberOfOrdersId() SBE_NOEXCEPT + { + return 346; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t numberOfOrdersSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool numberOfOrdersInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= numberOfOrdersSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t numberOfOrdersEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t numberOfOrdersEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t numberOfOrders() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &numberOfOrders(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *AggressorSideMetaAttribute(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 aggressorSideId() SBE_NOEXCEPT + { + return 5797; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t aggressorSideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool aggressorSideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= aggressorSideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t aggressorSideEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t aggressorSideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD AggressorSide::Value aggressorSide() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint8_t)); + return AggressorSide::get((val)); + } + + NoMDEntries &aggressorSide(const AggressorSide::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MDUpdateActionMetaAttribute(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 mDUpdateActionId() SBE_NOEXCEPT + { + return 279; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDUpdateActionSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 25; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 25, sizeof(std::uint8_t)); + return MDUpdateAction::get((val)); + } + + NoMDEntries &mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 25, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 26; + } + + static SBE_CONSTEXPR char mDEntryTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char mDEntryTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char mDEntryTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t mDEntryTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *mDEntryType() const + { + static const std::uint8_t mDEntryTypeValues[] = { 50 }; + + return (const char *)mDEntryTypeValues; + } + + SBE_NODISCARD char mDEntryType(const std::uint64_t index) const + { + static const std::uint8_t mDEntryTypeValues[] = { 50 }; + + return (char)mDEntryTypeValues[index]; + } + + std::uint64_t getMDEntryType(char *dst, const std::uint64_t length) const + { + static std::uint8_t mDEntryTypeValues[] = { 50 }; + std::uint64_t bytesToCopy = length < sizeof(mDEntryTypeValues) ? length : sizeof(mDEntryTypeValues); + + std::memcpy(dst, mDEntryTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getMDEntryTypeAsString() const + { + static const std::uint8_t MDEntryTypeValues[] = { 50 }; + + return std::string((const char *)MDEntryTypeValues, 1); + } + + std::string getMDEntryTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMDEntryTypeAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char *MDTradeEntryIDMetaAttribute(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 mDTradeEntryIDId() SBE_NOEXCEPT + { + return 37711; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDTradeEntryIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDTradeEntryIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDTradeEntryIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDTradeEntryIDEncodingOffset() SBE_NOEXCEPT + { + return 26; + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDNullValue() SBE_NOEXCEPT + { + return UINT32_C(0xffffffff); + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t mDTradeEntryIDMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t mDTradeEntryIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t mDTradeEntryID() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 26, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &mDTradeEntryID(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 26, &val, sizeof(std::uint32_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("MDEntryPx": )"; + builder << writer.mDEntryPx(); + + builder << ", "; + builder << R"("MDEntrySize": )"; + builder << +writer.mDEntrySize(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("RptSeq": )"; + builder << +writer.rptSeq(); + + builder << ", "; + builder << R"("NumberOfOrders": )"; + builder << +writer.numberOfOrders(); + + builder << ", "; + builder << R"("AggressorSide": )"; + builder << '"' << writer.aggressorSide() << '"'; + + builder << ", "; + builder << R"("MDUpdateAction": )"; + builder << '"' << writer.mDUpdateAction() << '"'; + + builder << ", "; + builder << R"("MDTradeEntryID": )"; + builder << +writer.mDTradeEntryID(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize8Byte dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)16); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 16; - m_actingVersion = actingVersion; - m_initialPosition = *pos; - m_positionPtr = pos; - *m_positionPtr = *m_positionPtr + 8; - } + } + }; - static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT { - return 8; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 16; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoOrderIDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize8Byte dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - OrderIDMetaAttribute(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 orderIDId() SBE_NOEXCEPT { return 37; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - orderIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= orderIDSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - orderIDEncodingOffset() SBE_NOEXCEPT { - return 0; - } + class NoOrderIDEntries + { + 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; - static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } - static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT { - return 0x0L; - } + public: + inline void wrapForDecode( + char *buffer, + std::uint64_t *pos, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + GroupSize8Byte 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 + 8; + } - static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + 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; + GroupSize8Byte 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 + 8; + } - static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 16; + } - NoOrderIDEntries &orderID(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); - return *this; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - SBE_NODISCARD static const char * - LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + // 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; + } - static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT { return 32; } + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lastQtySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } + + inline NoOrderIDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize8Byte dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *OrderIDMetaAttribute(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 orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoOrderIDEntries &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *LastQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastQtyId() SBE_NOEXCEPT + { + return 32; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= lastQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastQtyEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int32_t lastQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t lastQtyMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t lastQtyMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t lastQty() 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); + } + + NoOrderIDEntries &lastQty(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; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoOrderIDEntries writer) + { + builder << '{'; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("LastQty": )"; + builder << +writer.lastQty(); + + 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: + NoOrderIDEntries m_noOrderIDEntries; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoOrderIDEntriesId() SBE_NOEXCEPT + { + return 37705; + } + + SBE_NODISCARD inline NoOrderIDEntries &noOrderIDEntries() + { + m_noOrderIDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderIDEntries; + } + + NoOrderIDEntries &noOrderIDEntriesCount(const std::uint8_t count) + { + m_noOrderIDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noOrderIDEntries; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noOrderIDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noOrderIDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lastQtySinceVersion(); + return m_actingVersion >= noOrderIDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lastQtyEncodingOffset() SBE_NOEXCEPT { - return 8; - } +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDIncrementalRefreshTradeSummary48 _writer) +{ + MDIncrementalRefreshTradeSummary48 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDIncrementalRefreshTradeSummary48", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; - static SBE_CONSTEXPR std::int32_t lastQtyNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); - static SBE_CONSTEXPR std::int32_t lastQtyMinValue() SBE_NOEXCEPT { - return -2147483647; - } + builder << ", "; + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); - static SBE_CONSTEXPR std::int32_t lastQtyMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t lastQtyEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t lastQty() 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); - } - - NoOrderIDEntries &lastQty(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; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoOrderIDEntries writer) { - builder << '{'; - builder << R"("OrderID": )"; - builder << +writer.orderID(); - - builder << ", "; - builder << R"("LastQty": )"; - builder << +writer.lastQty(); - - builder << '}'; - - return builder; - } - }; - - private: - NoOrderIDEntries m_noOrderIDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoOrderIDEntriesId() SBE_NOEXCEPT { - return 37705; - } - - SBE_NODISCARD inline NoOrderIDEntries &noOrderIDEntries() { - m_noOrderIDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noOrderIDEntries; - } - - NoOrderIDEntries &noOrderIDEntriesCount(const std::uint8_t count) { - m_noOrderIDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noOrderIDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noOrderIDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noOrderIDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noOrderIDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDIncrementalRefreshTradeSummary48 _writer) { - MDIncrementalRefreshTradeSummary48 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDIncrementalRefreshTradeSummary48", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoOrderIDEntries": [)"; - writer.noOrderIDEntries().forEach( - [&](NoOrderIDEntries &noOrderIDEntries) { - if (atLeastOne) { - builder << ", "; - } - atLeastOne = true; - builder << noOrderIDEntries; - }); - builder << ']'; - } + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoOrderIDEntries": [)"; + writer.noOrderIDEntries().forEach([&](NoOrderIDEntries& noOrderIDEntries) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noOrderIDEntries; + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); + noOrderIDEntries().forEach([](NoOrderIDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength( + std::size_t noMDEntriesLength = 0, + std::size_t noOrderIDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + length += NoOrderIDEntries::sbeHeaderSize(); + if (noOrderIDEntriesLength > 254LL) + { + throw std::runtime_error("noOrderIDEntriesLength outside of allowed range [E110]"); + } + length += noOrderIDEntriesLength *NoOrderIDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshVolume37.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshVolume37.h index c6bdfb710..23538067a 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshVolume37.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDIncrementalRefreshVolume37.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,909 +86,1062 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDIncrementalRefreshVolume37 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDIncrementalRefreshVolume37 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(11); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(37); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDIncrementalRefreshVolume37() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDIncrementalRefreshVolume37( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDIncrementalRefreshVolume37(char *buffer, const std::uint64_t bufferLength) - : MDIncrementalRefreshVolume37( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDIncrementalRefreshVolume37() = default; - MDIncrementalRefreshVolume37( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDIncrementalRefreshVolume37( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDIncrementalRefreshVolume37( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)11; - } + MDIncrementalRefreshVolume37(char *buffer, const std::uint64_t bufferLength) : + MDIncrementalRefreshVolume37(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)37; - } + MDIncrementalRefreshVolume37( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDIncrementalRefreshVolume37(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(11); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "X"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(37); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDIncrementalRefreshVolume37 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshVolume37( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDIncrementalRefreshVolume37 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "X"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDIncrementalRefreshVolume37( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDIncrementalRefreshVolume37 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshVolume37(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDIncrementalRefreshVolume37 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDIncrementalRefreshVolume37( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDIncrementalRefreshVolume37 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDIncrementalRefreshVolume37( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDIncrementalRefreshVolume37 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDIncrementalRefreshVolume37(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDIncrementalRefreshVolume37 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() 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); + } - MDIncrementalRefreshVolume37 & - transactTime(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; - } + MDIncrementalRefreshVolume37 &transactTime(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 *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 8, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - class NoMDEntries { + class NoMDEntries + { 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; + 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; - } + 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 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) { + 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 NoMDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT + { + return 271; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntrySizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntrySizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t mDEntrySize() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &mDEntrySize(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT + { + return 83; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t rptSeqSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= rptSeqSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t rptSeqEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } + + static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } + + static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint32_t)); + return *this; + } + + SBE_NODISCARD static const char *MDUpdateActionMetaAttribute(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 mDUpdateActionId() SBE_NOEXCEPT + { + return 279; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDUpdateActionSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint8_t)); + return MDUpdateAction::get((val)); + } + + NoMDEntries &mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 13; + } + + static SBE_CONSTEXPR char mDEntryTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char mDEntryTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char mDEntryTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t mDEntryTypeLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *mDEntryType() const + { + static const std::uint8_t mDEntryTypeValues[] = { 101 }; + + return (const char *)mDEntryTypeValues; + } + + SBE_NODISCARD char mDEntryType(const std::uint64_t index) const + { + static const std::uint8_t mDEntryTypeValues[] = { 101 }; + + return (char)mDEntryTypeValues[index]; + } + + std::uint64_t getMDEntryType(char *dst, const std::uint64_t length) const + { + static std::uint8_t mDEntryTypeValues[] = { 101 }; + std::uint64_t bytesToCopy = length < sizeof(mDEntryTypeValues) ? length : sizeof(mDEntryTypeValues); + + std::memcpy(dst, mDEntryTypeValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getMDEntryTypeAsString() const + { + static const std::uint8_t MDEntryTypeValues[] = { 101 }; + + return std::string((const char *)MDEntryTypeValues, 1); + } + + std::string getMDEntryTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMDEntryTypeAsString(); + + 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(); + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("MDEntrySize": )"; + builder << +writer.mDEntrySize(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("RptSeq": )"; + builder << +writer.rptSeq(); + + builder << ", "; + builder << R"("MDUpdateAction": )"; + builder << '"' << writer.mDUpdateAction() << '"'; + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)16); - dimensions.numInGroup((std::uint8_t)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; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 16; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT { - return 271; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntrySizeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDEntrySizeSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t mDEntrySize() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &mDEntrySize(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { - return 48; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= securityIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 4; - } - - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT { return 83; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - rptSeqSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= rptSeqSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - rptSeqEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT { - return 4294967294; - } - - static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &rptSeq(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint32_t)); - return *this; - } - - SBE_NODISCARD static const char *MDUpdateActionMetaAttribute( - 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 mDUpdateActionId() SBE_NOEXCEPT { - return 279; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDUpdateActionInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDUpdateActionSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 12; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDUpdateAction::Value mDUpdateAction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint8_t)); - return MDUpdateAction::get((val)); - } - - NoMDEntries & - mDUpdateAction(const MDUpdateAction::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 13; - } - - static SBE_CONSTEXPR char mDEntryTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char mDEntryTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char mDEntryTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t mDEntryTypeLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD const char *mDEntryType() const { - static const std::uint8_t mDEntryTypeValues[] = {101}; - - return (const char *)mDEntryTypeValues; - } - - SBE_NODISCARD char mDEntryType(const std::uint64_t index) const { - static const std::uint8_t mDEntryTypeValues[] = {101}; - - return (char)mDEntryTypeValues[index]; - } - - std::uint64_t - getMDEntryType(char *dst, const std::uint64_t length) const { - static std::uint8_t mDEntryTypeValues[] = {101}; - std::uint64_t bytesToCopy = length < sizeof(mDEntryTypeValues) - ? length - : sizeof(mDEntryTypeValues); - - std::memcpy(dst, mDEntryTypeValues, static_cast(bytesToCopy)); - return bytesToCopy; - } - - std::string getMDEntryTypeAsString() const { - static const std::uint8_t MDEntryTypeValues[] = {101}; - - return std::string((const char *)MDEntryTypeValues, 1); - } - - std::string getMDEntryTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getMDEntryTypeAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } - } - } - - return oss.str(); - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("MDEntrySize": )"; - builder << +writer.mDEntrySize(); - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("RptSeq": )"; - builder << +writer.rptSeq(); - - builder << ", "; - builder << R"("MDUpdateAction": )"; - builder << '"' << writer.mDUpdateAction() << '"'; - - builder << '}'; - - return builder; - } - }; - - private: - NoMDEntries m_noMDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } - - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDIncrementalRefreshVolume37 _writer) { - MDIncrementalRefreshVolume37 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDIncrementalRefreshVolume37", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDIncrementalRefreshVolume37 _writer) +{ + MDIncrementalRefreshVolume37 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDIncrementalRefreshVolume37", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noMDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionFuture27.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionFuture27.h index 24fd9bf3d..1d362ac19 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionFuture27.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionFuture27.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,5889 +86,6404 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDInstrumentDefinitionFuture27 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDInstrumentDefinitionFuture27 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(216); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(27); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDInstrumentDefinitionFuture27() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDInstrumentDefinitionFuture27( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDInstrumentDefinitionFuture27( - char *buffer, const std::uint64_t bufferLength) - : MDInstrumentDefinitionFuture27( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDInstrumentDefinitionFuture27() = default; - MDInstrumentDefinitionFuture27( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDInstrumentDefinitionFuture27( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDInstrumentDefinitionFuture27( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)216; - } + MDInstrumentDefinitionFuture27(char *buffer, const std::uint64_t bufferLength) : + MDInstrumentDefinitionFuture27(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)27; - } + MDInstrumentDefinitionFuture27( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDInstrumentDefinitionFuture27(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(216); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "d"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(27); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDInstrumentDefinitionFuture27 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDInstrumentDefinitionFuture27( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDInstrumentDefinitionFuture27 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "d"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDInstrumentDefinitionFuture27( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDInstrumentDefinitionFuture27 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDInstrumentDefinitionFuture27(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDInstrumentDefinitionFuture27 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDInstrumentDefinitionFuture27( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDInstrumentDefinitionFuture27 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDInstrumentDefinitionFuture27( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDInstrumentDefinitionFuture27 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDInstrumentDefinitionFuture27(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDInstrumentDefinitionFuture27 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD static const char * - TotNumReportsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TotNumReportsMetaAttribute(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 totNumReportsId() SBE_NOEXCEPT { - return 911; - } + static SBE_CONSTEXPR std::uint16_t totNumReportsId() SBE_NOEXCEPT + { + return 911; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - totNumReportsSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNumReportsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= totNumReportsSinceVersion(); + return m_actingVersion >= totNumReportsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - totNumReportsEncodingOffset() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNumReportsEncodingOffset() SBE_NOEXCEPT + { + return 1; + } - static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT { - return 4294967295; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT + { + return UINT32_C(0xffffffff); + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture27 & - totNumReports(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &totNumReports(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityUpdateActionMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityUpdateActionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityUpdateActionId() SBE_NOEXCEPT { - return 980; - } + static SBE_CONSTEXPR std::uint16_t securityUpdateActionId() SBE_NOEXCEPT + { + return 980; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityUpdateActionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityUpdateActionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityUpdateActionSinceVersion(); + return m_actingVersion >= securityUpdateActionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 5; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 5; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD SecurityUpdateAction::Value - securityUpdateAction() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 5, sizeof(char)); - return SecurityUpdateAction::get((val)); - } + SBE_NODISCARD SecurityUpdateAction::Value securityUpdateAction() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 5, sizeof(char)); + return SecurityUpdateAction::get((val)); + } - MDInstrumentDefinitionFuture27 & - securityUpdateAction(const SecurityUpdateAction::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 5, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionFuture27 &securityUpdateAction(const SecurityUpdateAction::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 5, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char * - LastUpdateTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *LastUpdateTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t lastUpdateTimeId() SBE_NOEXCEPT { - return 779; - } + static SBE_CONSTEXPR std::uint16_t lastUpdateTimeId() SBE_NOEXCEPT + { + return 779; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lastUpdateTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastUpdateTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool lastUpdateTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool lastUpdateTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lastUpdateTimeSinceVersion(); + return m_actingVersion >= lastUpdateTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lastUpdateTimeEncodingOffset() SBE_NOEXCEPT { - return 6; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastUpdateTimeEncodingOffset() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t - lastUpdateTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t lastUpdateTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t lastUpdateTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 6, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t lastUpdateTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 6, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - MDInstrumentDefinitionFuture27 & - lastUpdateTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 6, &val, sizeof(std::uint64_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &lastUpdateTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 6, &val, sizeof(std::uint64_t)); + return *this; + } - SBE_NODISCARD static const char *MDSecurityTradingStatusMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MDSecurityTradingStatusMetaAttribute(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 mDSecurityTradingStatusId() SBE_NOEXCEPT { - return 1682; - } + static SBE_CONSTEXPR std::uint16_t mDSecurityTradingStatusId() SBE_NOEXCEPT + { + return 1682; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDSecurityTradingStatusSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDSecurityTradingStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool mDSecurityTradingStatusInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool mDSecurityTradingStatusInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDSecurityTradingStatusSinceVersion(); + return m_actingVersion >= mDSecurityTradingStatusSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDSecurityTradingStatusEncodingOffset() SBE_NOEXCEPT { - return 14; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDSecurityTradingStatusEncodingOffset() SBE_NOEXCEPT + { + return 14; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDSecurityTradingStatusEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDSecurityTradingStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD SecurityTradingStatus::Value - mDSecurityTradingStatus() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); - return SecurityTradingStatus::get((val)); - } + SBE_NODISCARD SecurityTradingStatus::Value mDSecurityTradingStatus() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return SecurityTradingStatus::get((val)); + } - MDInstrumentDefinitionFuture27 &mDSecurityTradingStatus( - const SecurityTradingStatus::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &mDSecurityTradingStatus(const SecurityTradingStatus::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - ApplIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *ApplIDMetaAttribute(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 applIDId() SBE_NOEXCEPT { return 1180; } + static SBE_CONSTEXPR std::uint16_t applIDId() SBE_NOEXCEPT + { + return 1180; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - applIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t applIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool applIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool applIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= applIDSinceVersion(); + return m_actingVersion >= applIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - applIDEncodingOffset() SBE_NOEXCEPT { - return 15; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t applIDEncodingOffset() SBE_NOEXCEPT + { + return 15; + } - static SBE_CONSTEXPR std::int16_t applIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT16; - } + static SBE_CONSTEXPR std::int16_t applIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT16; + } - static SBE_CONSTEXPR std::int16_t applIDMinValue() SBE_NOEXCEPT { - return (std::int16_t)-32767; - } + static SBE_CONSTEXPR std::int16_t applIDMinValue() SBE_NOEXCEPT + { + return static_cast(-32767); + } - static SBE_CONSTEXPR std::int16_t applIDMaxValue() SBE_NOEXCEPT { - return (std::int16_t)32767; - } + static SBE_CONSTEXPR std::int16_t applIDMaxValue() SBE_NOEXCEPT + { + return static_cast(32767); + } - static SBE_CONSTEXPR std::size_t applIDEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t applIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::int16_t applID() const SBE_NOEXCEPT { - std::int16_t val; - std::memcpy(&val, m_buffer + m_offset + 15, sizeof(std::int16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::int16_t applID() const SBE_NOEXCEPT + { + std::int16_t val; + std::memcpy(&val, m_buffer + m_offset + 15, sizeof(std::int16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MDInstrumentDefinitionFuture27 & - applID(const std::int16_t value) SBE_NOEXCEPT { - std::int16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 15, &val, sizeof(std::int16_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &applID(const std::int16_t value) SBE_NOEXCEPT + { + std::int16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 15, &val, sizeof(std::int16_t)); + return *this; + } - SBE_NODISCARD static const char *MarketSegmentIDMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MarketSegmentIDMetaAttribute(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 marketSegmentIDId() SBE_NOEXCEPT { - return 1300; - } + static SBE_CONSTEXPR std::uint16_t marketSegmentIDId() SBE_NOEXCEPT + { + return 1300; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - marketSegmentIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketSegmentIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= marketSegmentIDSinceVersion(); + return m_actingVersion >= marketSegmentIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - marketSegmentIDEncodingOffset() SBE_NOEXCEPT { - return 17; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingOffset() SBE_NOEXCEPT + { + return 17; + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT8; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - marketSegmentIDEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionFuture27 & - marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *UnderlyingProductMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UnderlyingProductMetaAttribute(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 underlyingProductId() SBE_NOEXCEPT { - return 462; - } + static SBE_CONSTEXPR std::uint16_t underlyingProductId() SBE_NOEXCEPT + { + return 462; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - underlyingProductSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t underlyingProductSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool underlyingProductInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool underlyingProductInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= underlyingProductSinceVersion(); + return m_actingVersion >= underlyingProductSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - underlyingProductEncodingOffset() SBE_NOEXCEPT { - return 18; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t underlyingProductEncodingOffset() SBE_NOEXCEPT + { + return 18; + } - static SBE_CONSTEXPR std::uint8_t underlyingProductNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT8; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } - static SBE_CONSTEXPR std::uint8_t underlyingProductMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t underlyingProductMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - underlyingProductEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t underlyingProductEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t underlyingProduct() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t underlyingProduct() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionFuture27 & - underlyingProduct(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &underlyingProduct(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityExchangeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Exchange"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityExchangeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Exchange"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityExchangeId() SBE_NOEXCEPT { - return 207; - } + static SBE_CONSTEXPR std::uint16_t securityExchangeId() SBE_NOEXCEPT + { + return 207; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityExchangeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityExchangeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityExchangeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityExchangeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityExchangeSinceVersion(); + return m_actingVersion >= securityExchangeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityExchangeEncodingOffset() SBE_NOEXCEPT { - return 19; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityExchangeEncodingOffset() SBE_NOEXCEPT + { + return 19; + } - static SBE_CONSTEXPR char securityExchangeNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityExchangeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityExchangeMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityExchangeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityExchangeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityExchangeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - securityExchangeEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t securityExchangeEncodingLength() SBE_NOEXCEPT + { + return 4; + } - static SBE_CONSTEXPR std::uint64_t securityExchangeLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::uint64_t securityExchangeLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD const char *securityExchange() const SBE_NOEXCEPT { - return m_buffer + m_offset + 19; - } + SBE_NODISCARD const char *securityExchange() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 19; + } - SBE_NODISCARD char *securityExchange() SBE_NOEXCEPT { - return m_buffer + m_offset + 19; - } + SBE_NODISCARD char *securityExchange() SBE_NOEXCEPT + { + return m_buffer + m_offset + 19; + } - SBE_NODISCARD char securityExchange(const std::uint64_t index) const { - if (index >= 4) { - throw std::runtime_error( - "index out of range for securityExchange [E104]"); - } + SBE_NODISCARD char securityExchange(const std::uint64_t index) const + { + if (index >= 4) + { + throw std::runtime_error("index out of range for securityExchange [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 19 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 19 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture27 & - securityExchange(const std::uint64_t index, const char value) { - if (index >= 4) { - throw std::runtime_error( - "index out of range for securityExchange [E105]"); - } + MDInstrumentDefinitionFuture27 &securityExchange(const std::uint64_t index, const char value) + { + if (index >= 4) + { + throw std::runtime_error("index out of range for securityExchange [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 19 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 19 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityExchange(char *const dst, const std::uint64_t length) const { - if (length > 4) { - throw std::runtime_error( - "length too large for getSecurityExchange [E106]"); - } + std::uint64_t getSecurityExchange(char *const dst, const std::uint64_t length) const + { + if (length > 4) + { + throw std::runtime_error("length too large for getSecurityExchange [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 19, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 19, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture27 & - putSecurityExchange(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 19, src, sizeof(char) * 4); - return *this; - } + MDInstrumentDefinitionFuture27 &putSecurityExchange(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 19, src, sizeof(char) * 4); + return *this; + } - MDInstrumentDefinitionFuture27 &putSecurityExchange( - const char value0, - const char value1, - const char value2, - const char value3) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 19, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 20, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 21, &val2, sizeof(char)); - char val3 = (value3); - std::memcpy(m_buffer + m_offset + 22, &val3, sizeof(char)); + MDInstrumentDefinitionFuture27 &putSecurityExchange( + const char value0, + const char value1, + const char value2, + const char value3) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 19, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 20, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 21, &val2, sizeof(char)); + char val3 = (value3); + std::memcpy(m_buffer + m_offset + 22, &val3, sizeof(char)); - return *this; - } + return *this; + } - std::string getSecurityExchangeAsString() const { - const char *buffer = m_buffer + m_offset + 19; - size_t length = 0; + SBE_NODISCARD std::string getSecurityExchangeAsString() const + { + const char *buffer = m_buffer + m_offset + 19; + size_t length = 0; - for (; length < 4 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 4 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityExchangeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityExchangeAsString(); + std::string getSecurityExchangeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityExchangeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityExchangeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 19; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityExchangeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 19; + size_t length = 0; - for (; length < 4 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 4 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture27 & - putSecurityExchange(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 4) { - throw std::runtime_error( - "string too large for putSecurityExchange [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture27 &putSecurityExchange(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 4) + { + throw std::runtime_error("string too large for putSecurityExchange [E106]"); + } - std::memcpy(m_buffer + m_offset + 19, str.data(), srcLength); - for (size_t start = srcLength; start < 4; ++start) { - m_buffer[m_offset + 19 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 19, str.data(), srcLength); + for (size_t start = srcLength; start < 4; ++start) + { + m_buffer[m_offset + 19 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture27 &putSecurityExchange(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 4) { - throw std::runtime_error( - "string too large for putSecurityExchange [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture27 &putSecurityExchange(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 4) + { + throw std::runtime_error("string too large for putSecurityExchange [E106]"); + } - std::memcpy(m_buffer + m_offset + 19, str.c_str(), srcLength); - for (size_t start = srcLength; start < 4; ++start) { - m_buffer[m_offset + 19 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 19, str.c_str(), srcLength); + for (size_t start = srcLength; start < 4; ++start) + { + m_buffer[m_offset + 19 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT { - return 1151; - } + static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT + { + return 1151; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityGroupSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityGroupSinceVersion(); + return m_actingVersion >= securityGroupSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityGroupEncodingOffset() SBE_NOEXCEPT { - return 23; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityGroupEncodingOffset() SBE_NOEXCEPT + { + return 23; + } - static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT { - return m_buffer + m_offset + 23; - } + SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 23; + } - SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT { - return m_buffer + m_offset + 23; - } + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 23; + } - SBE_NODISCARD char securityGroup(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error( - "index out of range for securityGroup [E104]"); - } + SBE_NODISCARD char securityGroup(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 23 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 23 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture27 & - securityGroup(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error( - "index out of range for securityGroup [E105]"); - } + MDInstrumentDefinitionFuture27 &securityGroup(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 23 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 23 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityGroup(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error( - "length too large for getSecurityGroup [E106]"); - } + std::uint64_t getSecurityGroup(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityGroup [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 23, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 23, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture27 & - putSecurityGroup(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 23, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionFuture27 &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 23, src, sizeof(char) * 6); + return *this; + } - std::string getSecurityGroupAsString() const { - const char *buffer = m_buffer + m_offset + 23; - size_t length = 0; + SBE_NODISCARD std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 23; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityGroupAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityGroupAsString(); + std::string getSecurityGroupAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityGroupAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 23; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 23; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture27 & - putSecurityGroup(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityGroup [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture27 &putSecurityGroup(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } - std::memcpy(m_buffer + m_offset + 23, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 23 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 23, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 23 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture27 &putSecurityGroup(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityGroup [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture27 &putSecurityGroup(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } - std::memcpy(m_buffer + m_offset + 23, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 23 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 23, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 23 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - AssetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *AssetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t assetId() SBE_NOEXCEPT { return 6937; } + static SBE_CONSTEXPR std::uint16_t assetId() SBE_NOEXCEPT + { + return 6937; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - assetSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t assetSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool assetInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool assetInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= assetSinceVersion(); + return m_actingVersion >= assetSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - assetEncodingOffset() SBE_NOEXCEPT { - return 29; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t assetEncodingOffset() SBE_NOEXCEPT + { + return 29; + } - static SBE_CONSTEXPR char assetNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char assetNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char assetMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char assetMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char assetMaxValue() SBE_NOEXCEPT { return (char)126; } + static SBE_CONSTEXPR char assetMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t assetEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t assetEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t assetLength() SBE_NOEXCEPT { return 6; } + static SBE_CONSTEXPR std::uint64_t assetLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *asset() const SBE_NOEXCEPT { - return m_buffer + m_offset + 29; - } + SBE_NODISCARD const char *asset() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 29; + } - SBE_NODISCARD char *asset() SBE_NOEXCEPT { return m_buffer + m_offset + 29; } + SBE_NODISCARD char *asset() SBE_NOEXCEPT + { + return m_buffer + m_offset + 29; + } - SBE_NODISCARD char asset(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for asset [E104]"); - } + SBE_NODISCARD char asset(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for asset [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 29 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 29 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture27 & - asset(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for asset [E105]"); - } + MDInstrumentDefinitionFuture27 &asset(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for asset [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 29 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 29 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getAsset(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error("length too large for getAsset [E106]"); - } + std::uint64_t getAsset(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getAsset [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 29, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 29, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture27 & - putAsset(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 29, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionFuture27 &putAsset(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 29, src, sizeof(char) * 6); + return *this; + } - std::string getAssetAsString() const { - const char *buffer = m_buffer + m_offset + 29; - size_t length = 0; + SBE_NODISCARD std::string getAssetAsString() const + { + const char *buffer = m_buffer + m_offset + 29; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getAssetAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getAssetAsString(); + std::string getAssetAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getAssetAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getAssetAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 29; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getAssetAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 29; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture27 &putAsset(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putAsset [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture27 &putAsset(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putAsset [E106]"); + } - std::memcpy(m_buffer + m_offset + 29, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 29 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 29, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 29 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture27 &putAsset(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putAsset [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture27 &putAsset(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putAsset [E106]"); + } - std::memcpy(m_buffer + m_offset + 29, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 29 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 29, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 29 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t symbolId() SBE_NOEXCEPT { return 55; } + static SBE_CONSTEXPR std::uint16_t symbolId() SBE_NOEXCEPT + { + return 55; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - symbolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t symbolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool symbolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool symbolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= symbolSinceVersion(); + return m_actingVersion >= symbolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - symbolEncodingOffset() SBE_NOEXCEPT { - return 35; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t symbolEncodingOffset() SBE_NOEXCEPT + { + return 35; + } - static SBE_CONSTEXPR char symbolNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char symbolNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char symbolMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char symbolMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char symbolMaxValue() SBE_NOEXCEPT { return (char)126; } + static SBE_CONSTEXPR char symbolMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t symbolEncodingLength() SBE_NOEXCEPT { - return 20; - } + static SBE_CONSTEXPR std::size_t symbolEncodingLength() SBE_NOEXCEPT + { + return 20; + } - static SBE_CONSTEXPR std::uint64_t symbolLength() SBE_NOEXCEPT { return 20; } + static SBE_CONSTEXPR std::uint64_t symbolLength() SBE_NOEXCEPT + { + return 20; + } - SBE_NODISCARD const char *symbol() const SBE_NOEXCEPT { - return m_buffer + m_offset + 35; - } + SBE_NODISCARD const char *symbol() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 35; + } - SBE_NODISCARD char *symbol() SBE_NOEXCEPT { - return m_buffer + m_offset + 35; - } + SBE_NODISCARD char *symbol() SBE_NOEXCEPT + { + return m_buffer + m_offset + 35; + } - SBE_NODISCARD char symbol(const std::uint64_t index) const { - if (index >= 20) { - throw std::runtime_error("index out of range for symbol [E104]"); - } + SBE_NODISCARD char symbol(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 35 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 35 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture27 & - symbol(const std::uint64_t index, const char value) { - if (index >= 20) { - throw std::runtime_error("index out of range for symbol [E105]"); - } + MDInstrumentDefinitionFuture27 &symbol(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 35 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 35 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getSymbol(char *const dst, const std::uint64_t length) const { - if (length > 20) { - throw std::runtime_error("length too large for getSymbol [E106]"); - } + std::uint64_t getSymbol(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSymbol [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 35, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 35, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture27 & - putSymbol(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 35, src, sizeof(char) * 20); - return *this; - } + MDInstrumentDefinitionFuture27 &putSymbol(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 35, src, sizeof(char) * 20); + return *this; + } - std::string getSymbolAsString() const { - const char *buffer = m_buffer + m_offset + 35; - size_t length = 0; + SBE_NODISCARD std::string getSymbolAsString() const + { + const char *buffer = m_buffer + m_offset + 35; + size_t length = 0; - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSymbolAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSymbolAsString(); + std::string getSymbolAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSymbolAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSymbolAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 35; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSymbolAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 35; + size_t length = 0; - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture27 &putSymbol(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error("string too large for putSymbol [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture27 &putSymbol(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } - std::memcpy(m_buffer + m_offset + 35, str.data(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 35 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 35, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 35 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture27 &putSymbol(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error("string too large for putSymbol [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture27 &putSymbol(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } - std::memcpy(m_buffer + m_offset + 35, str.c_str(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 35 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 35, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 35 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { return 48; } + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityIDSinceVersion(); + return m_actingVersion >= securityIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 55; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 55; + } - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 55, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 55, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture27 & - securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 55, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 55, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityIDSourceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityIDSourceId() SBE_NOEXCEPT { - return 22; - } + static SBE_CONSTEXPR std::uint16_t securityIDSourceId() SBE_NOEXCEPT + { + return 22; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSourceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityIDSourceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityIDSourceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityIDSourceSinceVersion(); + return m_actingVersion >= securityIDSourceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDSourceEncodingOffset() SBE_NOEXCEPT { - return 59; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 59; + } - static SBE_CONSTEXPR char securityIDSourceNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityIDSourceNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityIDSourceMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityIDSourceMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityIDSourceMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityIDSourceMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - securityIDSourceEncodingLength() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::size_t securityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t securityIDSourceLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::uint64_t securityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD const char *securityIDSource() const { - static const std::uint8_t securityIDSourceValues[] = {56}; + SBE_NODISCARD const char *securityIDSource() const + { + static const std::uint8_t securityIDSourceValues[] = { 56 }; - return (const char *)securityIDSourceValues; - } + return (const char *)securityIDSourceValues; + } - SBE_NODISCARD char securityIDSource(const std::uint64_t index) const { - static const std::uint8_t securityIDSourceValues[] = {56}; + SBE_NODISCARD char securityIDSource(const std::uint64_t index) const + { + static const std::uint8_t securityIDSourceValues[] = { 56 }; - return (char)securityIDSourceValues[index]; - } + return (char)securityIDSourceValues[index]; + } - std::uint64_t - getSecurityIDSource(char *dst, const std::uint64_t length) const { - static std::uint8_t securityIDSourceValues[] = {56}; - std::uint64_t bytesToCopy = length < sizeof(securityIDSourceValues) - ? length - : sizeof(securityIDSourceValues); + std::uint64_t getSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t securityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(securityIDSourceValues) ? length : sizeof(securityIDSourceValues); - std::memcpy( - dst, securityIDSourceValues, static_cast(bytesToCopy)); - return bytesToCopy; - } + std::memcpy(dst, securityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } - std::string getSecurityIDSourceAsString() const { - static const std::uint8_t SecurityIDSourceValues[] = {56}; + std::string getSecurityIDSourceAsString() const + { + static const std::uint8_t SecurityIDSourceValues[] = { 56 }; - return std::string((const char *)SecurityIDSourceValues, 1); - } + return std::string((const char *)SecurityIDSourceValues, 1); + } - std::string getSecurityIDSourceAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityIDSourceAsString(); + std::string getSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityIDSourceAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } - SBE_NODISCARD static const char * - SecurityTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityTypeId() SBE_NOEXCEPT { - return 167; - } + static SBE_CONSTEXPR std::uint16_t securityTypeId() SBE_NOEXCEPT + { + return 167; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityTypeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityTypeSinceVersion(); + return m_actingVersion >= securityTypeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityTypeEncodingOffset() SBE_NOEXCEPT { - return 59; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityTypeEncodingOffset() SBE_NOEXCEPT + { + return 59; + } - static SBE_CONSTEXPR char securityTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t securityTypeEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t securityTypeEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t securityTypeLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::uint64_t securityTypeLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *securityType() const SBE_NOEXCEPT { - return m_buffer + m_offset + 59; - } + SBE_NODISCARD const char *securityType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 59; + } - SBE_NODISCARD char *securityType() SBE_NOEXCEPT { - return m_buffer + m_offset + 59; - } + SBE_NODISCARD char *securityType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 59; + } - SBE_NODISCARD char securityType(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for securityType [E104]"); - } + SBE_NODISCARD char securityType(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityType [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 59 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 59 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture27 & - securityType(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for securityType [E105]"); - } + MDInstrumentDefinitionFuture27 &securityType(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityType [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 59 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 59 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityType(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error( - "length too large for getSecurityType [E106]"); - } + std::uint64_t getSecurityType(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityType [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 59, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 59, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture27 & - putSecurityType(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 59, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionFuture27 &putSecurityType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 59, src, sizeof(char) * 6); + return *this; + } - std::string getSecurityTypeAsString() const { - const char *buffer = m_buffer + m_offset + 59; - size_t length = 0; + SBE_NODISCARD std::string getSecurityTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 59; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityTypeAsString(); + std::string getSecurityTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityTypeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityTypeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 59; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 59; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture27 &putSecurityType(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityType [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture27 &putSecurityType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityType [E106]"); + } - std::memcpy(m_buffer + m_offset + 59, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 59 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 59, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 59 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture27 &putSecurityType(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityType [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture27 &putSecurityType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityType [E106]"); + } - std::memcpy(m_buffer + m_offset + 59, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 59 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 59, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 59 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - CFICodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *CFICodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t cFICodeId() SBE_NOEXCEPT { return 461; } + static SBE_CONSTEXPR std::uint16_t cFICodeId() SBE_NOEXCEPT + { + return 461; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - cFICodeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cFICodeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool cFICodeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool cFICodeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= cFICodeSinceVersion(); + return m_actingVersion >= cFICodeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - cFICodeEncodingOffset() SBE_NOEXCEPT { - return 65; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cFICodeEncodingOffset() SBE_NOEXCEPT + { + return 65; + } - static SBE_CONSTEXPR char cFICodeNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char cFICodeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char cFICodeMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char cFICodeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char cFICodeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char cFICodeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t cFICodeEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t cFICodeEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t cFICodeLength() SBE_NOEXCEPT { return 6; } + static SBE_CONSTEXPR std::uint64_t cFICodeLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *cFICode() const SBE_NOEXCEPT { - return m_buffer + m_offset + 65; - } + SBE_NODISCARD const char *cFICode() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 65; + } - SBE_NODISCARD char *cFICode() SBE_NOEXCEPT { - return m_buffer + m_offset + 65; - } + SBE_NODISCARD char *cFICode() SBE_NOEXCEPT + { + return m_buffer + m_offset + 65; + } - SBE_NODISCARD char cFICode(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for cFICode [E104]"); - } + SBE_NODISCARD char cFICode(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cFICode [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 65 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 65 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture27 & - cFICode(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for cFICode [E105]"); - } + MDInstrumentDefinitionFuture27 &cFICode(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cFICode [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 65 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 65 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getCFICode(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error("length too large for getCFICode [E106]"); - } + std::uint64_t getCFICode(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getCFICode [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 65, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 65, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture27 & - putCFICode(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 65, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionFuture27 &putCFICode(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 65, src, sizeof(char) * 6); + return *this; + } - std::string getCFICodeAsString() const { - const char *buffer = m_buffer + m_offset + 65; - size_t length = 0; + SBE_NODISCARD std::string getCFICodeAsString() const + { + const char *buffer = m_buffer + m_offset + 65; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getCFICodeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getCFICodeAsString(); + std::string getCFICodeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCFICodeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getCFICodeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 65; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCFICodeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 65; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture27 &putCFICode(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putCFICode [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture27 &putCFICode(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCFICode [E106]"); + } - std::memcpy(m_buffer + m_offset + 65, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 65 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 65, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 65 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture27 &putCFICode(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putCFICode [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture27 &putCFICode(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCFICode [E106]"); + } - std::memcpy(m_buffer + m_offset + 65, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 65 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 65, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 65 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char *MaturityMonthYearMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MonthYear"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaturityMonthYearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MonthYear"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t maturityMonthYearId() SBE_NOEXCEPT { - return 200; - } + static SBE_CONSTEXPR std::uint16_t maturityMonthYearId() SBE_NOEXCEPT + { + return 200; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maturityMonthYearSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maturityMonthYearSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool maturityMonthYearInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maturityMonthYearInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maturityMonthYearSinceVersion(); + return m_actingVersion >= maturityMonthYearSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maturityMonthYearEncodingOffset() SBE_NOEXCEPT { - return 71; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maturityMonthYearEncodingOffset() SBE_NOEXCEPT + { + return 71; + } - private: - MaturityMonthYear m_maturityMonthYear; +private: + MaturityMonthYear m_maturityMonthYear; - public: - SBE_NODISCARD MaturityMonthYear &maturityMonthYear() { - m_maturityMonthYear.wrap( - m_buffer, m_offset + 71, m_actingVersion, m_bufferLength); - return m_maturityMonthYear; - } +public: + SBE_NODISCARD MaturityMonthYear &maturityMonthYear() + { + m_maturityMonthYear.wrap(m_buffer, m_offset + 71, m_actingVersion, m_bufferLength); + return m_maturityMonthYear; + } - SBE_NODISCARD static const char * - CurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Currency"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *CurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Currency"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t currencyId() SBE_NOEXCEPT { return 15; } + static SBE_CONSTEXPR std::uint16_t currencyId() SBE_NOEXCEPT + { + return 15; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - currencySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t currencySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool currencyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool currencyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= currencySinceVersion(); + return m_actingVersion >= currencySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - currencyEncodingOffset() SBE_NOEXCEPT { - return 76; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t currencyEncodingOffset() SBE_NOEXCEPT + { + return 76; + } - static SBE_CONSTEXPR char currencyNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char currencyNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char currencyMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char currencyMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char currencyMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char currencyMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t currencyEncodingLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::size_t currencyEncodingLength() SBE_NOEXCEPT + { + return 3; + } - static SBE_CONSTEXPR std::uint64_t currencyLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::uint64_t currencyLength() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD const char *currency() const SBE_NOEXCEPT { - return m_buffer + m_offset + 76; - } + SBE_NODISCARD const char *currency() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 76; + } - SBE_NODISCARD char *currency() SBE_NOEXCEPT { - return m_buffer + m_offset + 76; - } + SBE_NODISCARD char *currency() SBE_NOEXCEPT + { + return m_buffer + m_offset + 76; + } - SBE_NODISCARD char currency(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error("index out of range for currency [E104]"); - } + SBE_NODISCARD char currency(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for currency [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 76 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 76 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture27 & - currency(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error("index out of range for currency [E105]"); - } + MDInstrumentDefinitionFuture27 ¤cy(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for currency [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 76 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 76 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getCurrency(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error("length too large for getCurrency [E106]"); - } + std::uint64_t getCurrency(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getCurrency [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 76, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 76, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture27 & - putCurrency(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 76, src, sizeof(char) * 3); - return *this; - } + MDInstrumentDefinitionFuture27 &putCurrency(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 76, src, sizeof(char) * 3); + return *this; + } - MDInstrumentDefinitionFuture27 &putCurrency( - const char value0, const char value1, const char value2) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 76, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 77, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 78, &val2, sizeof(char)); + MDInstrumentDefinitionFuture27 &putCurrency( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 76, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 77, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 78, &val2, sizeof(char)); - return *this; - } + return *this; + } - std::string getCurrencyAsString() const { - const char *buffer = m_buffer + m_offset + 76; - size_t length = 0; + SBE_NODISCARD std::string getCurrencyAsString() const + { + const char *buffer = m_buffer + m_offset + 76; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getCurrencyAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getCurrencyAsString(); + std::string getCurrencyAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCurrencyAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getCurrencyAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 76; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCurrencyAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 76; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture27 &putCurrency(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error("string too large for putCurrency [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture27 &putCurrency(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 76, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 76 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 76, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 76 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture27 &putCurrency(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error("string too large for putCurrency [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture27 &putCurrency(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 76, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 76 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 76, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 76 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SettlCurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Currency"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SettlCurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Currency"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t settlCurrencyId() SBE_NOEXCEPT { - return 120; - } + static SBE_CONSTEXPR std::uint16_t settlCurrencyId() SBE_NOEXCEPT + { + return 120; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - settlCurrencySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t settlCurrencySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool settlCurrencyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool settlCurrencyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= settlCurrencySinceVersion(); + return m_actingVersion >= settlCurrencySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - settlCurrencyEncodingOffset() SBE_NOEXCEPT { - return 79; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t settlCurrencyEncodingOffset() SBE_NOEXCEPT + { + return 79; + } - static SBE_CONSTEXPR char settlCurrencyNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char settlCurrencyNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char settlCurrencyMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char settlCurrencyMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char settlCurrencyMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char settlCurrencyMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t settlCurrencyEncodingLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::size_t settlCurrencyEncodingLength() SBE_NOEXCEPT + { + return 3; + } - static SBE_CONSTEXPR std::uint64_t settlCurrencyLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::uint64_t settlCurrencyLength() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD const char *settlCurrency() const SBE_NOEXCEPT { - return m_buffer + m_offset + 79; - } + SBE_NODISCARD const char *settlCurrency() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 79; + } - SBE_NODISCARD char *settlCurrency() SBE_NOEXCEPT { - return m_buffer + m_offset + 79; - } + SBE_NODISCARD char *settlCurrency() SBE_NOEXCEPT + { + return m_buffer + m_offset + 79; + } - SBE_NODISCARD char settlCurrency(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error( - "index out of range for settlCurrency [E104]"); - } + SBE_NODISCARD char settlCurrency(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for settlCurrency [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 79 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 79 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture27 & - settlCurrency(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error( - "index out of range for settlCurrency [E105]"); - } + MDInstrumentDefinitionFuture27 &settlCurrency(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for settlCurrency [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 79 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 79 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSettlCurrency(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error( - "length too large for getSettlCurrency [E106]"); - } + std::uint64_t getSettlCurrency(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getSettlCurrency [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 79, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 79, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture27 & - putSettlCurrency(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 79, src, sizeof(char) * 3); - return *this; - } + MDInstrumentDefinitionFuture27 &putSettlCurrency(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 79, src, sizeof(char) * 3); + return *this; + } - MDInstrumentDefinitionFuture27 &putSettlCurrency( - const char value0, const char value1, const char value2) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 79, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 80, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 81, &val2, sizeof(char)); + MDInstrumentDefinitionFuture27 &putSettlCurrency( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 79, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 80, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 81, &val2, sizeof(char)); - return *this; - } + return *this; + } - std::string getSettlCurrencyAsString() const { - const char *buffer = m_buffer + m_offset + 79; - size_t length = 0; + SBE_NODISCARD std::string getSettlCurrencyAsString() const + { + const char *buffer = m_buffer + m_offset + 79; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSettlCurrencyAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSettlCurrencyAsString(); + std::string getSettlCurrencyAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSettlCurrencyAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSettlCurrencyAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 79; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSettlCurrencyAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 79; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture27 & - putSettlCurrency(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putSettlCurrency [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture27 &putSettlCurrency(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putSettlCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 79, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 79 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 79, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 79 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture27 &putSettlCurrency(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putSettlCurrency [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture27 &putSettlCurrency(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putSettlCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 79, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 79 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 79, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 79 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - MatchAlgorithmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchAlgorithmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchAlgorithmId() SBE_NOEXCEPT { - return 1142; - } + static SBE_CONSTEXPR std::uint16_t matchAlgorithmId() SBE_NOEXCEPT + { + return 1142; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchAlgorithmSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchAlgorithmSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchAlgorithmInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchAlgorithmInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchAlgorithmSinceVersion(); + return m_actingVersion >= matchAlgorithmSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchAlgorithmEncodingOffset() SBE_NOEXCEPT { - return 82; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchAlgorithmEncodingOffset() SBE_NOEXCEPT + { + return 82; + } - static SBE_CONSTEXPR char matchAlgorithmNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char matchAlgorithmNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char matchAlgorithmMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char matchAlgorithmMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char matchAlgorithmMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char matchAlgorithmMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - matchAlgorithmEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchAlgorithmEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD char matchAlgorithm() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 82, sizeof(char)); - return (val); - } + SBE_NODISCARD char matchAlgorithm() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 82, sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture27 & - matchAlgorithm(const char value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 82, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionFuture27 &matchAlgorithm(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 82, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char * - MinTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t minTradeVolId() SBE_NOEXCEPT { - return 562; - } + static SBE_CONSTEXPR std::uint16_t minTradeVolId() SBE_NOEXCEPT + { + return 562; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minTradeVolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minTradeVolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool minTradeVolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minTradeVolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minTradeVolSinceVersion(); + return m_actingVersion >= minTradeVolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minTradeVolEncodingOffset() SBE_NOEXCEPT { - return 83; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minTradeVolEncodingOffset() SBE_NOEXCEPT + { + return 83; + } - static SBE_CONSTEXPR std::uint32_t minTradeVolNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t minTradeVolMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t minTradeVolMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t minTradeVolEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t minTradeVolEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t minTradeVol() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 83, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t minTradeVol() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 83, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture27 & - minTradeVol(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 83, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &minTradeVol(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 83, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - MaxTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaxTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t maxTradeVolId() SBE_NOEXCEPT { - return 1140; - } + static SBE_CONSTEXPR std::uint16_t maxTradeVolId() SBE_NOEXCEPT + { + return 1140; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maxTradeVolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxTradeVolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool maxTradeVolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maxTradeVolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maxTradeVolSinceVersion(); + return m_actingVersion >= maxTradeVolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maxTradeVolEncodingOffset() SBE_NOEXCEPT { - return 87; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxTradeVolEncodingOffset() SBE_NOEXCEPT + { + return 87; + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t maxTradeVolEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t maxTradeVolEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t maxTradeVol() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 87, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t maxTradeVol() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 87, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture27 & - maxTradeVol(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 87, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &maxTradeVol(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 87, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char *MinPriceIncrementMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinPriceIncrementMetaAttribute(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 minPriceIncrementId() SBE_NOEXCEPT { - return 969; - } + static SBE_CONSTEXPR std::uint16_t minPriceIncrementId() SBE_NOEXCEPT + { + return 969; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minPriceIncrementSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minPriceIncrementSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool minPriceIncrementInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minPriceIncrementInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minPriceIncrementSinceVersion(); + return m_actingVersion >= minPriceIncrementSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minPriceIncrementEncodingOffset() SBE_NOEXCEPT { - return 91; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minPriceIncrementEncodingOffset() SBE_NOEXCEPT + { + return 91; + } - private: - PRICE m_minPriceIncrement; +private: + PRICE m_minPriceIncrement; - public: - SBE_NODISCARD PRICE &minPriceIncrement() { - m_minPriceIncrement.wrap( - m_buffer, m_offset + 91, m_actingVersion, m_bufferLength); - return m_minPriceIncrement; - } +public: + SBE_NODISCARD PRICE &minPriceIncrement() + { + m_minPriceIncrement.wrap(m_buffer, m_offset + 91, m_actingVersion, m_bufferLength); + return m_minPriceIncrement; + } - SBE_NODISCARD static const char * - DisplayFactorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "float"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *DisplayFactorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t displayFactorId() SBE_NOEXCEPT { - return 9787; - } + static SBE_CONSTEXPR std::uint16_t displayFactorId() SBE_NOEXCEPT + { + return 9787; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - displayFactorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayFactorSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool displayFactorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool displayFactorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= displayFactorSinceVersion(); + return m_actingVersion >= displayFactorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - displayFactorEncodingOffset() SBE_NOEXCEPT { - return 99; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayFactorEncodingOffset() SBE_NOEXCEPT + { + return 99; + } - private: - FLOAT m_displayFactor; +private: + FLOAT m_displayFactor; - public: - SBE_NODISCARD FLOAT &displayFactor() { - m_displayFactor.wrap( - m_buffer, m_offset + 99, m_actingVersion, m_bufferLength); - return m_displayFactor; - } +public: + SBE_NODISCARD FLOAT &displayFactor() + { + m_displayFactor.wrap(m_buffer, m_offset + 99, m_actingVersion, m_bufferLength); + return m_displayFactor; + } - SBE_NODISCARD static const char * - MainFractionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MainFractionMetaAttribute(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 mainFractionId() SBE_NOEXCEPT { - return 37702; - } + static SBE_CONSTEXPR std::uint16_t mainFractionId() SBE_NOEXCEPT + { + return 37702; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mainFractionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mainFractionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool mainFractionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool mainFractionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mainFractionSinceVersion(); + return m_actingVersion >= mainFractionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mainFractionEncodingOffset() SBE_NOEXCEPT { - return 107; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mainFractionEncodingOffset() SBE_NOEXCEPT + { + return 107; + } - static SBE_CONSTEXPR std::uint8_t mainFractionNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t mainFractionNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t mainFractionMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t mainFractionMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t mainFractionMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t mainFractionMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t mainFractionEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t mainFractionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t mainFraction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 107, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t mainFraction() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 107, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionFuture27 & - mainFraction(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 107, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &mainFraction(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 107, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - SubFractionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SubFractionMetaAttribute(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 subFractionId() SBE_NOEXCEPT { - return 37703; - } + static SBE_CONSTEXPR std::uint16_t subFractionId() SBE_NOEXCEPT + { + return 37703; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - subFractionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t subFractionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool subFractionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool subFractionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= subFractionSinceVersion(); + return m_actingVersion >= subFractionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - subFractionEncodingOffset() SBE_NOEXCEPT { - return 108; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t subFractionEncodingOffset() SBE_NOEXCEPT + { + return 108; + } - static SBE_CONSTEXPR std::uint8_t subFractionNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t subFractionNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t subFractionMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t subFractionMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t subFractionMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t subFractionMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t subFractionEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t subFractionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t subFraction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 108, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t subFraction() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 108, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionFuture27 & - subFraction(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 108, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &subFraction(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 108, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *PriceDisplayFormatMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *PriceDisplayFormatMetaAttribute(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 priceDisplayFormatId() SBE_NOEXCEPT { - return 9800; - } + static SBE_CONSTEXPR std::uint16_t priceDisplayFormatId() SBE_NOEXCEPT + { + return 9800; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - priceDisplayFormatSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceDisplayFormatSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool priceDisplayFormatInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool priceDisplayFormatInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= priceDisplayFormatSinceVersion(); + return m_actingVersion >= priceDisplayFormatSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - priceDisplayFormatEncodingOffset() SBE_NOEXCEPT { - return 109; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceDisplayFormatEncodingOffset() SBE_NOEXCEPT + { + return 109; + } - static SBE_CONSTEXPR std::uint8_t - priceDisplayFormatNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - priceDisplayFormatEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t priceDisplayFormatEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t priceDisplayFormat() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 109, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t priceDisplayFormat() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 109, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionFuture27 & - priceDisplayFormat(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 109, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &priceDisplayFormat(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 109, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - UnitOfMeasureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UnitOfMeasureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t unitOfMeasureId() SBE_NOEXCEPT { - return 996; - } + static SBE_CONSTEXPR std::uint16_t unitOfMeasureId() SBE_NOEXCEPT + { + return 996; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - unitOfMeasureSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t unitOfMeasureSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool unitOfMeasureInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool unitOfMeasureInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= unitOfMeasureSinceVersion(); + return m_actingVersion >= unitOfMeasureSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - unitOfMeasureEncodingOffset() SBE_NOEXCEPT { - return 110; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingOffset() SBE_NOEXCEPT + { + return 110; + } - static SBE_CONSTEXPR char unitOfMeasureNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char unitOfMeasureNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char unitOfMeasureMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char unitOfMeasureMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char unitOfMeasureMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char unitOfMeasureMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingLength() SBE_NOEXCEPT { - return 30; - } + static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingLength() SBE_NOEXCEPT + { + return 30; + } - static SBE_CONSTEXPR std::uint64_t unitOfMeasureLength() SBE_NOEXCEPT { - return 30; - } + static SBE_CONSTEXPR std::uint64_t unitOfMeasureLength() SBE_NOEXCEPT + { + return 30; + } - SBE_NODISCARD const char *unitOfMeasure() const SBE_NOEXCEPT { - return m_buffer + m_offset + 110; - } + SBE_NODISCARD const char *unitOfMeasure() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 110; + } - SBE_NODISCARD char *unitOfMeasure() SBE_NOEXCEPT { - return m_buffer + m_offset + 110; - } + SBE_NODISCARD char *unitOfMeasure() SBE_NOEXCEPT + { + return m_buffer + m_offset + 110; + } - SBE_NODISCARD char unitOfMeasure(const std::uint64_t index) const { - if (index >= 30) { - throw std::runtime_error( - "index out of range for unitOfMeasure [E104]"); - } + SBE_NODISCARD char unitOfMeasure(const std::uint64_t index) const + { + if (index >= 30) + { + throw std::runtime_error("index out of range for unitOfMeasure [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 110 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 110 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture27 & - unitOfMeasure(const std::uint64_t index, const char value) { - if (index >= 30) { - throw std::runtime_error( - "index out of range for unitOfMeasure [E105]"); - } + MDInstrumentDefinitionFuture27 &unitOfMeasure(const std::uint64_t index, const char value) + { + if (index >= 30) + { + throw std::runtime_error("index out of range for unitOfMeasure [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 110 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 110 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getUnitOfMeasure(char *const dst, const std::uint64_t length) const { - if (length > 30) { - throw std::runtime_error( - "length too large for getUnitOfMeasure [E106]"); - } + std::uint64_t getUnitOfMeasure(char *const dst, const std::uint64_t length) const + { + if (length > 30) + { + throw std::runtime_error("length too large for getUnitOfMeasure [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 110, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 110, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture27 & - putUnitOfMeasure(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 110, src, sizeof(char) * 30); - return *this; - } + MDInstrumentDefinitionFuture27 &putUnitOfMeasure(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 110, src, sizeof(char) * 30); + return *this; + } - std::string getUnitOfMeasureAsString() const { - const char *buffer = m_buffer + m_offset + 110; - size_t length = 0; + SBE_NODISCARD std::string getUnitOfMeasureAsString() const + { + const char *buffer = m_buffer + m_offset + 110; + size_t length = 0; - for (; length < 30 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getUnitOfMeasureAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getUnitOfMeasureAsString(); + std::string getUnitOfMeasureAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getUnitOfMeasureAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getUnitOfMeasureAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 110; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getUnitOfMeasureAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 110; + size_t length = 0; - for (; length < 30 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture27 & - putUnitOfMeasure(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 30) { - throw std::runtime_error( - "string too large for putUnitOfMeasure [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture27 &putUnitOfMeasure(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 30) + { + throw std::runtime_error("string too large for putUnitOfMeasure [E106]"); + } - std::memcpy(m_buffer + m_offset + 110, str.data(), srcLength); - for (size_t start = srcLength; start < 30; ++start) { - m_buffer[m_offset + 110 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 110, str.data(), srcLength); + for (size_t start = srcLength; start < 30; ++start) + { + m_buffer[m_offset + 110 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture27 &putUnitOfMeasure(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 30) { - throw std::runtime_error( - "string too large for putUnitOfMeasure [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture27 &putUnitOfMeasure(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 30) + { + throw std::runtime_error("string too large for putUnitOfMeasure [E106]"); + } - std::memcpy(m_buffer + m_offset + 110, str.c_str(), srcLength); - for (size_t start = srcLength; start < 30; ++start) { - m_buffer[m_offset + 110 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 110, str.c_str(), srcLength); + for (size_t start = srcLength; start < 30; ++start) + { + m_buffer[m_offset + 110 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char *UnitOfMeasureQtyMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UnitOfMeasureQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t unitOfMeasureQtyId() SBE_NOEXCEPT { - return 1147; - } + static SBE_CONSTEXPR std::uint16_t unitOfMeasureQtyId() SBE_NOEXCEPT + { + return 1147; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - unitOfMeasureQtySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t unitOfMeasureQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool unitOfMeasureQtyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool unitOfMeasureQtyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= unitOfMeasureQtySinceVersion(); + return m_actingVersion >= unitOfMeasureQtySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - unitOfMeasureQtyEncodingOffset() SBE_NOEXCEPT { - return 140; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t unitOfMeasureQtyEncodingOffset() SBE_NOEXCEPT + { + return 140; + } - private: - PRICENULL m_unitOfMeasureQty; +private: + PRICENULL m_unitOfMeasureQty; - public: - SBE_NODISCARD PRICENULL &unitOfMeasureQty() { - m_unitOfMeasureQty.wrap( - m_buffer, m_offset + 140, m_actingVersion, m_bufferLength); - return m_unitOfMeasureQty; - } +public: + SBE_NODISCARD PRICENULL &unitOfMeasureQty() + { + m_unitOfMeasureQty.wrap(m_buffer, m_offset + 140, m_actingVersion, m_bufferLength); + return m_unitOfMeasureQty; + } - SBE_NODISCARD static const char *TradingReferencePriceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TradingReferencePriceMetaAttribute(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 tradingReferencePriceId() SBE_NOEXCEPT { - return 1150; - } + static SBE_CONSTEXPR std::uint16_t tradingReferencePriceId() SBE_NOEXCEPT + { + return 1150; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradingReferencePriceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingReferencePriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool tradingReferencePriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tradingReferencePriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tradingReferencePriceSinceVersion(); + return m_actingVersion >= tradingReferencePriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradingReferencePriceEncodingOffset() SBE_NOEXCEPT { - return 148; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingReferencePriceEncodingOffset() SBE_NOEXCEPT + { + return 148; + } - private: - PRICENULL m_tradingReferencePrice; +private: + PRICENULL m_tradingReferencePrice; - public: - SBE_NODISCARD PRICENULL &tradingReferencePrice() { - m_tradingReferencePrice.wrap( - m_buffer, m_offset + 148, m_actingVersion, m_bufferLength); - return m_tradingReferencePrice; - } +public: + SBE_NODISCARD PRICENULL &tradingReferencePrice() + { + m_tradingReferencePrice.wrap(m_buffer, m_offset + 148, m_actingVersion, m_bufferLength); + return m_tradingReferencePrice; + } - SBE_NODISCARD static const char * - SettlPriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SettlPriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT { - return 731; - } + static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT + { + return 731; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - settlPriceTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t settlPriceTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= settlPriceTypeSinceVersion(); + return m_actingVersion >= settlPriceTypeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingOffset() SBE_NOEXCEPT { - return 156; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingOffset() SBE_NOEXCEPT + { + return 156; + } - private: - SettlPriceType m_settlPriceType; +private: + SettlPriceType m_settlPriceType; - public: - SBE_NODISCARD SettlPriceType &settlPriceType() { - m_settlPriceType.wrap( - m_buffer, m_offset + 156, m_actingVersion, m_bufferLength); - return m_settlPriceType; - } +public: + SBE_NODISCARD SettlPriceType &settlPriceType() + { + m_settlPriceType.wrap(m_buffer, m_offset + 156, m_actingVersion, m_bufferLength); + return m_settlPriceType; + } - static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD static const char *OpenInterestQtyMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *OpenInterestQtyMetaAttribute(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 openInterestQtyId() SBE_NOEXCEPT { - return 5792; - } + static SBE_CONSTEXPR std::uint16_t openInterestQtyId() SBE_NOEXCEPT + { + return 5792; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - openInterestQtySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t openInterestQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool openInterestQtyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool openInterestQtyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= openInterestQtySinceVersion(); + return m_actingVersion >= openInterestQtySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - openInterestQtyEncodingOffset() SBE_NOEXCEPT { - return 157; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t openInterestQtyEncodingOffset() SBE_NOEXCEPT + { + return 157; + } - static SBE_CONSTEXPR std::int32_t openInterestQtyNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t openInterestQtyMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t openInterestQtyMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t - openInterestQtyEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t openInterestQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t openInterestQty() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 157, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t openInterestQty() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 157, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture27 & - openInterestQty(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 157, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &openInterestQty(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 157, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char * - ClearedVolumeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *ClearedVolumeMetaAttribute(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 clearedVolumeId() SBE_NOEXCEPT { - return 5791; - } + static SBE_CONSTEXPR std::uint16_t clearedVolumeId() SBE_NOEXCEPT + { + return 5791; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - clearedVolumeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearedVolumeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool clearedVolumeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool clearedVolumeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= clearedVolumeSinceVersion(); + return m_actingVersion >= clearedVolumeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - clearedVolumeEncodingOffset() SBE_NOEXCEPT { - return 161; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearedVolumeEncodingOffset() SBE_NOEXCEPT + { + return 161; + } - static SBE_CONSTEXPR std::int32_t clearedVolumeNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t clearedVolumeMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t clearedVolumeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t clearedVolumeEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t clearedVolumeEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t clearedVolume() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 161, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t clearedVolume() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 161, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture27 & - clearedVolume(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 161, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &clearedVolume(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 161, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char * - HighLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *HighLimitPriceMetaAttribute(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 highLimitPriceId() SBE_NOEXCEPT { - return 1149; - } + static SBE_CONSTEXPR std::uint16_t highLimitPriceId() SBE_NOEXCEPT + { + return 1149; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - highLimitPriceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t highLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= highLimitPriceSinceVersion(); + return m_actingVersion >= highLimitPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - highLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 165; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t highLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 165; + } - private: - PRICENULL m_highLimitPrice; +private: + PRICENULL m_highLimitPrice; - public: - SBE_NODISCARD PRICENULL &highLimitPrice() { - m_highLimitPrice.wrap( - m_buffer, m_offset + 165, m_actingVersion, m_bufferLength); - return m_highLimitPrice; - } +public: + SBE_NODISCARD PRICENULL &highLimitPrice() + { + m_highLimitPrice.wrap(m_buffer, m_offset + 165, m_actingVersion, m_bufferLength); + return m_highLimitPrice; + } - SBE_NODISCARD static const char * - LowLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *LowLimitPriceMetaAttribute(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 lowLimitPriceId() SBE_NOEXCEPT { - return 1148; - } + static SBE_CONSTEXPR std::uint16_t lowLimitPriceId() SBE_NOEXCEPT + { + return 1148; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lowLimitPriceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lowLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lowLimitPriceSinceVersion(); + return m_actingVersion >= lowLimitPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lowLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 173; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lowLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 173; + } - private: - PRICENULL m_lowLimitPrice; +private: + PRICENULL m_lowLimitPrice; - public: - SBE_NODISCARD PRICENULL &lowLimitPrice() { - m_lowLimitPrice.wrap( - m_buffer, m_offset + 173, m_actingVersion, m_bufferLength); - return m_lowLimitPrice; - } +public: + SBE_NODISCARD PRICENULL &lowLimitPrice() + { + m_lowLimitPrice.wrap(m_buffer, m_offset + 173, m_actingVersion, m_bufferLength); + return m_lowLimitPrice; + } - SBE_NODISCARD static const char *MaxPriceVariationMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaxPriceVariationMetaAttribute(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 maxPriceVariationId() SBE_NOEXCEPT { - return 1143; - } + static SBE_CONSTEXPR std::uint16_t maxPriceVariationId() SBE_NOEXCEPT + { + return 1143; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maxPriceVariationSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxPriceVariationSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool maxPriceVariationInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maxPriceVariationInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maxPriceVariationSinceVersion(); + return m_actingVersion >= maxPriceVariationSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maxPriceVariationEncodingOffset() SBE_NOEXCEPT { - return 181; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxPriceVariationEncodingOffset() SBE_NOEXCEPT + { + return 181; + } - private: - PRICENULL m_maxPriceVariation; +private: + PRICENULL m_maxPriceVariation; - public: - SBE_NODISCARD PRICENULL &maxPriceVariation() { - m_maxPriceVariation.wrap( - m_buffer, m_offset + 181, m_actingVersion, m_bufferLength); - return m_maxPriceVariation; - } +public: + SBE_NODISCARD PRICENULL &maxPriceVariation() + { + m_maxPriceVariation.wrap(m_buffer, m_offset + 181, m_actingVersion, m_bufferLength); + return m_maxPriceVariation; + } - SBE_NODISCARD static const char * - DecayQuantityMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *DecayQuantityMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t decayQuantityId() SBE_NOEXCEPT { - return 5818; - } + static SBE_CONSTEXPR std::uint16_t decayQuantityId() SBE_NOEXCEPT + { + return 5818; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - decayQuantitySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t decayQuantitySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool decayQuantityInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool decayQuantityInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= decayQuantitySinceVersion(); + return m_actingVersion >= decayQuantitySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - decayQuantityEncodingOffset() SBE_NOEXCEPT { - return 189; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t decayQuantityEncodingOffset() SBE_NOEXCEPT + { + return 189; + } - static SBE_CONSTEXPR std::int32_t decayQuantityNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t decayQuantityNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t decayQuantityMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t decayQuantityMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t decayQuantityMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t decayQuantityMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t decayQuantityEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t decayQuantityEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t decayQuantity() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 189, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t decayQuantity() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 189, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture27 & - decayQuantity(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 189, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &decayQuantity(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 189, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char * - DecayStartDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "LocalMktDate"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *DecayStartDateMetaAttribute(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 decayStartDateId() SBE_NOEXCEPT { - return 5819; - } + static SBE_CONSTEXPR std::uint16_t decayStartDateId() SBE_NOEXCEPT + { + return 5819; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - decayStartDateSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t decayStartDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool decayStartDateInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool decayStartDateInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= decayStartDateSinceVersion(); + return m_actingVersion >= decayStartDateSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - decayStartDateEncodingOffset() SBE_NOEXCEPT { - return 193; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t decayStartDateEncodingOffset() SBE_NOEXCEPT + { + return 193; + } - static SBE_CONSTEXPR std::uint16_t decayStartDateNullValue() SBE_NOEXCEPT { - return (std::uint16_t)65535; - } + static SBE_CONSTEXPR std::uint16_t decayStartDateNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } - static SBE_CONSTEXPR std::uint16_t decayStartDateMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t decayStartDateMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t decayStartDateMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t decayStartDateMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t - decayStartDateEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t decayStartDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t decayStartDate() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::uint16_t decayStartDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MDInstrumentDefinitionFuture27 & - decayStartDate(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint16_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &decayStartDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint16_t)); + return *this; + } - SBE_NODISCARD static const char *OriginalContractSizeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *OriginalContractSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t originalContractSizeId() SBE_NOEXCEPT { - return 5849; - } + static SBE_CONSTEXPR std::uint16_t originalContractSizeId() SBE_NOEXCEPT + { + return 5849; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - originalContractSizeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t originalContractSizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool originalContractSizeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool originalContractSizeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= originalContractSizeSinceVersion(); + return m_actingVersion >= originalContractSizeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - originalContractSizeEncodingOffset() SBE_NOEXCEPT { - return 195; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t originalContractSizeEncodingOffset() SBE_NOEXCEPT + { + return 195; + } - static SBE_CONSTEXPR std::int32_t - originalContractSizeNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t originalContractSizeNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t - originalContractSizeMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t originalContractSizeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t - originalContractSizeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t originalContractSizeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t - originalContractSizeEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t originalContractSizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t originalContractSize() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 195, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t originalContractSize() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 195, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture27 & - originalContractSize(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 195, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &originalContractSize(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 195, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char *ContractMultiplierMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *ContractMultiplierMetaAttribute(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 contractMultiplierId() SBE_NOEXCEPT { - return 231; - } + static SBE_CONSTEXPR std::uint16_t contractMultiplierId() SBE_NOEXCEPT + { + return 231; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - contractMultiplierSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t contractMultiplierSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool contractMultiplierInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool contractMultiplierInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= contractMultiplierSinceVersion(); + return m_actingVersion >= contractMultiplierSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - contractMultiplierEncodingOffset() SBE_NOEXCEPT { - return 199; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t contractMultiplierEncodingOffset() SBE_NOEXCEPT + { + return 199; + } - static SBE_CONSTEXPR std::int32_t - contractMultiplierNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t contractMultiplierNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t contractMultiplierMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t contractMultiplierMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t contractMultiplierMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t contractMultiplierMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t - contractMultiplierEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t contractMultiplierEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t contractMultiplier() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 199, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t contractMultiplier() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 199, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture27 & - contractMultiplier(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 199, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &contractMultiplier(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 199, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char *ContractMultiplierUnitMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *ContractMultiplierUnitMetaAttribute(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 contractMultiplierUnitId() SBE_NOEXCEPT { - return 1435; - } + static SBE_CONSTEXPR std::uint16_t contractMultiplierUnitId() SBE_NOEXCEPT + { + return 1435; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - contractMultiplierUnitSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t contractMultiplierUnitSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool contractMultiplierUnitInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool contractMultiplierUnitInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= contractMultiplierUnitSinceVersion(); + return m_actingVersion >= contractMultiplierUnitSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - contractMultiplierUnitEncodingOffset() SBE_NOEXCEPT { - return 203; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t contractMultiplierUnitEncodingOffset() SBE_NOEXCEPT + { + return 203; + } - static SBE_CONSTEXPR std::int8_t - contractMultiplierUnitNullValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t contractMultiplierUnitNullValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::int8_t - contractMultiplierUnitMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + static SBE_CONSTEXPR std::int8_t contractMultiplierUnitMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - static SBE_CONSTEXPR std::int8_t - contractMultiplierUnitMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t contractMultiplierUnitMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::size_t - contractMultiplierUnitEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t contractMultiplierUnitEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::int8_t contractMultiplierUnit() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 203, sizeof(std::int8_t)); - return (val); - } + SBE_NODISCARD std::int8_t contractMultiplierUnit() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 203, sizeof(std::int8_t)); + return (val); + } - MDInstrumentDefinitionFuture27 & - contractMultiplierUnit(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 203, &val, sizeof(std::int8_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &contractMultiplierUnit(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 203, &val, sizeof(std::int8_t)); + return *this; + } - SBE_NODISCARD static const char *FlowScheduleTypeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *FlowScheduleTypeMetaAttribute(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 flowScheduleTypeId() SBE_NOEXCEPT { - return 1439; - } + static SBE_CONSTEXPR std::uint16_t flowScheduleTypeId() SBE_NOEXCEPT + { + return 1439; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - flowScheduleTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t flowScheduleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool flowScheduleTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool flowScheduleTypeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= flowScheduleTypeSinceVersion(); + return m_actingVersion >= flowScheduleTypeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - flowScheduleTypeEncodingOffset() SBE_NOEXCEPT { - return 204; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t flowScheduleTypeEncodingOffset() SBE_NOEXCEPT + { + return 204; + } - static SBE_CONSTEXPR std::int8_t flowScheduleTypeNullValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t flowScheduleTypeNullValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::int8_t flowScheduleTypeMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + static SBE_CONSTEXPR std::int8_t flowScheduleTypeMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - static SBE_CONSTEXPR std::int8_t flowScheduleTypeMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t flowScheduleTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::size_t - flowScheduleTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t flowScheduleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::int8_t flowScheduleType() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 204, sizeof(std::int8_t)); - return (val); - } + SBE_NODISCARD std::int8_t flowScheduleType() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 204, sizeof(std::int8_t)); + return (val); + } - MDInstrumentDefinitionFuture27 & - flowScheduleType(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 204, &val, sizeof(std::int8_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &flowScheduleType(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 204, &val, sizeof(std::int8_t)); + return *this; + } - SBE_NODISCARD static const char *MinPriceIncrementAmountMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinPriceIncrementAmountMetaAttribute(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 minPriceIncrementAmountId() SBE_NOEXCEPT { - return 1146; - } + static SBE_CONSTEXPR std::uint16_t minPriceIncrementAmountId() SBE_NOEXCEPT + { + return 1146; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minPriceIncrementAmountSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minPriceIncrementAmountSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool minPriceIncrementAmountInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minPriceIncrementAmountInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minPriceIncrementAmountSinceVersion(); + return m_actingVersion >= minPriceIncrementAmountSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minPriceIncrementAmountEncodingOffset() SBE_NOEXCEPT { - return 205; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minPriceIncrementAmountEncodingOffset() SBE_NOEXCEPT + { + return 205; + } - private: - PRICENULL m_minPriceIncrementAmount; +private: + PRICENULL m_minPriceIncrementAmount; - public: - SBE_NODISCARD PRICENULL &minPriceIncrementAmount() { - m_minPriceIncrementAmount.wrap( - m_buffer, m_offset + 205, m_actingVersion, m_bufferLength); - return m_minPriceIncrementAmount; - } +public: + SBE_NODISCARD PRICENULL &minPriceIncrementAmount() + { + m_minPriceIncrementAmount.wrap(m_buffer, m_offset + 205, m_actingVersion, m_bufferLength); + return m_minPriceIncrementAmount; + } - SBE_NODISCARD static const char *UserDefinedInstrumentMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UserDefinedInstrumentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t userDefinedInstrumentId() SBE_NOEXCEPT { - return 9779; - } + static SBE_CONSTEXPR std::uint16_t userDefinedInstrumentId() SBE_NOEXCEPT + { + return 9779; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - userDefinedInstrumentSinceVersion() SBE_NOEXCEPT { - return 3; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t userDefinedInstrumentSinceVersion() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD bool userDefinedInstrumentInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool userDefinedInstrumentInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= userDefinedInstrumentSinceVersion(); + return m_actingVersion >= userDefinedInstrumentSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - userDefinedInstrumentEncodingOffset() SBE_NOEXCEPT { - return 213; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t userDefinedInstrumentEncodingOffset() SBE_NOEXCEPT + { + return 213; + } - static SBE_CONSTEXPR char userDefinedInstrumentNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char userDefinedInstrumentNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char userDefinedInstrumentMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char userDefinedInstrumentMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char userDefinedInstrumentMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char userDefinedInstrumentMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - userDefinedInstrumentEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t userDefinedInstrumentEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD char userDefinedInstrument() const SBE_NOEXCEPT { - if (m_actingVersion < 3) { - return (char)0; - } + SBE_NODISCARD char userDefinedInstrument() const SBE_NOEXCEPT + { + if (m_actingVersion < 3) + { + return static_cast(0); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 213, sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 213, sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture27 & - userDefinedInstrument(const char value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 213, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionFuture27 &userDefinedInstrument(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 213, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "LocalMktDate"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute(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 tradingReferenceDateId() SBE_NOEXCEPT { - return 5796; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateId() SBE_NOEXCEPT + { + return 5796; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradingReferenceDateSinceVersion() SBE_NOEXCEPT { - return 6; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingReferenceDateSinceVersion() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tradingReferenceDateSinceVersion(); + return m_actingVersion >= tradingReferenceDateSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingOffset() SBE_NOEXCEPT { - return 214; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingOffset() SBE_NOEXCEPT + { + return 214; + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateNullValue() SBE_NOEXCEPT { - return (std::uint16_t)65535; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT { - if (m_actingVersion < 6) { - return (std::uint16_t)65535; - } + SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT + { + if (m_actingVersion < 6) + { + return static_cast(65535); + } - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 214, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 214, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MDInstrumentDefinitionFuture27 & - tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 214, &val, sizeof(std::uint16_t)); - return *this; - } + MDInstrumentDefinitionFuture27 &tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 214, &val, sizeof(std::uint16_t)); + return *this; + } - class NoEvents { + class NoEvents + { 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; + 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; - } + 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 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) { + 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(9)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 9; + 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 9; + } + + 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 NoEvents &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *EventTypeMetaAttribute(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 eventTypeId() SBE_NOEXCEPT + { + return 865; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t eventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool eventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= eventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD EventType::Value eventType() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); + return EventType::get((val)); + } + + NoEvents &eventType(const EventType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *EventTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t eventTimeId() SBE_NOEXCEPT + { + return 1145; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t eventTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool eventTimeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= eventTimeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTimeEncodingOffset() SBE_NOEXCEPT + { + return 1; + } + + static SBE_CONSTEXPR std::uint64_t eventTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t eventTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t eventTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t eventTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t eventTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoEvents &eventTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint64_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoEvents writer) + { + builder << '{'; + builder << R"("EventType": )"; + builder << '"' << writer.eventType() << '"'; + + builder << ", "; + builder << R"("EventTime": )"; + builder << +writer.eventTime(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)9); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 9; - 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; - } +private: + NoEvents m_noEvents; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 9; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoEventsId() SBE_NOEXCEPT + { + return 864; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoEvents &noEvents() + { + m_noEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noEvents; + } - 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; - } + NoEvents &noEventsCount(const std::uint8_t count) + { + m_noEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noEvents; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoEvents &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - EventTypeMetaAttribute(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 eventTypeId() SBE_NOEXCEPT { - return 865; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - eventTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool eventTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noEventsInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= eventTypeSinceVersion(); + return m_actingVersion >= noEventsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD EventType::Value eventType() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); - return EventType::get((val)); - } - - NoEvents &eventType(const EventType::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - EventTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t eventTimeId() SBE_NOEXCEPT { - return 1145; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - eventTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool eventTimeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= eventTimeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTimeEncodingOffset() SBE_NOEXCEPT { - return 1; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t eventTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t eventTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoEvents &eventTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint64_t)); - return *this; - } - - template - friend std::basic_ostream & - operator<<(std::basic_ostream &builder, NoEvents writer) { - builder << '{'; - builder << R"("EventType": )"; - builder << '"' << writer.eventType() << '"'; - - builder << ", "; - builder << R"("EventTime": )"; - builder << +writer.eventTime(); - - builder << '}'; - - return builder; - } - }; - - private: - NoEvents m_noEvents; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoEventsId() SBE_NOEXCEPT { - return 864; - } - - SBE_NODISCARD inline NoEvents &noEvents() { - m_noEvents.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noEvents; - } - - NoEvents &noEventsCount(const std::uint8_t count) { - m_noEvents.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noEvents; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noEventsSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noEventsInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noEventsSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoMDFeedTypes { + class NoMDFeedTypes + { 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; + 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; - } + 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 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((std::uint16_t)4); - dimensions.numInGroup((std::uint8_t)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 { return *m_positionPtr; } - - std::uint64_t sbeCheckPosition(const std::uint64_t position) { - if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) { - throw std::runtime_error("buffer too short [E100]"); - } - return position; - } - - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } - - SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT { - return m_count; - } - - SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT { - return m_index < m_count; - } - - inline NoMDFeedTypes &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - MDFeedTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDFeedTypeId() SBE_NOEXCEPT { - return 1022; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDFeedTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDFeedTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDFeedTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDFeedTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR char mDFeedTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char mDFeedTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char mDFeedTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingLength() SBE_NOEXCEPT { - return 3; - } - - static SBE_CONSTEXPR std::uint64_t mDFeedTypeLength() SBE_NOEXCEPT { - return 3; - } - - SBE_NODISCARD const char *mDFeedType() const SBE_NOEXCEPT { - return m_buffer + m_offset + 0; - } - - SBE_NODISCARD char *mDFeedType() SBE_NOEXCEPT { - return m_buffer + m_offset + 0; - } - - SBE_NODISCARD char mDFeedType(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error( - "index out of range for mDFeedType [E104]"); - } - - char val; - std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); - return (val); - } - - NoMDFeedTypes &mDFeedType(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error( - "index out of range for mDFeedType [E105]"); - } - - char val = (value); - std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); - return *this; - } - - std::uint64_t - getMDFeedType(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error( - "length too large for getMDFeedType [E106]"); - } - - std::memcpy( - dst, m_buffer + m_offset + 0, - sizeof(char) * static_cast(length)); - return length; - } - - NoMDFeedTypes &putMDFeedType(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 3); - return *this; - } - - NoMDFeedTypes & - putMDFeedType(const char value0, const char value1, const char value2) - SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 0, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 1, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 2, &val2, sizeof(char)); - - return *this; - } - - std::string getMDFeedTypeAsString() const { - const char *buffer = m_buffer + m_offset + 0; - size_t length = 0; - - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); - - return result; - } - - std::string getMDFeedTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getMDFeedTypeAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } + 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; + } - return oss.str(); - } + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } -#if __cplusplus >= 201703L - std::string_view getMDFeedTypeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 0; - size_t length = 0; + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 4; + } - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - return result; - } -#endif + // 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; + } -#if __cplusplus >= 201703L - NoMDFeedTypes &putMDFeedType(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putMDFeedType [E106]"); - } + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 0 + start] = 0; - } + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - return *this; - } -#else - NoMDFeedTypes &putMDFeedType(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putMDFeedType [E106]"); - } + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } - std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 0 + start] = 0; - } + inline NoMDFeedTypes &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; - } -#endif + return *this; + } - SBE_NODISCARD static const char * - MarketDepthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } - static SBE_CONSTEXPR std::uint16_t marketDepthId() SBE_NOEXCEPT { - return 264; - } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - marketDepthSinceVersion() SBE_NOEXCEPT { - return 0; - } + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - SBE_NODISCARD bool marketDepthInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= marketDepthSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } + #endif - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - marketDepthEncodingOffset() SBE_NOEXCEPT { - return 3; - } + SBE_NODISCARD static const char *MDFeedTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::int8_t marketDepthNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } + static SBE_CONSTEXPR std::uint16_t mDFeedTypeId() SBE_NOEXCEPT + { + return 1022; + } - static SBE_CONSTEXPR std::int8_t marketDepthMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDFeedTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::int8_t marketDepthMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + SBE_NODISCARD bool mDFeedTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDFeedTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } - static SBE_CONSTEXPR std::size_t - marketDepthEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD std::int8_t marketDepth() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 3, sizeof(std::int8_t)); - return (val); - } + static SBE_CONSTEXPR char mDFeedTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - NoMDFeedTypes &marketDepth(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 3, &val, sizeof(std::int8_t)); - return *this; - } + static SBE_CONSTEXPR char mDFeedTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDFeedTypes writer) { - builder << '{'; - builder << R"("MDFeedType": )"; - builder << '"' << writer.getMDFeedTypeAsJsonEscapedString().c_str() - << '"'; + static SBE_CONSTEXPR char mDFeedTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - builder << ", "; - builder << R"("MarketDepth": )"; - builder << +writer.marketDepth(); + static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingLength() SBE_NOEXCEPT + { + return 3; + } - builder << '}'; + static SBE_CONSTEXPR std::uint64_t mDFeedTypeLength() SBE_NOEXCEPT + { + return 3; + } - return builder; - } - }; + SBE_NODISCARD const char *mDFeedType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } - private: - NoMDFeedTypes m_noMDFeedTypes; + SBE_NODISCARD char *mDFeedType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDFeedTypesId() SBE_NOEXCEPT { - return 1141; - } + SBE_NODISCARD char mDFeedType(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for mDFeedType [E104]"); + } - SBE_NODISCARD inline NoMDFeedTypes &noMDFeedTypes() { - m_noMDFeedTypes.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDFeedTypes; - } + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } - NoMDFeedTypes &noMDFeedTypesCount(const std::uint8_t count) { - m_noMDFeedTypes.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDFeedTypes; - } + NoMDFeedTypes &mDFeedType(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for mDFeedType [E105]"); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDFeedTypesSinceVersion() SBE_NOEXCEPT { - return 0; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } - SBE_NODISCARD bool noMDFeedTypesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDFeedTypesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } + std::uint64_t getMDFeedType(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getMDFeedType [E106]"); + } - class NoInstAttrib { - 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; + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } - SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { - return m_positionPtr; - } + NoMDFeedTypes &putMDFeedType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 3); + return *this; + } - 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; - } + NoMDFeedTypes &putMDFeedType( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 0, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 1, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 2, &val2, sizeof(char)); - inline void wrapForEncode( - char *buffer, - const std::uint8_t count, - std::uint64_t *pos, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { + return *this; + } + + SBE_NODISCARD std::string getMDFeedTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getMDFeedTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMDFeedTypeAsString(); + + 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 getMDFeedTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoMDFeedTypes &putMDFeedType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putMDFeedType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoMDFeedTypes &putMDFeedType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putMDFeedType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *MarketDepthMetaAttribute(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 marketDepthId() SBE_NOEXCEPT + { + return 264; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketDepthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool marketDepthInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= marketDepthSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketDepthEncodingOffset() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::int8_t marketDepthNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t marketDepthMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t marketDepthMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t marketDepthEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t marketDepth() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 3, sizeof(std::int8_t)); + return (val); + } + + NoMDFeedTypes &marketDepth(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 3, &val, sizeof(std::int8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDFeedTypes writer) + { + builder << '{'; + builder << R"("MDFeedType": )"; + builder << '"' << + writer.getMDFeedTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("MarketDepth": )"; + builder << +writer.marketDepth(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)4); - dimensions.numInGroup((std::uint8_t)count); - m_index = 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; - } +private: + NoMDFeedTypes m_noMDFeedTypes; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 4; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDFeedTypesId() SBE_NOEXCEPT + { + return 1141; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDFeedTypes &noMDFeedTypes() + { + m_noMDFeedTypes.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDFeedTypes; + } - 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; - } + NoMDFeedTypes &noMDFeedTypesCount(const std::uint8_t count) + { + m_noMDFeedTypes.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDFeedTypes; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDFeedTypesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoInstAttrib &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char *InstAttribTypeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t instAttribTypeId() SBE_NOEXCEPT { - return 871; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - instAttribTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool instAttribTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDFeedTypesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= instAttribTypeSinceVersion(); + return m_actingVersion >= noMDFeedTypesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - instAttribTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t - instAttribTypeEncodingLength() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::int8_t - instAttribType() SBE_NOEXCEPT { - return (std::int8_t)24; - } - - SBE_NODISCARD static const char *InstAttribValueMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t instAttribValueId() SBE_NOEXCEPT { - return 872; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - instAttribValueSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool instAttribValueInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= instAttribValueSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - instAttribValueEncodingOffset() SBE_NOEXCEPT { - return 0; - } + } + class NoInstAttrib + { private: - InstAttribValue m_instAttribValue; + 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: - SBE_NODISCARD InstAttribValue &instAttribValue() { - m_instAttribValue.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_instAttribValue; - } + 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; + } - static SBE_CONSTEXPR std::size_t - instAttribValueEncodingLength() SBE_NOEXCEPT { - return 4; - } + 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; + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoInstAttrib writer) { - builder << '{'; - builder << R"("InstAttribValue": )"; - builder << writer.instAttribValue(); + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } - builder << '}'; + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 4; + } - return builder; - } - }; + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - private: - NoInstAttrib m_noInstAttrib; + // 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; + } - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoInstAttribId() SBE_NOEXCEPT { - return 870; - } + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - SBE_NODISCARD inline NoInstAttrib &noInstAttrib() { - m_noInstAttrib.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noInstAttrib; - } + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - NoInstAttrib &noInstAttribCount(const std::uint8_t count) { - m_noInstAttrib.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noInstAttrib; - } + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noInstAttribSinceVersion() SBE_NOEXCEPT { - return 0; - } + inline NoInstAttrib &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; - SBE_NODISCARD bool noInstAttribInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noInstAttribSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *InstAttribTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t instAttribTypeId() SBE_NOEXCEPT + { + return 871; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t instAttribTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool instAttribTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= instAttribTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t instAttribTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t instAttribTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t instAttribType() SBE_NOEXCEPT + { + return static_cast(24); + } + + SBE_NODISCARD static const char *InstAttribValueMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t instAttribValueId() SBE_NOEXCEPT + { + return 872; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t instAttribValueSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool instAttribValueInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= instAttribValueSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t instAttribValueEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - class NoLotTypeRules { 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; - } + InstAttribValue m_instAttribValue; 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; - } + SBE_NODISCARD InstAttribValue &instAttribValue() + { + m_instAttribValue.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_instAttribValue; + } - inline void wrapForEncode( - char *buffer, - const std::uint8_t count, - std::uint64_t *pos, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { + static SBE_CONSTEXPR std::size_t instAttribValueEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoInstAttrib writer) + { + builder << '{'; + builder << R"("InstAttribValue": )"; + builder << writer.instAttribValue(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)5); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 5; - 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; - } +private: + NoInstAttrib m_noInstAttrib; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 5; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoInstAttribId() SBE_NOEXCEPT + { + return 870; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoInstAttrib &noInstAttrib() + { + m_noInstAttrib.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noInstAttrib; + } - 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; - } + NoInstAttrib &noInstAttribCount(const std::uint8_t count) + { + m_noInstAttrib.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noInstAttrib; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noInstAttribSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoLotTypeRules &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - LotTypeMetaAttribute(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 lotTypeId() SBE_NOEXCEPT { - return 1093; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lotTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool lotTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noInstAttribInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lotTypeSinceVersion(); + return m_actingVersion >= noInstAttribSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lotTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int8_t lotTypeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t lotTypeMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t lotTypeMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t lotTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::int8_t lotType() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int8_t)); - return (val); - } - - NoLotTypeRules &lotType(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int8_t)); - return *this; - } - - SBE_NODISCARD static const char * - MinLotSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t minLotSizeId() SBE_NOEXCEPT { - return 1231; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minLotSizeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool minLotSizeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= minLotSizeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minLotSizeEncodingOffset() SBE_NOEXCEPT { - return 1; - } + } + class NoLotTypeRules + { private: - DecimalQty m_minLotSize; + 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: - SBE_NODISCARD DecimalQty &minLotSize() { - m_minLotSize.wrap( - m_buffer, m_offset + 1, m_actingVersion, m_bufferLength); - return m_minLotSize; - } + 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; + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoLotTypeRules writer) { - builder << '{'; - builder << R"("LotType": )"; - builder << +writer.lotType(); + 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(5)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 5; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } - builder << ", "; - builder << R"("MinLotSize": )"; - builder << writer.minLotSize(); + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } - builder << '}'; + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 5; + } - return builder; - } - }; + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - private: - NoLotTypeRules m_noLotTypeRules; + // 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; + } - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoLotTypeRulesId() SBE_NOEXCEPT { - return 1234; - } + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - SBE_NODISCARD inline NoLotTypeRules &noLotTypeRules() { - m_noLotTypeRules.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noLotTypeRules; - } + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - NoLotTypeRules &noLotTypeRulesCount(const std::uint8_t count) { - m_noLotTypeRules.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noLotTypeRules; - } + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noLotTypeRulesSinceVersion() SBE_NOEXCEPT { - return 0; - } + inline NoLotTypeRules &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; - SBE_NODISCARD bool noLotTypeRulesInActingVersion() const SBE_NOEXCEPT { + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *LotTypeMetaAttribute(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 lotTypeId() SBE_NOEXCEPT + { + return 1093; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lotTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lotTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= lotTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lotTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int8_t lotTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t lotTypeMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t lotTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t lotTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t lotType() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int8_t)); + return (val); + } + + NoLotTypeRules &lotType(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int8_t)); + return *this; + } + + SBE_NODISCARD static const char *MinLotSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t minLotSizeId() SBE_NOEXCEPT + { + return 1231; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minLotSizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minLotSizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= minLotSizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minLotSizeEncodingOffset() SBE_NOEXCEPT + { + return 1; + } + +private: + DecimalQty m_minLotSize; + +public: + SBE_NODISCARD DecimalQty &minLotSize() + { + m_minLotSize.wrap(m_buffer, m_offset + 1, m_actingVersion, m_bufferLength); + return m_minLotSize; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoLotTypeRules writer) + { + builder << '{'; + builder << R"("LotType": )"; + builder << +writer.lotType(); + + builder << ", "; + builder << R"("MinLotSize": )"; + builder << writer.minLotSize(); + + 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: + NoLotTypeRules m_noLotTypeRules; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLotTypeRulesId() SBE_NOEXCEPT + { + return 1234; + } + + SBE_NODISCARD inline NoLotTypeRules &noLotTypeRules() + { + m_noLotTypeRules.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLotTypeRules; + } + + NoLotTypeRules &noLotTypeRulesCount(const std::uint8_t count) + { + m_noLotTypeRules.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLotTypeRules; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noLotTypeRulesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noLotTypeRulesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= noLotTypeRulesSinceVersion(); + return m_actingVersion >= noLotTypeRulesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDInstrumentDefinitionFuture27 _writer) { - MDInstrumentDefinitionFuture27 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDInstrumentDefinitionFuture27", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDInstrumentDefinitionFuture27 _writer) +{ + MDInstrumentDefinitionFuture27 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDInstrumentDefinitionFuture27", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); - builder << ", "; - builder << R"("TotNumReports": )"; - builder << +writer.totNumReports(); + builder << ", "; + builder << R"("TotNumReports": )"; + builder << +writer.totNumReports(); - builder << ", "; - builder << R"("SecurityUpdateAction": )"; - builder << '"' << writer.securityUpdateAction() << '"'; + builder << ", "; + builder << R"("SecurityUpdateAction": )"; + builder << '"' << writer.securityUpdateAction() << '"'; - builder << ", "; - builder << R"("LastUpdateTime": )"; - builder << +writer.lastUpdateTime(); + builder << ", "; + builder << R"("LastUpdateTime": )"; + builder << +writer.lastUpdateTime(); - builder << ", "; - builder << R"("MDSecurityTradingStatus": )"; - builder << '"' << writer.mDSecurityTradingStatus() << '"'; + builder << ", "; + builder << R"("MDSecurityTradingStatus": )"; + builder << '"' << writer.mDSecurityTradingStatus() << '"'; - builder << ", "; - builder << R"("ApplID": )"; - builder << +writer.applID(); + builder << ", "; + builder << R"("ApplID": )"; + builder << +writer.applID(); - builder << ", "; - builder << R"("MarketSegmentID": )"; - builder << +writer.marketSegmentID(); + builder << ", "; + builder << R"("MarketSegmentID": )"; + builder << +writer.marketSegmentID(); - builder << ", "; - builder << R"("UnderlyingProduct": )"; - builder << +writer.underlyingProduct(); + builder << ", "; + builder << R"("UnderlyingProduct": )"; + builder << +writer.underlyingProduct(); - builder << ", "; - builder << R"("SecurityExchange": )"; - builder << '"' << writer.getSecurityExchangeAsJsonEscapedString().c_str() - << '"'; + builder << ", "; + builder << R"("SecurityExchange": )"; + builder << '"' << + writer.getSecurityExchangeAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("SecurityGroup": )"; - builder << '"' << writer.getSecurityGroupAsJsonEscapedString().c_str() - << '"'; + builder << ", "; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("Asset": )"; - builder << '"' << writer.getAssetAsJsonEscapedString().c_str() << '"'; + builder << ", "; + builder << R"("Asset": )"; + builder << '"' << + writer.getAssetAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("Symbol": )"; - builder << '"' << writer.getSymbolAsJsonEscapedString().c_str() << '"'; + builder << ", "; + builder << R"("Symbol": )"; + builder << '"' << + writer.getSymbolAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); - builder << ", "; - builder << R"("SecurityType": )"; - builder << '"' << writer.getSecurityTypeAsJsonEscapedString().c_str() - << '"'; + builder << ", "; + builder << R"("SecurityType": )"; + builder << '"' << + writer.getSecurityTypeAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("CFICode": )"; - builder << '"' << writer.getCFICodeAsJsonEscapedString().c_str() << '"'; + builder << ", "; + builder << R"("CFICode": )"; + builder << '"' << + writer.getCFICodeAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("MaturityMonthYear": )"; - builder << writer.maturityMonthYear(); + builder << ", "; + builder << R"("MaturityMonthYear": )"; + builder << writer.maturityMonthYear(); - builder << ", "; - builder << R"("Currency": )"; - builder << '"' << writer.getCurrencyAsJsonEscapedString().c_str() << '"'; + builder << ", "; + builder << R"("Currency": )"; + builder << '"' << + writer.getCurrencyAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("SettlCurrency": )"; - builder << '"' << writer.getSettlCurrencyAsJsonEscapedString().c_str() - << '"'; + builder << ", "; + builder << R"("SettlCurrency": )"; + builder << '"' << + writer.getSettlCurrencyAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("MatchAlgorithm": )"; - if (std::isprint(writer.matchAlgorithm())) { - builder << '"' << (char)writer.matchAlgorithm() << '"'; - } else { - builder << (int)writer.matchAlgorithm(); - } + builder << ", "; + builder << R"("MatchAlgorithm": )"; + if (std::isprint(writer.matchAlgorithm())) + { + builder << '"' << (char)writer.matchAlgorithm() << '"'; + } + else + { + builder << (int)writer.matchAlgorithm(); + } - builder << ", "; - builder << R"("MinTradeVol": )"; - builder << +writer.minTradeVol(); + builder << ", "; + builder << R"("MinTradeVol": )"; + builder << +writer.minTradeVol(); - builder << ", "; - builder << R"("MaxTradeVol": )"; - builder << +writer.maxTradeVol(); + builder << ", "; + builder << R"("MaxTradeVol": )"; + builder << +writer.maxTradeVol(); - builder << ", "; - builder << R"("MinPriceIncrement": )"; - builder << writer.minPriceIncrement(); + builder << ", "; + builder << R"("MinPriceIncrement": )"; + builder << writer.minPriceIncrement(); - builder << ", "; - builder << R"("DisplayFactor": )"; - builder << writer.displayFactor(); + builder << ", "; + builder << R"("DisplayFactor": )"; + builder << writer.displayFactor(); - builder << ", "; - builder << R"("MainFraction": )"; - builder << +writer.mainFraction(); + builder << ", "; + builder << R"("MainFraction": )"; + builder << +writer.mainFraction(); - builder << ", "; - builder << R"("SubFraction": )"; - builder << +writer.subFraction(); + builder << ", "; + builder << R"("SubFraction": )"; + builder << +writer.subFraction(); - builder << ", "; - builder << R"("PriceDisplayFormat": )"; - builder << +writer.priceDisplayFormat(); + builder << ", "; + builder << R"("PriceDisplayFormat": )"; + builder << +writer.priceDisplayFormat(); - builder << ", "; - builder << R"("UnitOfMeasure": )"; - builder << '"' << writer.getUnitOfMeasureAsJsonEscapedString().c_str() - << '"'; + builder << ", "; + builder << R"("UnitOfMeasure": )"; + builder << '"' << + writer.getUnitOfMeasureAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("UnitOfMeasureQty": )"; - builder << writer.unitOfMeasureQty(); + builder << ", "; + builder << R"("UnitOfMeasureQty": )"; + builder << writer.unitOfMeasureQty(); - builder << ", "; - builder << R"("TradingReferencePrice": )"; - builder << writer.tradingReferencePrice(); + builder << ", "; + builder << R"("TradingReferencePrice": )"; + builder << writer.tradingReferencePrice(); - builder << ", "; - builder << R"("SettlPriceType": )"; - builder << writer.settlPriceType(); + builder << ", "; + builder << R"("SettlPriceType": )"; + builder << writer.settlPriceType(); - builder << ", "; - builder << R"("OpenInterestQty": )"; - builder << +writer.openInterestQty(); + builder << ", "; + builder << R"("OpenInterestQty": )"; + builder << +writer.openInterestQty(); - builder << ", "; - builder << R"("ClearedVolume": )"; - builder << +writer.clearedVolume(); + builder << ", "; + builder << R"("ClearedVolume": )"; + builder << +writer.clearedVolume(); - builder << ", "; - builder << R"("HighLimitPrice": )"; - builder << writer.highLimitPrice(); + builder << ", "; + builder << R"("HighLimitPrice": )"; + builder << writer.highLimitPrice(); - builder << ", "; - builder << R"("LowLimitPrice": )"; - builder << writer.lowLimitPrice(); + builder << ", "; + builder << R"("LowLimitPrice": )"; + builder << writer.lowLimitPrice(); - builder << ", "; - builder << R"("MaxPriceVariation": )"; - builder << writer.maxPriceVariation(); + builder << ", "; + builder << R"("MaxPriceVariation": )"; + builder << writer.maxPriceVariation(); - builder << ", "; - builder << R"("DecayQuantity": )"; - builder << +writer.decayQuantity(); + builder << ", "; + builder << R"("DecayQuantity": )"; + builder << +writer.decayQuantity(); - builder << ", "; - builder << R"("DecayStartDate": )"; - builder << +writer.decayStartDate(); + builder << ", "; + builder << R"("DecayStartDate": )"; + builder << +writer.decayStartDate(); - builder << ", "; - builder << R"("OriginalContractSize": )"; - builder << +writer.originalContractSize(); + builder << ", "; + builder << R"("OriginalContractSize": )"; + builder << +writer.originalContractSize(); - builder << ", "; - builder << R"("ContractMultiplier": )"; - builder << +writer.contractMultiplier(); + builder << ", "; + builder << R"("ContractMultiplier": )"; + builder << +writer.contractMultiplier(); - builder << ", "; - builder << R"("ContractMultiplierUnit": )"; - builder << +writer.contractMultiplierUnit(); + builder << ", "; + builder << R"("ContractMultiplierUnit": )"; + builder << +writer.contractMultiplierUnit(); - builder << ", "; - builder << R"("FlowScheduleType": )"; - builder << +writer.flowScheduleType(); + builder << ", "; + builder << R"("FlowScheduleType": )"; + builder << +writer.flowScheduleType(); - builder << ", "; - builder << R"("MinPriceIncrementAmount": )"; - builder << writer.minPriceIncrementAmount(); + builder << ", "; + builder << R"("MinPriceIncrementAmount": )"; + builder << writer.minPriceIncrementAmount(); - builder << ", "; - builder << R"("UserDefinedInstrument": )"; - if (std::isprint(writer.userDefinedInstrument())) { - builder << '"' << (char)writer.userDefinedInstrument() << '"'; - } else { - builder << (int)writer.userDefinedInstrument(); - } + builder << ", "; + builder << R"("UserDefinedInstrument": )"; + if (std::isprint(writer.userDefinedInstrument())) + { + builder << '"' << (char)writer.userDefinedInstrument() << '"'; + } + else + { + builder << (int)writer.userDefinedInstrument(); + } - builder << ", "; - builder << R"("TradingReferenceDate": )"; - builder << +writer.tradingReferenceDate(); + builder << ", "; + builder << R"("TradingReferenceDate": )"; + builder << +writer.tradingReferenceDate(); - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoEvents": [)"; - writer.noEvents().forEach([&](NoEvents &noEvents) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoEvents": [)"; + writer.noEvents().forEach([&](NoEvents& noEvents) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noEvents; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDFeedTypes": [)"; - writer.noMDFeedTypes().forEach([&](NoMDFeedTypes &noMDFeedTypes) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDFeedTypes": [)"; + writer.noMDFeedTypes().forEach([&](NoMDFeedTypes& noMDFeedTypes) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDFeedTypes; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoInstAttrib": [)"; - writer.noInstAttrib().forEach([&](NoInstAttrib &noInstAttrib) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoInstAttrib": [)"; + writer.noInstAttrib().forEach([&](NoInstAttrib& noInstAttrib) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noInstAttrib; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoLotTypeRules": [)"; - writer.noLotTypeRules().forEach([&](NoLotTypeRules &noLotTypeRules) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoLotTypeRules": [)"; + writer.noLotTypeRules().forEach([&](NoLotTypeRules& noLotTypeRules) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noLotTypeRules; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noEvents().forEach([](NoEvents e) + { + e.skip(); + }); + noMDFeedTypes().forEach([](NoMDFeedTypes e) + { + e.skip(); + }); + noInstAttrib().forEach([](NoInstAttrib e) + { + e.skip(); + }); + noLotTypeRules().forEach([](NoLotTypeRules e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength( + std::size_t noEventsLength = 0, + std::size_t noMDFeedTypesLength = 0, + std::size_t noInstAttribLength = 0, + std::size_t noLotTypeRulesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoEvents::sbeHeaderSize(); + if (noEventsLength > 254LL) + { + throw std::runtime_error("noEventsLength outside of allowed range [E110]"); + } + length += noEventsLength *NoEvents::sbeBlockLength(); + + length += NoMDFeedTypes::sbeHeaderSize(); + if (noMDFeedTypesLength > 254LL) + { + throw std::runtime_error("noMDFeedTypesLength outside of allowed range [E110]"); + } + length += noMDFeedTypesLength *NoMDFeedTypes::sbeBlockLength(); + + length += NoInstAttrib::sbeHeaderSize(); + if (noInstAttribLength > 254LL) + { + throw std::runtime_error("noInstAttribLength outside of allowed range [E110]"); + } + length += noInstAttribLength *NoInstAttrib::sbeBlockLength(); + + length += NoLotTypeRules::sbeHeaderSize(); + if (noLotTypeRulesLength > 254LL) + { + throw std::runtime_error("noLotTypeRulesLength outside of allowed range [E110]"); + } + length += noLotTypeRulesLength *NoLotTypeRules::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionFuture54.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionFuture54.h index 3f2119f68..48755366b 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionFuture54.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionFuture54.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,5881 +86,6394 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDInstrumentDefinitionFuture54 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDInstrumentDefinitionFuture54 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(216); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(54); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDInstrumentDefinitionFuture54() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDInstrumentDefinitionFuture54( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDInstrumentDefinitionFuture54( - char *buffer, const std::uint64_t bufferLength) - : MDInstrumentDefinitionFuture54( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDInstrumentDefinitionFuture54() = default; - MDInstrumentDefinitionFuture54( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDInstrumentDefinitionFuture54( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDInstrumentDefinitionFuture54( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)216; - } + MDInstrumentDefinitionFuture54(char *buffer, const std::uint64_t bufferLength) : + MDInstrumentDefinitionFuture54(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)54; - } + MDInstrumentDefinitionFuture54( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDInstrumentDefinitionFuture54(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(216); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "d"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(54); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDInstrumentDefinitionFuture54 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDInstrumentDefinitionFuture54( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDInstrumentDefinitionFuture54 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "d"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDInstrumentDefinitionFuture54( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDInstrumentDefinitionFuture54 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDInstrumentDefinitionFuture54(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDInstrumentDefinitionFuture54 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDInstrumentDefinitionFuture54( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDInstrumentDefinitionFuture54 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDInstrumentDefinitionFuture54( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDInstrumentDefinitionFuture54 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDInstrumentDefinitionFuture54(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDInstrumentDefinitionFuture54 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD static const char * - TotNumReportsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TotNumReportsMetaAttribute(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 totNumReportsId() SBE_NOEXCEPT { - return 911; - } + static SBE_CONSTEXPR std::uint16_t totNumReportsId() SBE_NOEXCEPT + { + return 911; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - totNumReportsSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNumReportsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= totNumReportsSinceVersion(); + return m_actingVersion >= totNumReportsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - totNumReportsEncodingOffset() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNumReportsEncodingOffset() SBE_NOEXCEPT + { + return 1; + } - static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT { - return 4294967295; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT + { + return UINT32_C(0xffffffff); + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture54 & - totNumReports(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &totNumReports(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityUpdateActionMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityUpdateActionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityUpdateActionId() SBE_NOEXCEPT { - return 980; - } + static SBE_CONSTEXPR std::uint16_t securityUpdateActionId() SBE_NOEXCEPT + { + return 980; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityUpdateActionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityUpdateActionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityUpdateActionSinceVersion(); + return m_actingVersion >= securityUpdateActionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 5; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 5; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD SecurityUpdateAction::Value - securityUpdateAction() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 5, sizeof(char)); - return SecurityUpdateAction::get((val)); - } + SBE_NODISCARD SecurityUpdateAction::Value securityUpdateAction() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 5, sizeof(char)); + return SecurityUpdateAction::get((val)); + } - MDInstrumentDefinitionFuture54 & - securityUpdateAction(const SecurityUpdateAction::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 5, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionFuture54 &securityUpdateAction(const SecurityUpdateAction::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 5, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char * - LastUpdateTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *LastUpdateTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t lastUpdateTimeId() SBE_NOEXCEPT { - return 779; - } + static SBE_CONSTEXPR std::uint16_t lastUpdateTimeId() SBE_NOEXCEPT + { + return 779; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lastUpdateTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastUpdateTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool lastUpdateTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool lastUpdateTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lastUpdateTimeSinceVersion(); + return m_actingVersion >= lastUpdateTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lastUpdateTimeEncodingOffset() SBE_NOEXCEPT { - return 6; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastUpdateTimeEncodingOffset() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t - lastUpdateTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t lastUpdateTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t lastUpdateTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 6, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t lastUpdateTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 6, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - MDInstrumentDefinitionFuture54 & - lastUpdateTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 6, &val, sizeof(std::uint64_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &lastUpdateTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 6, &val, sizeof(std::uint64_t)); + return *this; + } - SBE_NODISCARD static const char *MDSecurityTradingStatusMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MDSecurityTradingStatusMetaAttribute(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 mDSecurityTradingStatusId() SBE_NOEXCEPT { - return 1682; - } + static SBE_CONSTEXPR std::uint16_t mDSecurityTradingStatusId() SBE_NOEXCEPT + { + return 1682; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDSecurityTradingStatusSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDSecurityTradingStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool mDSecurityTradingStatusInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool mDSecurityTradingStatusInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDSecurityTradingStatusSinceVersion(); + return m_actingVersion >= mDSecurityTradingStatusSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDSecurityTradingStatusEncodingOffset() SBE_NOEXCEPT { - return 14; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDSecurityTradingStatusEncodingOffset() SBE_NOEXCEPT + { + return 14; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDSecurityTradingStatusEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDSecurityTradingStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD SecurityTradingStatus::Value - mDSecurityTradingStatus() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); - return SecurityTradingStatus::get((val)); - } + SBE_NODISCARD SecurityTradingStatus::Value mDSecurityTradingStatus() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return SecurityTradingStatus::get((val)); + } - MDInstrumentDefinitionFuture54 &mDSecurityTradingStatus( - const SecurityTradingStatus::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &mDSecurityTradingStatus(const SecurityTradingStatus::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - ApplIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *ApplIDMetaAttribute(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 applIDId() SBE_NOEXCEPT { return 1180; } + static SBE_CONSTEXPR std::uint16_t applIDId() SBE_NOEXCEPT + { + return 1180; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - applIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t applIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool applIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool applIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= applIDSinceVersion(); + return m_actingVersion >= applIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - applIDEncodingOffset() SBE_NOEXCEPT { - return 15; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t applIDEncodingOffset() SBE_NOEXCEPT + { + return 15; + } - static SBE_CONSTEXPR std::int16_t applIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT16; - } + static SBE_CONSTEXPR std::int16_t applIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT16; + } - static SBE_CONSTEXPR std::int16_t applIDMinValue() SBE_NOEXCEPT { - return (std::int16_t)-32767; - } + static SBE_CONSTEXPR std::int16_t applIDMinValue() SBE_NOEXCEPT + { + return static_cast(-32767); + } - static SBE_CONSTEXPR std::int16_t applIDMaxValue() SBE_NOEXCEPT { - return (std::int16_t)32767; - } + static SBE_CONSTEXPR std::int16_t applIDMaxValue() SBE_NOEXCEPT + { + return static_cast(32767); + } - static SBE_CONSTEXPR std::size_t applIDEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t applIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::int16_t applID() const SBE_NOEXCEPT { - std::int16_t val; - std::memcpy(&val, m_buffer + m_offset + 15, sizeof(std::int16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::int16_t applID() const SBE_NOEXCEPT + { + std::int16_t val; + std::memcpy(&val, m_buffer + m_offset + 15, sizeof(std::int16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MDInstrumentDefinitionFuture54 & - applID(const std::int16_t value) SBE_NOEXCEPT { - std::int16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 15, &val, sizeof(std::int16_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &applID(const std::int16_t value) SBE_NOEXCEPT + { + std::int16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 15, &val, sizeof(std::int16_t)); + return *this; + } - SBE_NODISCARD static const char *MarketSegmentIDMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MarketSegmentIDMetaAttribute(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 marketSegmentIDId() SBE_NOEXCEPT { - return 1300; - } + static SBE_CONSTEXPR std::uint16_t marketSegmentIDId() SBE_NOEXCEPT + { + return 1300; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - marketSegmentIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketSegmentIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= marketSegmentIDSinceVersion(); + return m_actingVersion >= marketSegmentIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - marketSegmentIDEncodingOffset() SBE_NOEXCEPT { - return 17; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingOffset() SBE_NOEXCEPT + { + return 17; + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT8; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - marketSegmentIDEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionFuture54 & - marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *UnderlyingProductMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UnderlyingProductMetaAttribute(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 underlyingProductId() SBE_NOEXCEPT { - return 462; - } + static SBE_CONSTEXPR std::uint16_t underlyingProductId() SBE_NOEXCEPT + { + return 462; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - underlyingProductSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t underlyingProductSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool underlyingProductInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool underlyingProductInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= underlyingProductSinceVersion(); + return m_actingVersion >= underlyingProductSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - underlyingProductEncodingOffset() SBE_NOEXCEPT { - return 18; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t underlyingProductEncodingOffset() SBE_NOEXCEPT + { + return 18; + } - static SBE_CONSTEXPR std::uint8_t underlyingProductNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT8; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } - static SBE_CONSTEXPR std::uint8_t underlyingProductMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t underlyingProductMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - underlyingProductEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t underlyingProductEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t underlyingProduct() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t underlyingProduct() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionFuture54 & - underlyingProduct(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &underlyingProduct(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityExchangeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Exchange"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityExchangeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Exchange"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityExchangeId() SBE_NOEXCEPT { - return 207; - } + static SBE_CONSTEXPR std::uint16_t securityExchangeId() SBE_NOEXCEPT + { + return 207; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityExchangeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityExchangeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityExchangeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityExchangeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityExchangeSinceVersion(); + return m_actingVersion >= securityExchangeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityExchangeEncodingOffset() SBE_NOEXCEPT { - return 19; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityExchangeEncodingOffset() SBE_NOEXCEPT + { + return 19; + } - static SBE_CONSTEXPR char securityExchangeNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityExchangeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityExchangeMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityExchangeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityExchangeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityExchangeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - securityExchangeEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t securityExchangeEncodingLength() SBE_NOEXCEPT + { + return 4; + } - static SBE_CONSTEXPR std::uint64_t securityExchangeLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::uint64_t securityExchangeLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD const char *securityExchange() const SBE_NOEXCEPT { - return m_buffer + m_offset + 19; - } + SBE_NODISCARD const char *securityExchange() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 19; + } - SBE_NODISCARD char *securityExchange() SBE_NOEXCEPT { - return m_buffer + m_offset + 19; - } + SBE_NODISCARD char *securityExchange() SBE_NOEXCEPT + { + return m_buffer + m_offset + 19; + } - SBE_NODISCARD char securityExchange(const std::uint64_t index) const { - if (index >= 4) { - throw std::runtime_error( - "index out of range for securityExchange [E104]"); - } + SBE_NODISCARD char securityExchange(const std::uint64_t index) const + { + if (index >= 4) + { + throw std::runtime_error("index out of range for securityExchange [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 19 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 19 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture54 & - securityExchange(const std::uint64_t index, const char value) { - if (index >= 4) { - throw std::runtime_error( - "index out of range for securityExchange [E105]"); - } + MDInstrumentDefinitionFuture54 &securityExchange(const std::uint64_t index, const char value) + { + if (index >= 4) + { + throw std::runtime_error("index out of range for securityExchange [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 19 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 19 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityExchange(char *const dst, const std::uint64_t length) const { - if (length > 4) { - throw std::runtime_error( - "length too large for getSecurityExchange [E106]"); - } + std::uint64_t getSecurityExchange(char *const dst, const std::uint64_t length) const + { + if (length > 4) + { + throw std::runtime_error("length too large for getSecurityExchange [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 19, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 19, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture54 & - putSecurityExchange(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 19, src, sizeof(char) * 4); - return *this; - } + MDInstrumentDefinitionFuture54 &putSecurityExchange(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 19, src, sizeof(char) * 4); + return *this; + } - MDInstrumentDefinitionFuture54 &putSecurityExchange( - const char value0, - const char value1, - const char value2, - const char value3) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 19, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 20, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 21, &val2, sizeof(char)); - char val3 = (value3); - std::memcpy(m_buffer + m_offset + 22, &val3, sizeof(char)); + MDInstrumentDefinitionFuture54 &putSecurityExchange( + const char value0, + const char value1, + const char value2, + const char value3) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 19, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 20, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 21, &val2, sizeof(char)); + char val3 = (value3); + std::memcpy(m_buffer + m_offset + 22, &val3, sizeof(char)); - return *this; - } + return *this; + } - std::string getSecurityExchangeAsString() const { - const char *buffer = m_buffer + m_offset + 19; - size_t length = 0; + SBE_NODISCARD std::string getSecurityExchangeAsString() const + { + const char *buffer = m_buffer + m_offset + 19; + size_t length = 0; - for (; length < 4 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 4 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityExchangeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityExchangeAsString(); + std::string getSecurityExchangeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityExchangeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityExchangeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 19; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityExchangeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 19; + size_t length = 0; - for (; length < 4 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 4 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture54 & - putSecurityExchange(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 4) { - throw std::runtime_error( - "string too large for putSecurityExchange [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture54 &putSecurityExchange(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 4) + { + throw std::runtime_error("string too large for putSecurityExchange [E106]"); + } - std::memcpy(m_buffer + m_offset + 19, str.data(), srcLength); - for (size_t start = srcLength; start < 4; ++start) { - m_buffer[m_offset + 19 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 19, str.data(), srcLength); + for (size_t start = srcLength; start < 4; ++start) + { + m_buffer[m_offset + 19 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture54 &putSecurityExchange(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 4) { - throw std::runtime_error( - "string too large for putSecurityExchange [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture54 &putSecurityExchange(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 4) + { + throw std::runtime_error("string too large for putSecurityExchange [E106]"); + } - std::memcpy(m_buffer + m_offset + 19, str.c_str(), srcLength); - for (size_t start = srcLength; start < 4; ++start) { - m_buffer[m_offset + 19 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 19, str.c_str(), srcLength); + for (size_t start = srcLength; start < 4; ++start) + { + m_buffer[m_offset + 19 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT { - return 1151; - } + static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT + { + return 1151; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityGroupSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityGroupSinceVersion(); + return m_actingVersion >= securityGroupSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityGroupEncodingOffset() SBE_NOEXCEPT { - return 23; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityGroupEncodingOffset() SBE_NOEXCEPT + { + return 23; + } - static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT { - return m_buffer + m_offset + 23; - } + SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 23; + } - SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT { - return m_buffer + m_offset + 23; - } + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 23; + } - SBE_NODISCARD char securityGroup(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error( - "index out of range for securityGroup [E104]"); - } + SBE_NODISCARD char securityGroup(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 23 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 23 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture54 & - securityGroup(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error( - "index out of range for securityGroup [E105]"); - } + MDInstrumentDefinitionFuture54 &securityGroup(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 23 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 23 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityGroup(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error( - "length too large for getSecurityGroup [E106]"); - } + std::uint64_t getSecurityGroup(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityGroup [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 23, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 23, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture54 & - putSecurityGroup(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 23, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionFuture54 &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 23, src, sizeof(char) * 6); + return *this; + } - std::string getSecurityGroupAsString() const { - const char *buffer = m_buffer + m_offset + 23; - size_t length = 0; + SBE_NODISCARD std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 23; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityGroupAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityGroupAsString(); + std::string getSecurityGroupAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityGroupAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 23; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 23; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture54 & - putSecurityGroup(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityGroup [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture54 &putSecurityGroup(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } - std::memcpy(m_buffer + m_offset + 23, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 23 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 23, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 23 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture54 &putSecurityGroup(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityGroup [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture54 &putSecurityGroup(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } - std::memcpy(m_buffer + m_offset + 23, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 23 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 23, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 23 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - AssetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *AssetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t assetId() SBE_NOEXCEPT { return 6937; } + static SBE_CONSTEXPR std::uint16_t assetId() SBE_NOEXCEPT + { + return 6937; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - assetSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t assetSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool assetInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool assetInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= assetSinceVersion(); + return m_actingVersion >= assetSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - assetEncodingOffset() SBE_NOEXCEPT { - return 29; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t assetEncodingOffset() SBE_NOEXCEPT + { + return 29; + } - static SBE_CONSTEXPR char assetNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char assetNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char assetMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char assetMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char assetMaxValue() SBE_NOEXCEPT { return (char)126; } + static SBE_CONSTEXPR char assetMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t assetEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t assetEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t assetLength() SBE_NOEXCEPT { return 6; } + static SBE_CONSTEXPR std::uint64_t assetLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *asset() const SBE_NOEXCEPT { - return m_buffer + m_offset + 29; - } + SBE_NODISCARD const char *asset() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 29; + } - SBE_NODISCARD char *asset() SBE_NOEXCEPT { return m_buffer + m_offset + 29; } + SBE_NODISCARD char *asset() SBE_NOEXCEPT + { + return m_buffer + m_offset + 29; + } - SBE_NODISCARD char asset(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for asset [E104]"); - } + SBE_NODISCARD char asset(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for asset [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 29 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 29 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture54 & - asset(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for asset [E105]"); - } + MDInstrumentDefinitionFuture54 &asset(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for asset [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 29 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 29 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getAsset(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error("length too large for getAsset [E106]"); - } + std::uint64_t getAsset(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getAsset [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 29, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 29, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture54 & - putAsset(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 29, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionFuture54 &putAsset(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 29, src, sizeof(char) * 6); + return *this; + } - std::string getAssetAsString() const { - const char *buffer = m_buffer + m_offset + 29; - size_t length = 0; + SBE_NODISCARD std::string getAssetAsString() const + { + const char *buffer = m_buffer + m_offset + 29; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getAssetAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getAssetAsString(); + std::string getAssetAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getAssetAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getAssetAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 29; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getAssetAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 29; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture54 &putAsset(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putAsset [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture54 &putAsset(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putAsset [E106]"); + } - std::memcpy(m_buffer + m_offset + 29, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 29 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 29, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 29 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture54 &putAsset(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putAsset [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture54 &putAsset(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putAsset [E106]"); + } - std::memcpy(m_buffer + m_offset + 29, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 29 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 29, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 29 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t symbolId() SBE_NOEXCEPT { return 55; } + static SBE_CONSTEXPR std::uint16_t symbolId() SBE_NOEXCEPT + { + return 55; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - symbolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t symbolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool symbolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool symbolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= symbolSinceVersion(); + return m_actingVersion >= symbolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - symbolEncodingOffset() SBE_NOEXCEPT { - return 35; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t symbolEncodingOffset() SBE_NOEXCEPT + { + return 35; + } - static SBE_CONSTEXPR char symbolNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char symbolNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char symbolMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char symbolMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char symbolMaxValue() SBE_NOEXCEPT { return (char)126; } + static SBE_CONSTEXPR char symbolMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t symbolEncodingLength() SBE_NOEXCEPT { - return 20; - } + static SBE_CONSTEXPR std::size_t symbolEncodingLength() SBE_NOEXCEPT + { + return 20; + } - static SBE_CONSTEXPR std::uint64_t symbolLength() SBE_NOEXCEPT { return 20; } + static SBE_CONSTEXPR std::uint64_t symbolLength() SBE_NOEXCEPT + { + return 20; + } - SBE_NODISCARD const char *symbol() const SBE_NOEXCEPT { - return m_buffer + m_offset + 35; - } + SBE_NODISCARD const char *symbol() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 35; + } - SBE_NODISCARD char *symbol() SBE_NOEXCEPT { - return m_buffer + m_offset + 35; - } + SBE_NODISCARD char *symbol() SBE_NOEXCEPT + { + return m_buffer + m_offset + 35; + } - SBE_NODISCARD char symbol(const std::uint64_t index) const { - if (index >= 20) { - throw std::runtime_error("index out of range for symbol [E104]"); - } + SBE_NODISCARD char symbol(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 35 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 35 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture54 & - symbol(const std::uint64_t index, const char value) { - if (index >= 20) { - throw std::runtime_error("index out of range for symbol [E105]"); - } + MDInstrumentDefinitionFuture54 &symbol(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 35 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 35 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getSymbol(char *const dst, const std::uint64_t length) const { - if (length > 20) { - throw std::runtime_error("length too large for getSymbol [E106]"); - } + std::uint64_t getSymbol(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSymbol [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 35, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 35, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture54 & - putSymbol(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 35, src, sizeof(char) * 20); - return *this; - } + MDInstrumentDefinitionFuture54 &putSymbol(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 35, src, sizeof(char) * 20); + return *this; + } - std::string getSymbolAsString() const { - const char *buffer = m_buffer + m_offset + 35; - size_t length = 0; + SBE_NODISCARD std::string getSymbolAsString() const + { + const char *buffer = m_buffer + m_offset + 35; + size_t length = 0; - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSymbolAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSymbolAsString(); + std::string getSymbolAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSymbolAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSymbolAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 35; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSymbolAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 35; + size_t length = 0; - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture54 &putSymbol(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error("string too large for putSymbol [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture54 &putSymbol(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } - std::memcpy(m_buffer + m_offset + 35, str.data(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 35 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 35, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 35 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture54 &putSymbol(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error("string too large for putSymbol [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture54 &putSymbol(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } - std::memcpy(m_buffer + m_offset + 35, str.c_str(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 35 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 35, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 35 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { return 48; } + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityIDSinceVersion(); + return m_actingVersion >= securityIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 55; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 55; + } - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 55, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 55, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture54 & - securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 55, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 55, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityIDSourceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityIDSourceId() SBE_NOEXCEPT { - return 22; - } + static SBE_CONSTEXPR std::uint16_t securityIDSourceId() SBE_NOEXCEPT + { + return 22; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSourceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityIDSourceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityIDSourceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityIDSourceSinceVersion(); + return m_actingVersion >= securityIDSourceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDSourceEncodingOffset() SBE_NOEXCEPT { - return 59; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 59; + } - static SBE_CONSTEXPR char securityIDSourceNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityIDSourceNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityIDSourceMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityIDSourceMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityIDSourceMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityIDSourceMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - securityIDSourceEncodingLength() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::size_t securityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t securityIDSourceLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::uint64_t securityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD const char *securityIDSource() const { - static const std::uint8_t securityIDSourceValues[] = {56}; + SBE_NODISCARD const char *securityIDSource() const + { + static const std::uint8_t securityIDSourceValues[] = { 56 }; - return (const char *)securityIDSourceValues; - } + return (const char *)securityIDSourceValues; + } - SBE_NODISCARD char securityIDSource(const std::uint64_t index) const { - static const std::uint8_t securityIDSourceValues[] = {56}; + SBE_NODISCARD char securityIDSource(const std::uint64_t index) const + { + static const std::uint8_t securityIDSourceValues[] = { 56 }; - return (char)securityIDSourceValues[index]; - } + return (char)securityIDSourceValues[index]; + } - std::uint64_t - getSecurityIDSource(char *dst, const std::uint64_t length) const { - static std::uint8_t securityIDSourceValues[] = {56}; - std::uint64_t bytesToCopy = length < sizeof(securityIDSourceValues) - ? length - : sizeof(securityIDSourceValues); + std::uint64_t getSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t securityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(securityIDSourceValues) ? length : sizeof(securityIDSourceValues); - std::memcpy( - dst, securityIDSourceValues, static_cast(bytesToCopy)); - return bytesToCopy; - } + std::memcpy(dst, securityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } - std::string getSecurityIDSourceAsString() const { - static const std::uint8_t SecurityIDSourceValues[] = {56}; + std::string getSecurityIDSourceAsString() const + { + static const std::uint8_t SecurityIDSourceValues[] = { 56 }; - return std::string((const char *)SecurityIDSourceValues, 1); - } + return std::string((const char *)SecurityIDSourceValues, 1); + } - std::string getSecurityIDSourceAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityIDSourceAsString(); + std::string getSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityIDSourceAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } - SBE_NODISCARD static const char * - SecurityTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityTypeId() SBE_NOEXCEPT { - return 167; - } + static SBE_CONSTEXPR std::uint16_t securityTypeId() SBE_NOEXCEPT + { + return 167; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityTypeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityTypeSinceVersion(); + return m_actingVersion >= securityTypeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityTypeEncodingOffset() SBE_NOEXCEPT { - return 59; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityTypeEncodingOffset() SBE_NOEXCEPT + { + return 59; + } - static SBE_CONSTEXPR char securityTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t securityTypeEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t securityTypeEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t securityTypeLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::uint64_t securityTypeLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *securityType() const SBE_NOEXCEPT { - return m_buffer + m_offset + 59; - } + SBE_NODISCARD const char *securityType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 59; + } - SBE_NODISCARD char *securityType() SBE_NOEXCEPT { - return m_buffer + m_offset + 59; - } + SBE_NODISCARD char *securityType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 59; + } - SBE_NODISCARD char securityType(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for securityType [E104]"); - } + SBE_NODISCARD char securityType(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityType [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 59 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 59 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture54 & - securityType(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for securityType [E105]"); - } + MDInstrumentDefinitionFuture54 &securityType(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityType [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 59 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 59 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityType(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error( - "length too large for getSecurityType [E106]"); - } + std::uint64_t getSecurityType(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityType [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 59, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 59, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture54 & - putSecurityType(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 59, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionFuture54 &putSecurityType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 59, src, sizeof(char) * 6); + return *this; + } - std::string getSecurityTypeAsString() const { - const char *buffer = m_buffer + m_offset + 59; - size_t length = 0; + SBE_NODISCARD std::string getSecurityTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 59; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityTypeAsString(); + std::string getSecurityTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityTypeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityTypeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 59; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 59; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture54 &putSecurityType(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityType [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture54 &putSecurityType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityType [E106]"); + } - std::memcpy(m_buffer + m_offset + 59, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 59 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 59, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 59 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture54 &putSecurityType(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityType [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture54 &putSecurityType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityType [E106]"); + } - std::memcpy(m_buffer + m_offset + 59, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 59 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 59, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 59 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - CFICodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *CFICodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t cFICodeId() SBE_NOEXCEPT { return 461; } + static SBE_CONSTEXPR std::uint16_t cFICodeId() SBE_NOEXCEPT + { + return 461; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - cFICodeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cFICodeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool cFICodeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool cFICodeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= cFICodeSinceVersion(); + return m_actingVersion >= cFICodeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - cFICodeEncodingOffset() SBE_NOEXCEPT { - return 65; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cFICodeEncodingOffset() SBE_NOEXCEPT + { + return 65; + } - static SBE_CONSTEXPR char cFICodeNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char cFICodeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char cFICodeMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char cFICodeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char cFICodeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char cFICodeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t cFICodeEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t cFICodeEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t cFICodeLength() SBE_NOEXCEPT { return 6; } + static SBE_CONSTEXPR std::uint64_t cFICodeLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *cFICode() const SBE_NOEXCEPT { - return m_buffer + m_offset + 65; - } + SBE_NODISCARD const char *cFICode() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 65; + } - SBE_NODISCARD char *cFICode() SBE_NOEXCEPT { - return m_buffer + m_offset + 65; - } + SBE_NODISCARD char *cFICode() SBE_NOEXCEPT + { + return m_buffer + m_offset + 65; + } - SBE_NODISCARD char cFICode(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for cFICode [E104]"); - } + SBE_NODISCARD char cFICode(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cFICode [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 65 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 65 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture54 & - cFICode(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for cFICode [E105]"); - } + MDInstrumentDefinitionFuture54 &cFICode(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cFICode [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 65 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 65 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getCFICode(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error("length too large for getCFICode [E106]"); - } + std::uint64_t getCFICode(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getCFICode [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 65, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 65, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture54 & - putCFICode(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 65, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionFuture54 &putCFICode(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 65, src, sizeof(char) * 6); + return *this; + } - std::string getCFICodeAsString() const { - const char *buffer = m_buffer + m_offset + 65; - size_t length = 0; + SBE_NODISCARD std::string getCFICodeAsString() const + { + const char *buffer = m_buffer + m_offset + 65; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getCFICodeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getCFICodeAsString(); + std::string getCFICodeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCFICodeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getCFICodeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 65; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCFICodeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 65; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture54 &putCFICode(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putCFICode [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture54 &putCFICode(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCFICode [E106]"); + } - std::memcpy(m_buffer + m_offset + 65, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 65 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 65, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 65 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture54 &putCFICode(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putCFICode [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture54 &putCFICode(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCFICode [E106]"); + } - std::memcpy(m_buffer + m_offset + 65, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 65 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 65, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 65 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char *MaturityMonthYearMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MonthYear"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaturityMonthYearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MonthYear"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t maturityMonthYearId() SBE_NOEXCEPT { - return 200; - } + static SBE_CONSTEXPR std::uint16_t maturityMonthYearId() SBE_NOEXCEPT + { + return 200; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maturityMonthYearSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maturityMonthYearSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool maturityMonthYearInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maturityMonthYearInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maturityMonthYearSinceVersion(); + return m_actingVersion >= maturityMonthYearSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maturityMonthYearEncodingOffset() SBE_NOEXCEPT { - return 71; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maturityMonthYearEncodingOffset() SBE_NOEXCEPT + { + return 71; + } - private: - MaturityMonthYear m_maturityMonthYear; +private: + MaturityMonthYear m_maturityMonthYear; - public: - SBE_NODISCARD MaturityMonthYear &maturityMonthYear() { - m_maturityMonthYear.wrap( - m_buffer, m_offset + 71, m_actingVersion, m_bufferLength); - return m_maturityMonthYear; - } +public: + SBE_NODISCARD MaturityMonthYear &maturityMonthYear() + { + m_maturityMonthYear.wrap(m_buffer, m_offset + 71, m_actingVersion, m_bufferLength); + return m_maturityMonthYear; + } - SBE_NODISCARD static const char * - CurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Currency"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *CurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Currency"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t currencyId() SBE_NOEXCEPT { return 15; } + static SBE_CONSTEXPR std::uint16_t currencyId() SBE_NOEXCEPT + { + return 15; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - currencySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t currencySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool currencyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool currencyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= currencySinceVersion(); + return m_actingVersion >= currencySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - currencyEncodingOffset() SBE_NOEXCEPT { - return 76; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t currencyEncodingOffset() SBE_NOEXCEPT + { + return 76; + } - static SBE_CONSTEXPR char currencyNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char currencyNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char currencyMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char currencyMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char currencyMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char currencyMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t currencyEncodingLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::size_t currencyEncodingLength() SBE_NOEXCEPT + { + return 3; + } - static SBE_CONSTEXPR std::uint64_t currencyLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::uint64_t currencyLength() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD const char *currency() const SBE_NOEXCEPT { - return m_buffer + m_offset + 76; - } + SBE_NODISCARD const char *currency() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 76; + } - SBE_NODISCARD char *currency() SBE_NOEXCEPT { - return m_buffer + m_offset + 76; - } + SBE_NODISCARD char *currency() SBE_NOEXCEPT + { + return m_buffer + m_offset + 76; + } - SBE_NODISCARD char currency(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error("index out of range for currency [E104]"); - } + SBE_NODISCARD char currency(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for currency [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 76 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 76 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture54 & - currency(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error("index out of range for currency [E105]"); - } + MDInstrumentDefinitionFuture54 ¤cy(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for currency [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 76 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 76 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getCurrency(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error("length too large for getCurrency [E106]"); - } + std::uint64_t getCurrency(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getCurrency [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 76, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 76, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture54 & - putCurrency(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 76, src, sizeof(char) * 3); - return *this; - } + MDInstrumentDefinitionFuture54 &putCurrency(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 76, src, sizeof(char) * 3); + return *this; + } - MDInstrumentDefinitionFuture54 &putCurrency( - const char value0, const char value1, const char value2) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 76, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 77, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 78, &val2, sizeof(char)); + MDInstrumentDefinitionFuture54 &putCurrency( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 76, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 77, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 78, &val2, sizeof(char)); - return *this; - } + return *this; + } - std::string getCurrencyAsString() const { - const char *buffer = m_buffer + m_offset + 76; - size_t length = 0; + SBE_NODISCARD std::string getCurrencyAsString() const + { + const char *buffer = m_buffer + m_offset + 76; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getCurrencyAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getCurrencyAsString(); + std::string getCurrencyAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCurrencyAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getCurrencyAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 76; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCurrencyAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 76; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture54 &putCurrency(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error("string too large for putCurrency [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture54 &putCurrency(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 76, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 76 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 76, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 76 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture54 &putCurrency(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error("string too large for putCurrency [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture54 &putCurrency(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 76, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 76 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 76, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 76 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SettlCurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Currency"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SettlCurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Currency"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t settlCurrencyId() SBE_NOEXCEPT { - return 120; - } + static SBE_CONSTEXPR std::uint16_t settlCurrencyId() SBE_NOEXCEPT + { + return 120; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - settlCurrencySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t settlCurrencySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool settlCurrencyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool settlCurrencyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= settlCurrencySinceVersion(); + return m_actingVersion >= settlCurrencySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - settlCurrencyEncodingOffset() SBE_NOEXCEPT { - return 79; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t settlCurrencyEncodingOffset() SBE_NOEXCEPT + { + return 79; + } - static SBE_CONSTEXPR char settlCurrencyNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char settlCurrencyNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char settlCurrencyMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char settlCurrencyMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char settlCurrencyMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char settlCurrencyMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t settlCurrencyEncodingLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::size_t settlCurrencyEncodingLength() SBE_NOEXCEPT + { + return 3; + } - static SBE_CONSTEXPR std::uint64_t settlCurrencyLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::uint64_t settlCurrencyLength() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD const char *settlCurrency() const SBE_NOEXCEPT { - return m_buffer + m_offset + 79; - } + SBE_NODISCARD const char *settlCurrency() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 79; + } - SBE_NODISCARD char *settlCurrency() SBE_NOEXCEPT { - return m_buffer + m_offset + 79; - } + SBE_NODISCARD char *settlCurrency() SBE_NOEXCEPT + { + return m_buffer + m_offset + 79; + } - SBE_NODISCARD char settlCurrency(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error( - "index out of range for settlCurrency [E104]"); - } + SBE_NODISCARD char settlCurrency(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for settlCurrency [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 79 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 79 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture54 & - settlCurrency(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error( - "index out of range for settlCurrency [E105]"); - } + MDInstrumentDefinitionFuture54 &settlCurrency(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for settlCurrency [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 79 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 79 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSettlCurrency(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error( - "length too large for getSettlCurrency [E106]"); - } + std::uint64_t getSettlCurrency(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getSettlCurrency [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 79, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 79, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture54 & - putSettlCurrency(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 79, src, sizeof(char) * 3); - return *this; - } + MDInstrumentDefinitionFuture54 &putSettlCurrency(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 79, src, sizeof(char) * 3); + return *this; + } - MDInstrumentDefinitionFuture54 &putSettlCurrency( - const char value0, const char value1, const char value2) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 79, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 80, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 81, &val2, sizeof(char)); + MDInstrumentDefinitionFuture54 &putSettlCurrency( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 79, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 80, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 81, &val2, sizeof(char)); - return *this; - } + return *this; + } - std::string getSettlCurrencyAsString() const { - const char *buffer = m_buffer + m_offset + 79; - size_t length = 0; + SBE_NODISCARD std::string getSettlCurrencyAsString() const + { + const char *buffer = m_buffer + m_offset + 79; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSettlCurrencyAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSettlCurrencyAsString(); + std::string getSettlCurrencyAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSettlCurrencyAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSettlCurrencyAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 79; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSettlCurrencyAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 79; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture54 & - putSettlCurrency(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putSettlCurrency [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture54 &putSettlCurrency(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putSettlCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 79, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 79 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 79, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 79 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture54 &putSettlCurrency(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putSettlCurrency [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture54 &putSettlCurrency(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putSettlCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 79, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 79 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 79, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 79 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - MatchAlgorithmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchAlgorithmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchAlgorithmId() SBE_NOEXCEPT { - return 1142; - } + static SBE_CONSTEXPR std::uint16_t matchAlgorithmId() SBE_NOEXCEPT + { + return 1142; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchAlgorithmSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchAlgorithmSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchAlgorithmInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchAlgorithmInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchAlgorithmSinceVersion(); + return m_actingVersion >= matchAlgorithmSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchAlgorithmEncodingOffset() SBE_NOEXCEPT { - return 82; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchAlgorithmEncodingOffset() SBE_NOEXCEPT + { + return 82; + } - static SBE_CONSTEXPR char matchAlgorithmNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char matchAlgorithmNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char matchAlgorithmMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char matchAlgorithmMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char matchAlgorithmMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char matchAlgorithmMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - matchAlgorithmEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchAlgorithmEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD char matchAlgorithm() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 82, sizeof(char)); - return (val); - } + SBE_NODISCARD char matchAlgorithm() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 82, sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture54 & - matchAlgorithm(const char value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 82, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionFuture54 &matchAlgorithm(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 82, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char * - MinTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t minTradeVolId() SBE_NOEXCEPT { - return 562; - } + static SBE_CONSTEXPR std::uint16_t minTradeVolId() SBE_NOEXCEPT + { + return 562; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minTradeVolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minTradeVolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool minTradeVolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minTradeVolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minTradeVolSinceVersion(); + return m_actingVersion >= minTradeVolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minTradeVolEncodingOffset() SBE_NOEXCEPT { - return 83; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minTradeVolEncodingOffset() SBE_NOEXCEPT + { + return 83; + } - static SBE_CONSTEXPR std::uint32_t minTradeVolNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t minTradeVolMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t minTradeVolMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t minTradeVolEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t minTradeVolEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t minTradeVol() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 83, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t minTradeVol() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 83, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture54 & - minTradeVol(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 83, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &minTradeVol(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 83, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - MaxTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaxTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t maxTradeVolId() SBE_NOEXCEPT { - return 1140; - } + static SBE_CONSTEXPR std::uint16_t maxTradeVolId() SBE_NOEXCEPT + { + return 1140; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maxTradeVolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxTradeVolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool maxTradeVolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maxTradeVolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maxTradeVolSinceVersion(); + return m_actingVersion >= maxTradeVolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maxTradeVolEncodingOffset() SBE_NOEXCEPT { - return 87; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxTradeVolEncodingOffset() SBE_NOEXCEPT + { + return 87; + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t maxTradeVolEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t maxTradeVolEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t maxTradeVol() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 87, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t maxTradeVol() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 87, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture54 & - maxTradeVol(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 87, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &maxTradeVol(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 87, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char *MinPriceIncrementMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinPriceIncrementMetaAttribute(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 minPriceIncrementId() SBE_NOEXCEPT { - return 969; - } + static SBE_CONSTEXPR std::uint16_t minPriceIncrementId() SBE_NOEXCEPT + { + return 969; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minPriceIncrementSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minPriceIncrementSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool minPriceIncrementInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minPriceIncrementInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minPriceIncrementSinceVersion(); + return m_actingVersion >= minPriceIncrementSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minPriceIncrementEncodingOffset() SBE_NOEXCEPT { - return 91; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minPriceIncrementEncodingOffset() SBE_NOEXCEPT + { + return 91; + } - private: - PRICE9 m_minPriceIncrement; +private: + PRICE9 m_minPriceIncrement; - public: - SBE_NODISCARD PRICE9 &minPriceIncrement() { - m_minPriceIncrement.wrap( - m_buffer, m_offset + 91, m_actingVersion, m_bufferLength); - return m_minPriceIncrement; - } +public: + SBE_NODISCARD PRICE9 &minPriceIncrement() + { + m_minPriceIncrement.wrap(m_buffer, m_offset + 91, m_actingVersion, m_bufferLength); + return m_minPriceIncrement; + } - SBE_NODISCARD static const char * - DisplayFactorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "float"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *DisplayFactorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t displayFactorId() SBE_NOEXCEPT { - return 9787; - } + static SBE_CONSTEXPR std::uint16_t displayFactorId() SBE_NOEXCEPT + { + return 9787; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - displayFactorSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayFactorSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool displayFactorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool displayFactorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= displayFactorSinceVersion(); + return m_actingVersion >= displayFactorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - displayFactorEncodingOffset() SBE_NOEXCEPT { - return 99; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayFactorEncodingOffset() SBE_NOEXCEPT + { + return 99; + } - private: - Decimal9 m_displayFactor; +private: + Decimal9 m_displayFactor; - public: - SBE_NODISCARD Decimal9 &displayFactor() { - m_displayFactor.wrap( - m_buffer, m_offset + 99, m_actingVersion, m_bufferLength); - return m_displayFactor; - } +public: + SBE_NODISCARD Decimal9 &displayFactor() + { + m_displayFactor.wrap(m_buffer, m_offset + 99, m_actingVersion, m_bufferLength); + return m_displayFactor; + } - SBE_NODISCARD static const char * - MainFractionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MainFractionMetaAttribute(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 mainFractionId() SBE_NOEXCEPT { - return 37702; - } + static SBE_CONSTEXPR std::uint16_t mainFractionId() SBE_NOEXCEPT + { + return 37702; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mainFractionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mainFractionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool mainFractionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool mainFractionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mainFractionSinceVersion(); + return m_actingVersion >= mainFractionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mainFractionEncodingOffset() SBE_NOEXCEPT { - return 107; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mainFractionEncodingOffset() SBE_NOEXCEPT + { + return 107; + } - static SBE_CONSTEXPR std::uint8_t mainFractionNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t mainFractionNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t mainFractionMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t mainFractionMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t mainFractionMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t mainFractionMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t mainFractionEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t mainFractionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t mainFraction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 107, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t mainFraction() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 107, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionFuture54 & - mainFraction(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 107, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &mainFraction(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 107, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - SubFractionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SubFractionMetaAttribute(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 subFractionId() SBE_NOEXCEPT { - return 37703; - } + static SBE_CONSTEXPR std::uint16_t subFractionId() SBE_NOEXCEPT + { + return 37703; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - subFractionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t subFractionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool subFractionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool subFractionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= subFractionSinceVersion(); + return m_actingVersion >= subFractionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - subFractionEncodingOffset() SBE_NOEXCEPT { - return 108; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t subFractionEncodingOffset() SBE_NOEXCEPT + { + return 108; + } - static SBE_CONSTEXPR std::uint8_t subFractionNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t subFractionNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t subFractionMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t subFractionMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t subFractionMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t subFractionMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t subFractionEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t subFractionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t subFraction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 108, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t subFraction() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 108, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionFuture54 & - subFraction(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 108, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &subFraction(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 108, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *PriceDisplayFormatMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *PriceDisplayFormatMetaAttribute(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 priceDisplayFormatId() SBE_NOEXCEPT { - return 9800; - } + static SBE_CONSTEXPR std::uint16_t priceDisplayFormatId() SBE_NOEXCEPT + { + return 9800; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - priceDisplayFormatSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceDisplayFormatSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool priceDisplayFormatInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool priceDisplayFormatInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= priceDisplayFormatSinceVersion(); + return m_actingVersion >= priceDisplayFormatSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - priceDisplayFormatEncodingOffset() SBE_NOEXCEPT { - return 109; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceDisplayFormatEncodingOffset() SBE_NOEXCEPT + { + return 109; + } - static SBE_CONSTEXPR std::uint8_t - priceDisplayFormatNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - priceDisplayFormatEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t priceDisplayFormatEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t priceDisplayFormat() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 109, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t priceDisplayFormat() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 109, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionFuture54 & - priceDisplayFormat(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 109, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &priceDisplayFormat(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 109, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - UnitOfMeasureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UnitOfMeasureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t unitOfMeasureId() SBE_NOEXCEPT { - return 996; - } + static SBE_CONSTEXPR std::uint16_t unitOfMeasureId() SBE_NOEXCEPT + { + return 996; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - unitOfMeasureSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t unitOfMeasureSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool unitOfMeasureInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool unitOfMeasureInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= unitOfMeasureSinceVersion(); + return m_actingVersion >= unitOfMeasureSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - unitOfMeasureEncodingOffset() SBE_NOEXCEPT { - return 110; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingOffset() SBE_NOEXCEPT + { + return 110; + } - static SBE_CONSTEXPR char unitOfMeasureNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char unitOfMeasureNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char unitOfMeasureMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char unitOfMeasureMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char unitOfMeasureMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char unitOfMeasureMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingLength() SBE_NOEXCEPT { - return 30; - } + static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingLength() SBE_NOEXCEPT + { + return 30; + } - static SBE_CONSTEXPR std::uint64_t unitOfMeasureLength() SBE_NOEXCEPT { - return 30; - } + static SBE_CONSTEXPR std::uint64_t unitOfMeasureLength() SBE_NOEXCEPT + { + return 30; + } - SBE_NODISCARD const char *unitOfMeasure() const SBE_NOEXCEPT { - return m_buffer + m_offset + 110; - } + SBE_NODISCARD const char *unitOfMeasure() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 110; + } - SBE_NODISCARD char *unitOfMeasure() SBE_NOEXCEPT { - return m_buffer + m_offset + 110; - } + SBE_NODISCARD char *unitOfMeasure() SBE_NOEXCEPT + { + return m_buffer + m_offset + 110; + } - SBE_NODISCARD char unitOfMeasure(const std::uint64_t index) const { - if (index >= 30) { - throw std::runtime_error( - "index out of range for unitOfMeasure [E104]"); - } + SBE_NODISCARD char unitOfMeasure(const std::uint64_t index) const + { + if (index >= 30) + { + throw std::runtime_error("index out of range for unitOfMeasure [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 110 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 110 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture54 & - unitOfMeasure(const std::uint64_t index, const char value) { - if (index >= 30) { - throw std::runtime_error( - "index out of range for unitOfMeasure [E105]"); - } + MDInstrumentDefinitionFuture54 &unitOfMeasure(const std::uint64_t index, const char value) + { + if (index >= 30) + { + throw std::runtime_error("index out of range for unitOfMeasure [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 110 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 110 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getUnitOfMeasure(char *const dst, const std::uint64_t length) const { - if (length > 30) { - throw std::runtime_error( - "length too large for getUnitOfMeasure [E106]"); - } + std::uint64_t getUnitOfMeasure(char *const dst, const std::uint64_t length) const + { + if (length > 30) + { + throw std::runtime_error("length too large for getUnitOfMeasure [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 110, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 110, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionFuture54 & - putUnitOfMeasure(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 110, src, sizeof(char) * 30); - return *this; - } + MDInstrumentDefinitionFuture54 &putUnitOfMeasure(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 110, src, sizeof(char) * 30); + return *this; + } - std::string getUnitOfMeasureAsString() const { - const char *buffer = m_buffer + m_offset + 110; - size_t length = 0; + SBE_NODISCARD std::string getUnitOfMeasureAsString() const + { + const char *buffer = m_buffer + m_offset + 110; + size_t length = 0; - for (; length < 30 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getUnitOfMeasureAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getUnitOfMeasureAsString(); + std::string getUnitOfMeasureAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getUnitOfMeasureAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getUnitOfMeasureAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 110; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getUnitOfMeasureAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 110; + size_t length = 0; - for (; length < 30 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionFuture54 & - putUnitOfMeasure(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 30) { - throw std::runtime_error( - "string too large for putUnitOfMeasure [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionFuture54 &putUnitOfMeasure(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 30) + { + throw std::runtime_error("string too large for putUnitOfMeasure [E106]"); + } - std::memcpy(m_buffer + m_offset + 110, str.data(), srcLength); - for (size_t start = srcLength; start < 30; ++start) { - m_buffer[m_offset + 110 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 110, str.data(), srcLength); + for (size_t start = srcLength; start < 30; ++start) + { + m_buffer[m_offset + 110 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionFuture54 &putUnitOfMeasure(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 30) { - throw std::runtime_error( - "string too large for putUnitOfMeasure [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionFuture54 &putUnitOfMeasure(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 30) + { + throw std::runtime_error("string too large for putUnitOfMeasure [E106]"); + } - std::memcpy(m_buffer + m_offset + 110, str.c_str(), srcLength); - for (size_t start = srcLength; start < 30; ++start) { - m_buffer[m_offset + 110 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 110, str.c_str(), srcLength); + for (size_t start = srcLength; start < 30; ++start) + { + m_buffer[m_offset + 110 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char *UnitOfMeasureQtyMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UnitOfMeasureQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t unitOfMeasureQtyId() SBE_NOEXCEPT { - return 1147; - } + static SBE_CONSTEXPR std::uint16_t unitOfMeasureQtyId() SBE_NOEXCEPT + { + return 1147; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - unitOfMeasureQtySinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t unitOfMeasureQtySinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool unitOfMeasureQtyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool unitOfMeasureQtyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= unitOfMeasureQtySinceVersion(); + return m_actingVersion >= unitOfMeasureQtySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - unitOfMeasureQtyEncodingOffset() SBE_NOEXCEPT { - return 140; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t unitOfMeasureQtyEncodingOffset() SBE_NOEXCEPT + { + return 140; + } - private: - Decimal9NULL m_unitOfMeasureQty; +private: + Decimal9NULL m_unitOfMeasureQty; - public: - SBE_NODISCARD Decimal9NULL &unitOfMeasureQty() { - m_unitOfMeasureQty.wrap( - m_buffer, m_offset + 140, m_actingVersion, m_bufferLength); - return m_unitOfMeasureQty; - } +public: + SBE_NODISCARD Decimal9NULL &unitOfMeasureQty() + { + m_unitOfMeasureQty.wrap(m_buffer, m_offset + 140, m_actingVersion, m_bufferLength); + return m_unitOfMeasureQty; + } - SBE_NODISCARD static const char *TradingReferencePriceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TradingReferencePriceMetaAttribute(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 tradingReferencePriceId() SBE_NOEXCEPT { - return 1150; - } + static SBE_CONSTEXPR std::uint16_t tradingReferencePriceId() SBE_NOEXCEPT + { + return 1150; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradingReferencePriceSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingReferencePriceSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool tradingReferencePriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tradingReferencePriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tradingReferencePriceSinceVersion(); + return m_actingVersion >= tradingReferencePriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradingReferencePriceEncodingOffset() SBE_NOEXCEPT { - return 148; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingReferencePriceEncodingOffset() SBE_NOEXCEPT + { + return 148; + } - private: - PRICENULL9 m_tradingReferencePrice; +private: + PRICENULL9 m_tradingReferencePrice; - public: - SBE_NODISCARD PRICENULL9 &tradingReferencePrice() { - m_tradingReferencePrice.wrap( - m_buffer, m_offset + 148, m_actingVersion, m_bufferLength); - return m_tradingReferencePrice; - } +public: + SBE_NODISCARD PRICENULL9 &tradingReferencePrice() + { + m_tradingReferencePrice.wrap(m_buffer, m_offset + 148, m_actingVersion, m_bufferLength); + return m_tradingReferencePrice; + } - SBE_NODISCARD static const char * - SettlPriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SettlPriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT { - return 731; - } + static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT + { + return 731; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - settlPriceTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t settlPriceTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= settlPriceTypeSinceVersion(); + return m_actingVersion >= settlPriceTypeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingOffset() SBE_NOEXCEPT { - return 156; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingOffset() SBE_NOEXCEPT + { + return 156; + } - private: - SettlPriceType m_settlPriceType; +private: + SettlPriceType m_settlPriceType; - public: - SBE_NODISCARD SettlPriceType &settlPriceType() { - m_settlPriceType.wrap( - m_buffer, m_offset + 156, m_actingVersion, m_bufferLength); - return m_settlPriceType; - } +public: + SBE_NODISCARD SettlPriceType &settlPriceType() + { + m_settlPriceType.wrap(m_buffer, m_offset + 156, m_actingVersion, m_bufferLength); + return m_settlPriceType; + } - static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD static const char *OpenInterestQtyMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *OpenInterestQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t openInterestQtyId() SBE_NOEXCEPT { - return 5792; - } + static SBE_CONSTEXPR std::uint16_t openInterestQtyId() SBE_NOEXCEPT + { + return 5792; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - openInterestQtySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t openInterestQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool openInterestQtyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool openInterestQtyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= openInterestQtySinceVersion(); + return m_actingVersion >= openInterestQtySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - openInterestQtyEncodingOffset() SBE_NOEXCEPT { - return 157; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t openInterestQtyEncodingOffset() SBE_NOEXCEPT + { + return 157; + } - static SBE_CONSTEXPR std::int32_t openInterestQtyNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t openInterestQtyMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t openInterestQtyMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t - openInterestQtyEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t openInterestQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t openInterestQty() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 157, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t openInterestQty() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 157, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture54 & - openInterestQty(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 157, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &openInterestQty(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 157, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char * - ClearedVolumeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *ClearedVolumeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t clearedVolumeId() SBE_NOEXCEPT { - return 5791; - } + static SBE_CONSTEXPR std::uint16_t clearedVolumeId() SBE_NOEXCEPT + { + return 5791; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - clearedVolumeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearedVolumeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool clearedVolumeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool clearedVolumeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= clearedVolumeSinceVersion(); + return m_actingVersion >= clearedVolumeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - clearedVolumeEncodingOffset() SBE_NOEXCEPT { - return 161; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearedVolumeEncodingOffset() SBE_NOEXCEPT + { + return 161; + } - static SBE_CONSTEXPR std::int32_t clearedVolumeNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t clearedVolumeMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t clearedVolumeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t clearedVolumeEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t clearedVolumeEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t clearedVolume() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 161, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t clearedVolume() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 161, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture54 & - clearedVolume(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 161, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &clearedVolume(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 161, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char * - HighLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *HighLimitPriceMetaAttribute(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 highLimitPriceId() SBE_NOEXCEPT { - return 1149; - } + static SBE_CONSTEXPR std::uint16_t highLimitPriceId() SBE_NOEXCEPT + { + return 1149; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - highLimitPriceSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t highLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= highLimitPriceSinceVersion(); + return m_actingVersion >= highLimitPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - highLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 165; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t highLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 165; + } - private: - PRICENULL9 m_highLimitPrice; +private: + PRICENULL9 m_highLimitPrice; - public: - SBE_NODISCARD PRICENULL9 &highLimitPrice() { - m_highLimitPrice.wrap( - m_buffer, m_offset + 165, m_actingVersion, m_bufferLength); - return m_highLimitPrice; - } +public: + SBE_NODISCARD PRICENULL9 &highLimitPrice() + { + m_highLimitPrice.wrap(m_buffer, m_offset + 165, m_actingVersion, m_bufferLength); + return m_highLimitPrice; + } - SBE_NODISCARD static const char * - LowLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *LowLimitPriceMetaAttribute(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 lowLimitPriceId() SBE_NOEXCEPT { - return 1148; - } + static SBE_CONSTEXPR std::uint16_t lowLimitPriceId() SBE_NOEXCEPT + { + return 1148; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lowLimitPriceSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lowLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lowLimitPriceSinceVersion(); + return m_actingVersion >= lowLimitPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lowLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 173; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lowLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 173; + } - private: - PRICENULL9 m_lowLimitPrice; +private: + PRICENULL9 m_lowLimitPrice; - public: - SBE_NODISCARD PRICENULL9 &lowLimitPrice() { - m_lowLimitPrice.wrap( - m_buffer, m_offset + 173, m_actingVersion, m_bufferLength); - return m_lowLimitPrice; - } +public: + SBE_NODISCARD PRICENULL9 &lowLimitPrice() + { + m_lowLimitPrice.wrap(m_buffer, m_offset + 173, m_actingVersion, m_bufferLength); + return m_lowLimitPrice; + } - SBE_NODISCARD static const char *MaxPriceVariationMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaxPriceVariationMetaAttribute(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 maxPriceVariationId() SBE_NOEXCEPT { - return 1143; - } + static SBE_CONSTEXPR std::uint16_t maxPriceVariationId() SBE_NOEXCEPT + { + return 1143; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maxPriceVariationSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxPriceVariationSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool maxPriceVariationInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maxPriceVariationInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maxPriceVariationSinceVersion(); + return m_actingVersion >= maxPriceVariationSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maxPriceVariationEncodingOffset() SBE_NOEXCEPT { - return 181; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxPriceVariationEncodingOffset() SBE_NOEXCEPT + { + return 181; + } - private: - PRICENULL9 m_maxPriceVariation; +private: + PRICENULL9 m_maxPriceVariation; - public: - SBE_NODISCARD PRICENULL9 &maxPriceVariation() { - m_maxPriceVariation.wrap( - m_buffer, m_offset + 181, m_actingVersion, m_bufferLength); - return m_maxPriceVariation; - } +public: + SBE_NODISCARD PRICENULL9 &maxPriceVariation() + { + m_maxPriceVariation.wrap(m_buffer, m_offset + 181, m_actingVersion, m_bufferLength); + return m_maxPriceVariation; + } - SBE_NODISCARD static const char * - DecayQuantityMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *DecayQuantityMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t decayQuantityId() SBE_NOEXCEPT { - return 5818; - } + static SBE_CONSTEXPR std::uint16_t decayQuantityId() SBE_NOEXCEPT + { + return 5818; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - decayQuantitySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t decayQuantitySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool decayQuantityInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool decayQuantityInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= decayQuantitySinceVersion(); + return m_actingVersion >= decayQuantitySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - decayQuantityEncodingOffset() SBE_NOEXCEPT { - return 189; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t decayQuantityEncodingOffset() SBE_NOEXCEPT + { + return 189; + } - static SBE_CONSTEXPR std::int32_t decayQuantityNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t decayQuantityNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t decayQuantityMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t decayQuantityMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t decayQuantityMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t decayQuantityMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t decayQuantityEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t decayQuantityEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t decayQuantity() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 189, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t decayQuantity() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 189, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture54 & - decayQuantity(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 189, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &decayQuantity(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 189, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char * - DecayStartDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "LocalMktDate"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *DecayStartDateMetaAttribute(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 decayStartDateId() SBE_NOEXCEPT { - return 5819; - } + static SBE_CONSTEXPR std::uint16_t decayStartDateId() SBE_NOEXCEPT + { + return 5819; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - decayStartDateSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t decayStartDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool decayStartDateInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool decayStartDateInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= decayStartDateSinceVersion(); + return m_actingVersion >= decayStartDateSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - decayStartDateEncodingOffset() SBE_NOEXCEPT { - return 193; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t decayStartDateEncodingOffset() SBE_NOEXCEPT + { + return 193; + } - static SBE_CONSTEXPR std::uint16_t decayStartDateNullValue() SBE_NOEXCEPT { - return (std::uint16_t)65535; - } + static SBE_CONSTEXPR std::uint16_t decayStartDateNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } - static SBE_CONSTEXPR std::uint16_t decayStartDateMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t decayStartDateMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t decayStartDateMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t decayStartDateMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t - decayStartDateEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t decayStartDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t decayStartDate() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::uint16_t decayStartDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MDInstrumentDefinitionFuture54 & - decayStartDate(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint16_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &decayStartDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint16_t)); + return *this; + } - SBE_NODISCARD static const char *OriginalContractSizeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *OriginalContractSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t originalContractSizeId() SBE_NOEXCEPT { - return 5849; - } + static SBE_CONSTEXPR std::uint16_t originalContractSizeId() SBE_NOEXCEPT + { + return 5849; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - originalContractSizeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t originalContractSizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool originalContractSizeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool originalContractSizeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= originalContractSizeSinceVersion(); + return m_actingVersion >= originalContractSizeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - originalContractSizeEncodingOffset() SBE_NOEXCEPT { - return 195; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t originalContractSizeEncodingOffset() SBE_NOEXCEPT + { + return 195; + } - static SBE_CONSTEXPR std::int32_t - originalContractSizeNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t originalContractSizeNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t - originalContractSizeMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t originalContractSizeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t - originalContractSizeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t originalContractSizeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t - originalContractSizeEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t originalContractSizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t originalContractSize() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 195, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t originalContractSize() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 195, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture54 & - originalContractSize(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 195, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &originalContractSize(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 195, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char *ContractMultiplierMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *ContractMultiplierMetaAttribute(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 contractMultiplierId() SBE_NOEXCEPT { - return 231; - } + static SBE_CONSTEXPR std::uint16_t contractMultiplierId() SBE_NOEXCEPT + { + return 231; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - contractMultiplierSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t contractMultiplierSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool contractMultiplierInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool contractMultiplierInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= contractMultiplierSinceVersion(); + return m_actingVersion >= contractMultiplierSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - contractMultiplierEncodingOffset() SBE_NOEXCEPT { - return 199; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t contractMultiplierEncodingOffset() SBE_NOEXCEPT + { + return 199; + } - static SBE_CONSTEXPR std::int32_t - contractMultiplierNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t contractMultiplierNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t contractMultiplierMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t contractMultiplierMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t contractMultiplierMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t contractMultiplierMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t - contractMultiplierEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t contractMultiplierEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t contractMultiplier() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 199, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t contractMultiplier() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 199, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionFuture54 & - contractMultiplier(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 199, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &contractMultiplier(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 199, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char *ContractMultiplierUnitMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *ContractMultiplierUnitMetaAttribute(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 contractMultiplierUnitId() SBE_NOEXCEPT { - return 1435; - } + static SBE_CONSTEXPR std::uint16_t contractMultiplierUnitId() SBE_NOEXCEPT + { + return 1435; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - contractMultiplierUnitSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t contractMultiplierUnitSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool contractMultiplierUnitInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool contractMultiplierUnitInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= contractMultiplierUnitSinceVersion(); + return m_actingVersion >= contractMultiplierUnitSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - contractMultiplierUnitEncodingOffset() SBE_NOEXCEPT { - return 203; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t contractMultiplierUnitEncodingOffset() SBE_NOEXCEPT + { + return 203; + } - static SBE_CONSTEXPR std::int8_t - contractMultiplierUnitNullValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t contractMultiplierUnitNullValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::int8_t - contractMultiplierUnitMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + static SBE_CONSTEXPR std::int8_t contractMultiplierUnitMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - static SBE_CONSTEXPR std::int8_t - contractMultiplierUnitMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t contractMultiplierUnitMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::size_t - contractMultiplierUnitEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t contractMultiplierUnitEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::int8_t contractMultiplierUnit() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 203, sizeof(std::int8_t)); - return (val); - } + SBE_NODISCARD std::int8_t contractMultiplierUnit() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 203, sizeof(std::int8_t)); + return (val); + } - MDInstrumentDefinitionFuture54 & - contractMultiplierUnit(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 203, &val, sizeof(std::int8_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &contractMultiplierUnit(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 203, &val, sizeof(std::int8_t)); + return *this; + } - SBE_NODISCARD static const char *FlowScheduleTypeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *FlowScheduleTypeMetaAttribute(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 flowScheduleTypeId() SBE_NOEXCEPT { - return 1439; - } + static SBE_CONSTEXPR std::uint16_t flowScheduleTypeId() SBE_NOEXCEPT + { + return 1439; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - flowScheduleTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t flowScheduleTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool flowScheduleTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool flowScheduleTypeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= flowScheduleTypeSinceVersion(); + return m_actingVersion >= flowScheduleTypeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - flowScheduleTypeEncodingOffset() SBE_NOEXCEPT { - return 204; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t flowScheduleTypeEncodingOffset() SBE_NOEXCEPT + { + return 204; + } - static SBE_CONSTEXPR std::int8_t flowScheduleTypeNullValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t flowScheduleTypeNullValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::int8_t flowScheduleTypeMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + static SBE_CONSTEXPR std::int8_t flowScheduleTypeMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - static SBE_CONSTEXPR std::int8_t flowScheduleTypeMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t flowScheduleTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::size_t - flowScheduleTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t flowScheduleTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::int8_t flowScheduleType() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 204, sizeof(std::int8_t)); - return (val); - } + SBE_NODISCARD std::int8_t flowScheduleType() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 204, sizeof(std::int8_t)); + return (val); + } - MDInstrumentDefinitionFuture54 & - flowScheduleType(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 204, &val, sizeof(std::int8_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &flowScheduleType(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 204, &val, sizeof(std::int8_t)); + return *this; + } - SBE_NODISCARD static const char *MinPriceIncrementAmountMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinPriceIncrementAmountMetaAttribute(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 minPriceIncrementAmountId() SBE_NOEXCEPT { - return 1146; - } + static SBE_CONSTEXPR std::uint16_t minPriceIncrementAmountId() SBE_NOEXCEPT + { + return 1146; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minPriceIncrementAmountSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minPriceIncrementAmountSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool minPriceIncrementAmountInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minPriceIncrementAmountInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minPriceIncrementAmountSinceVersion(); + return m_actingVersion >= minPriceIncrementAmountSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minPriceIncrementAmountEncodingOffset() SBE_NOEXCEPT { - return 205; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minPriceIncrementAmountEncodingOffset() SBE_NOEXCEPT + { + return 205; + } - private: - PRICENULL9 m_minPriceIncrementAmount; +private: + PRICENULL9 m_minPriceIncrementAmount; - public: - SBE_NODISCARD PRICENULL9 &minPriceIncrementAmount() { - m_minPriceIncrementAmount.wrap( - m_buffer, m_offset + 205, m_actingVersion, m_bufferLength); - return m_minPriceIncrementAmount; - } +public: + SBE_NODISCARD PRICENULL9 &minPriceIncrementAmount() + { + m_minPriceIncrementAmount.wrap(m_buffer, m_offset + 205, m_actingVersion, m_bufferLength); + return m_minPriceIncrementAmount; + } - SBE_NODISCARD static const char *UserDefinedInstrumentMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UserDefinedInstrumentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t userDefinedInstrumentId() SBE_NOEXCEPT { - return 9779; - } + static SBE_CONSTEXPR std::uint16_t userDefinedInstrumentId() SBE_NOEXCEPT + { + return 9779; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - userDefinedInstrumentSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t userDefinedInstrumentSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool userDefinedInstrumentInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool userDefinedInstrumentInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= userDefinedInstrumentSinceVersion(); + return m_actingVersion >= userDefinedInstrumentSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - userDefinedInstrumentEncodingOffset() SBE_NOEXCEPT { - return 213; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t userDefinedInstrumentEncodingOffset() SBE_NOEXCEPT + { + return 213; + } - static SBE_CONSTEXPR char userDefinedInstrumentNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char userDefinedInstrumentNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char userDefinedInstrumentMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char userDefinedInstrumentMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char userDefinedInstrumentMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char userDefinedInstrumentMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - userDefinedInstrumentEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t userDefinedInstrumentEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD char userDefinedInstrument() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 213, sizeof(char)); - return (val); - } + SBE_NODISCARD char userDefinedInstrument() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 213, sizeof(char)); + return (val); + } - MDInstrumentDefinitionFuture54 & - userDefinedInstrument(const char value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 213, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionFuture54 &userDefinedInstrument(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 213, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "LocalMktDate"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute(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 tradingReferenceDateId() SBE_NOEXCEPT { - return 5796; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateId() SBE_NOEXCEPT + { + return 5796; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradingReferenceDateSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingReferenceDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tradingReferenceDateSinceVersion(); + return m_actingVersion >= tradingReferenceDateSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingOffset() SBE_NOEXCEPT { - return 214; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingOffset() SBE_NOEXCEPT + { + return 214; + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateNullValue() SBE_NOEXCEPT { - return (std::uint16_t)65535; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 214, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 214, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MDInstrumentDefinitionFuture54 & - tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 214, &val, sizeof(std::uint16_t)); - return *this; - } + MDInstrumentDefinitionFuture54 &tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 214, &val, sizeof(std::uint16_t)); + return *this; + } - class NoEvents { + class NoEvents + { 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; + 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; - } + 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 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) { + 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(9)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 9; + 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 9; + } + + 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 NoEvents &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *EventTypeMetaAttribute(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 eventTypeId() SBE_NOEXCEPT + { + return 865; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t eventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool eventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= eventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD EventType::Value eventType() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); + return EventType::get((val)); + } + + NoEvents &eventType(const EventType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *EventTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t eventTimeId() SBE_NOEXCEPT + { + return 1145; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t eventTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool eventTimeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= eventTimeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTimeEncodingOffset() SBE_NOEXCEPT + { + return 1; + } + + static SBE_CONSTEXPR std::uint64_t eventTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t eventTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t eventTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t eventTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t eventTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoEvents &eventTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint64_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoEvents writer) + { + builder << '{'; + builder << R"("EventType": )"; + builder << '"' << writer.eventType() << '"'; + + builder << ", "; + builder << R"("EventTime": )"; + builder << +writer.eventTime(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)9); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 9; - 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; - } +private: + NoEvents m_noEvents; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 9; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoEventsId() SBE_NOEXCEPT + { + return 864; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoEvents &noEvents() + { + m_noEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noEvents; + } - 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; - } + NoEvents &noEventsCount(const std::uint8_t count) + { + m_noEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noEvents; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoEvents &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - EventTypeMetaAttribute(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 eventTypeId() SBE_NOEXCEPT { - return 865; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - eventTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool eventTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noEventsInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= eventTypeSinceVersion(); + return m_actingVersion >= noEventsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD EventType::Value eventType() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); - return EventType::get((val)); - } - - NoEvents &eventType(const EventType::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - EventTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t eventTimeId() SBE_NOEXCEPT { - return 1145; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - eventTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool eventTimeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= eventTimeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTimeEncodingOffset() SBE_NOEXCEPT { - return 1; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t eventTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t eventTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoEvents &eventTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint64_t)); - return *this; - } - - template - friend std::basic_ostream & - operator<<(std::basic_ostream &builder, NoEvents writer) { - builder << '{'; - builder << R"("EventType": )"; - builder << '"' << writer.eventType() << '"'; - - builder << ", "; - builder << R"("EventTime": )"; - builder << +writer.eventTime(); - - builder << '}'; - - return builder; - } - }; - - private: - NoEvents m_noEvents; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoEventsId() SBE_NOEXCEPT { - return 864; - } - - SBE_NODISCARD inline NoEvents &noEvents() { - m_noEvents.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noEvents; - } - - NoEvents &noEventsCount(const std::uint8_t count) { - m_noEvents.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noEvents; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noEventsSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noEventsInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noEventsSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoMDFeedTypes { + class NoMDFeedTypes + { 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; + 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; - } + 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 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((std::uint16_t)4); - dimensions.numInGroup((std::uint8_t)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 { return *m_positionPtr; } - - std::uint64_t sbeCheckPosition(const std::uint64_t position) { - if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) { - throw std::runtime_error("buffer too short [E100]"); - } - return position; - } - - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } - - SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT { - return m_count; - } - - SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT { - return m_index < m_count; - } - - inline NoMDFeedTypes &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - MDFeedTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDFeedTypeId() SBE_NOEXCEPT { - return 1022; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDFeedTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDFeedTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDFeedTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDFeedTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR char mDFeedTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char mDFeedTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char mDFeedTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingLength() SBE_NOEXCEPT { - return 3; - } - - static SBE_CONSTEXPR std::uint64_t mDFeedTypeLength() SBE_NOEXCEPT { - return 3; - } - - SBE_NODISCARD const char *mDFeedType() const SBE_NOEXCEPT { - return m_buffer + m_offset + 0; - } - - SBE_NODISCARD char *mDFeedType() SBE_NOEXCEPT { - return m_buffer + m_offset + 0; - } - - SBE_NODISCARD char mDFeedType(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error( - "index out of range for mDFeedType [E104]"); - } - - char val; - std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); - return (val); - } - - NoMDFeedTypes &mDFeedType(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error( - "index out of range for mDFeedType [E105]"); - } - - char val = (value); - std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); - return *this; - } - - std::uint64_t - getMDFeedType(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error( - "length too large for getMDFeedType [E106]"); - } - - std::memcpy( - dst, m_buffer + m_offset + 0, - sizeof(char) * static_cast(length)); - return length; - } - - NoMDFeedTypes &putMDFeedType(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 3); - return *this; - } - - NoMDFeedTypes & - putMDFeedType(const char value0, const char value1, const char value2) - SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 0, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 1, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 2, &val2, sizeof(char)); - - return *this; - } - - std::string getMDFeedTypeAsString() const { - const char *buffer = m_buffer + m_offset + 0; - size_t length = 0; - - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); - - return result; - } - - std::string getMDFeedTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getMDFeedTypeAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } + 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; + } - return oss.str(); - } + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } -#if __cplusplus >= 201703L - std::string_view getMDFeedTypeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 0; - size_t length = 0; + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 4; + } - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - return result; - } -#endif + // 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; + } -#if __cplusplus >= 201703L - NoMDFeedTypes &putMDFeedType(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putMDFeedType [E106]"); - } + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 0 + start] = 0; - } + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - return *this; - } -#else - NoMDFeedTypes &putMDFeedType(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putMDFeedType [E106]"); - } + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } - std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 0 + start] = 0; - } + inline NoMDFeedTypes &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; - } -#endif + return *this; + } - SBE_NODISCARD static const char * - MarketDepthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } - static SBE_CONSTEXPR std::uint16_t marketDepthId() SBE_NOEXCEPT { - return 264; - } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - marketDepthSinceVersion() SBE_NOEXCEPT { - return 0; - } + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - SBE_NODISCARD bool marketDepthInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= marketDepthSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } + #endif - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - marketDepthEncodingOffset() SBE_NOEXCEPT { - return 3; - } + SBE_NODISCARD static const char *MDFeedTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::int8_t marketDepthNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } + static SBE_CONSTEXPR std::uint16_t mDFeedTypeId() SBE_NOEXCEPT + { + return 1022; + } - static SBE_CONSTEXPR std::int8_t marketDepthMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDFeedTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::int8_t marketDepthMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + SBE_NODISCARD bool mDFeedTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDFeedTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } - static SBE_CONSTEXPR std::size_t - marketDepthEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD std::int8_t marketDepth() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 3, sizeof(std::int8_t)); - return (val); - } + static SBE_CONSTEXPR char mDFeedTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - NoMDFeedTypes &marketDepth(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 3, &val, sizeof(std::int8_t)); - return *this; - } + static SBE_CONSTEXPR char mDFeedTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDFeedTypes writer) { - builder << '{'; - builder << R"("MDFeedType": )"; - builder << '"' << writer.getMDFeedTypeAsJsonEscapedString().c_str() - << '"'; + static SBE_CONSTEXPR char mDFeedTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - builder << ", "; - builder << R"("MarketDepth": )"; - builder << +writer.marketDepth(); + static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingLength() SBE_NOEXCEPT + { + return 3; + } - builder << '}'; + static SBE_CONSTEXPR std::uint64_t mDFeedTypeLength() SBE_NOEXCEPT + { + return 3; + } - return builder; - } - }; + SBE_NODISCARD const char *mDFeedType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } - private: - NoMDFeedTypes m_noMDFeedTypes; + SBE_NODISCARD char *mDFeedType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDFeedTypesId() SBE_NOEXCEPT { - return 1141; - } + SBE_NODISCARD char mDFeedType(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for mDFeedType [E104]"); + } - SBE_NODISCARD inline NoMDFeedTypes &noMDFeedTypes() { - m_noMDFeedTypes.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDFeedTypes; - } + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } - NoMDFeedTypes &noMDFeedTypesCount(const std::uint8_t count) { - m_noMDFeedTypes.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDFeedTypes; - } + NoMDFeedTypes &mDFeedType(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for mDFeedType [E105]"); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDFeedTypesSinceVersion() SBE_NOEXCEPT { - return 0; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } - SBE_NODISCARD bool noMDFeedTypesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDFeedTypesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } + std::uint64_t getMDFeedType(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getMDFeedType [E106]"); + } - class NoInstAttrib { - 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; + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } - SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { - return m_positionPtr; - } + NoMDFeedTypes &putMDFeedType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 3); + return *this; + } - 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; - } + NoMDFeedTypes &putMDFeedType( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 0, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 1, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 2, &val2, sizeof(char)); - inline void wrapForEncode( - char *buffer, - const std::uint8_t count, - std::uint64_t *pos, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { + return *this; + } + + SBE_NODISCARD std::string getMDFeedTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getMDFeedTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMDFeedTypeAsString(); + + 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 getMDFeedTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoMDFeedTypes &putMDFeedType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putMDFeedType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoMDFeedTypes &putMDFeedType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putMDFeedType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *MarketDepthMetaAttribute(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 marketDepthId() SBE_NOEXCEPT + { + return 264; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketDepthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool marketDepthInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= marketDepthSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketDepthEncodingOffset() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::int8_t marketDepthNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t marketDepthMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t marketDepthMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t marketDepthEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t marketDepth() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 3, sizeof(std::int8_t)); + return (val); + } + + NoMDFeedTypes &marketDepth(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 3, &val, sizeof(std::int8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDFeedTypes writer) + { + builder << '{'; + builder << R"("MDFeedType": )"; + builder << '"' << + writer.getMDFeedTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("MarketDepth": )"; + builder << +writer.marketDepth(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)4); - dimensions.numInGroup((std::uint8_t)count); - m_index = 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; - } +private: + NoMDFeedTypes m_noMDFeedTypes; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 4; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDFeedTypesId() SBE_NOEXCEPT + { + return 1141; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDFeedTypes &noMDFeedTypes() + { + m_noMDFeedTypes.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDFeedTypes; + } - 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; - } + NoMDFeedTypes &noMDFeedTypesCount(const std::uint8_t count) + { + m_noMDFeedTypes.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDFeedTypes; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDFeedTypesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoInstAttrib &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char *InstAttribTypeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t instAttribTypeId() SBE_NOEXCEPT { - return 871; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - instAttribTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool instAttribTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDFeedTypesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= instAttribTypeSinceVersion(); + return m_actingVersion >= noMDFeedTypesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - instAttribTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t - instAttribTypeEncodingLength() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::int8_t - instAttribType() SBE_NOEXCEPT { - return (std::int8_t)24; - } - - SBE_NODISCARD static const char *InstAttribValueMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t instAttribValueId() SBE_NOEXCEPT { - return 872; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - instAttribValueSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool instAttribValueInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= instAttribValueSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - instAttribValueEncodingOffset() SBE_NOEXCEPT { - return 0; - } + } + class NoInstAttrib + { private: - InstAttribValue m_instAttribValue; + 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: - SBE_NODISCARD InstAttribValue &instAttribValue() { - m_instAttribValue.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_instAttribValue; - } + 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; + } - static SBE_CONSTEXPR std::size_t - instAttribValueEncodingLength() SBE_NOEXCEPT { - return 4; - } + 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; + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoInstAttrib writer) { - builder << '{'; - builder << R"("InstAttribValue": )"; - builder << writer.instAttribValue(); + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } - builder << '}'; + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 4; + } - return builder; - } - }; + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - private: - NoInstAttrib m_noInstAttrib; + // 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; + } - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoInstAttribId() SBE_NOEXCEPT { - return 870; - } + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - SBE_NODISCARD inline NoInstAttrib &noInstAttrib() { - m_noInstAttrib.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noInstAttrib; - } + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - NoInstAttrib &noInstAttribCount(const std::uint8_t count) { - m_noInstAttrib.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noInstAttrib; - } + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noInstAttribSinceVersion() SBE_NOEXCEPT { - return 0; - } + inline NoInstAttrib &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; - SBE_NODISCARD bool noInstAttribInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noInstAttribSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *InstAttribTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t instAttribTypeId() SBE_NOEXCEPT + { + return 871; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t instAttribTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool instAttribTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= instAttribTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t instAttribTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t instAttribTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t instAttribType() SBE_NOEXCEPT + { + return static_cast(24); + } + + SBE_NODISCARD static const char *InstAttribValueMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t instAttribValueId() SBE_NOEXCEPT + { + return 872; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t instAttribValueSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool instAttribValueInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= instAttribValueSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t instAttribValueEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - class NoLotTypeRules { 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; - } + InstAttribValue m_instAttribValue; 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; - } + SBE_NODISCARD InstAttribValue &instAttribValue() + { + m_instAttribValue.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_instAttribValue; + } - inline void wrapForEncode( - char *buffer, - const std::uint8_t count, - std::uint64_t *pos, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { + static SBE_CONSTEXPR std::size_t instAttribValueEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoInstAttrib writer) + { + builder << '{'; + builder << R"("InstAttribValue": )"; + builder << writer.instAttribValue(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)5); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 5; - 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; - } +private: + NoInstAttrib m_noInstAttrib; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 5; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoInstAttribId() SBE_NOEXCEPT + { + return 870; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoInstAttrib &noInstAttrib() + { + m_noInstAttrib.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noInstAttrib; + } - 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; - } + NoInstAttrib &noInstAttribCount(const std::uint8_t count) + { + m_noInstAttrib.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noInstAttrib; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noInstAttribSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoLotTypeRules &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - LotTypeMetaAttribute(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 lotTypeId() SBE_NOEXCEPT { - return 1093; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lotTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool lotTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noInstAttribInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lotTypeSinceVersion(); + return m_actingVersion >= noInstAttribSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lotTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int8_t lotTypeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t lotTypeMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t lotTypeMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t lotTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::int8_t lotType() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int8_t)); - return (val); - } - - NoLotTypeRules &lotType(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int8_t)); - return *this; - } - - SBE_NODISCARD static const char * - MinLotSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t minLotSizeId() SBE_NOEXCEPT { - return 1231; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minLotSizeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool minLotSizeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= minLotSizeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minLotSizeEncodingOffset() SBE_NOEXCEPT { - return 1; - } + } + class NoLotTypeRules + { private: - DecimalQty m_minLotSize; + 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: - SBE_NODISCARD DecimalQty &minLotSize() { - m_minLotSize.wrap( - m_buffer, m_offset + 1, m_actingVersion, m_bufferLength); - return m_minLotSize; - } + 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; + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoLotTypeRules writer) { - builder << '{'; - builder << R"("LotType": )"; - builder << +writer.lotType(); + 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(5)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 5; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } - builder << ", "; - builder << R"("MinLotSize": )"; - builder << writer.minLotSize(); + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } - builder << '}'; + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 5; + } - return builder; - } - }; + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - private: - NoLotTypeRules m_noLotTypeRules; + // 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; + } - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoLotTypeRulesId() SBE_NOEXCEPT { - return 1234; - } + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - SBE_NODISCARD inline NoLotTypeRules &noLotTypeRules() { - m_noLotTypeRules.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noLotTypeRules; - } + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - NoLotTypeRules &noLotTypeRulesCount(const std::uint8_t count) { - m_noLotTypeRules.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noLotTypeRules; - } + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noLotTypeRulesSinceVersion() SBE_NOEXCEPT { - return 0; - } + inline NoLotTypeRules &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; - SBE_NODISCARD bool noLotTypeRulesInActingVersion() const SBE_NOEXCEPT { + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *LotTypeMetaAttribute(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 lotTypeId() SBE_NOEXCEPT + { + return 1093; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lotTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lotTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= lotTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lotTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int8_t lotTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t lotTypeMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t lotTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t lotTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t lotType() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int8_t)); + return (val); + } + + NoLotTypeRules &lotType(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int8_t)); + return *this; + } + + SBE_NODISCARD static const char *MinLotSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t minLotSizeId() SBE_NOEXCEPT + { + return 1231; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minLotSizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minLotSizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= minLotSizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minLotSizeEncodingOffset() SBE_NOEXCEPT + { + return 1; + } + +private: + DecimalQty m_minLotSize; + +public: + SBE_NODISCARD DecimalQty &minLotSize() + { + m_minLotSize.wrap(m_buffer, m_offset + 1, m_actingVersion, m_bufferLength); + return m_minLotSize; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoLotTypeRules writer) + { + builder << '{'; + builder << R"("LotType": )"; + builder << +writer.lotType(); + + builder << ", "; + builder << R"("MinLotSize": )"; + builder << writer.minLotSize(); + + 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: + NoLotTypeRules m_noLotTypeRules; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLotTypeRulesId() SBE_NOEXCEPT + { + return 1234; + } + + SBE_NODISCARD inline NoLotTypeRules &noLotTypeRules() + { + m_noLotTypeRules.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLotTypeRules; + } + + NoLotTypeRules &noLotTypeRulesCount(const std::uint8_t count) + { + m_noLotTypeRules.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLotTypeRules; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noLotTypeRulesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noLotTypeRulesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= noLotTypeRulesSinceVersion(); + return m_actingVersion >= noLotTypeRulesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDInstrumentDefinitionFuture54 _writer) { - MDInstrumentDefinitionFuture54 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDInstrumentDefinitionFuture54", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDInstrumentDefinitionFuture54 _writer) +{ + MDInstrumentDefinitionFuture54 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDInstrumentDefinitionFuture54", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); - builder << ", "; - builder << R"("TotNumReports": )"; - builder << +writer.totNumReports(); + builder << ", "; + builder << R"("TotNumReports": )"; + builder << +writer.totNumReports(); - builder << ", "; - builder << R"("SecurityUpdateAction": )"; - builder << '"' << writer.securityUpdateAction() << '"'; + builder << ", "; + builder << R"("SecurityUpdateAction": )"; + builder << '"' << writer.securityUpdateAction() << '"'; - builder << ", "; - builder << R"("LastUpdateTime": )"; - builder << +writer.lastUpdateTime(); + builder << ", "; + builder << R"("LastUpdateTime": )"; + builder << +writer.lastUpdateTime(); - builder << ", "; - builder << R"("MDSecurityTradingStatus": )"; - builder << '"' << writer.mDSecurityTradingStatus() << '"'; + builder << ", "; + builder << R"("MDSecurityTradingStatus": )"; + builder << '"' << writer.mDSecurityTradingStatus() << '"'; - builder << ", "; - builder << R"("ApplID": )"; - builder << +writer.applID(); + builder << ", "; + builder << R"("ApplID": )"; + builder << +writer.applID(); - builder << ", "; - builder << R"("MarketSegmentID": )"; - builder << +writer.marketSegmentID(); + builder << ", "; + builder << R"("MarketSegmentID": )"; + builder << +writer.marketSegmentID(); - builder << ", "; - builder << R"("UnderlyingProduct": )"; - builder << +writer.underlyingProduct(); + builder << ", "; + builder << R"("UnderlyingProduct": )"; + builder << +writer.underlyingProduct(); - builder << ", "; - builder << R"("SecurityExchange": )"; - builder << '"' << writer.getSecurityExchangeAsJsonEscapedString().c_str() - << '"'; + builder << ", "; + builder << R"("SecurityExchange": )"; + builder << '"' << + writer.getSecurityExchangeAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("SecurityGroup": )"; - builder << '"' << writer.getSecurityGroupAsJsonEscapedString().c_str() - << '"'; + builder << ", "; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("Asset": )"; - builder << '"' << writer.getAssetAsJsonEscapedString().c_str() << '"'; + builder << ", "; + builder << R"("Asset": )"; + builder << '"' << + writer.getAssetAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("Symbol": )"; - builder << '"' << writer.getSymbolAsJsonEscapedString().c_str() << '"'; + builder << ", "; + builder << R"("Symbol": )"; + builder << '"' << + writer.getSymbolAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); - builder << ", "; - builder << R"("SecurityType": )"; - builder << '"' << writer.getSecurityTypeAsJsonEscapedString().c_str() - << '"'; + builder << ", "; + builder << R"("SecurityType": )"; + builder << '"' << + writer.getSecurityTypeAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("CFICode": )"; - builder << '"' << writer.getCFICodeAsJsonEscapedString().c_str() << '"'; + builder << ", "; + builder << R"("CFICode": )"; + builder << '"' << + writer.getCFICodeAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("MaturityMonthYear": )"; - builder << writer.maturityMonthYear(); + builder << ", "; + builder << R"("MaturityMonthYear": )"; + builder << writer.maturityMonthYear(); - builder << ", "; - builder << R"("Currency": )"; - builder << '"' << writer.getCurrencyAsJsonEscapedString().c_str() << '"'; + builder << ", "; + builder << R"("Currency": )"; + builder << '"' << + writer.getCurrencyAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("SettlCurrency": )"; - builder << '"' << writer.getSettlCurrencyAsJsonEscapedString().c_str() - << '"'; + builder << ", "; + builder << R"("SettlCurrency": )"; + builder << '"' << + writer.getSettlCurrencyAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("MatchAlgorithm": )"; - if (std::isprint(writer.matchAlgorithm())) { - builder << '"' << (char)writer.matchAlgorithm() << '"'; - } else { - builder << (int)writer.matchAlgorithm(); - } + builder << ", "; + builder << R"("MatchAlgorithm": )"; + if (std::isprint(writer.matchAlgorithm())) + { + builder << '"' << (char)writer.matchAlgorithm() << '"'; + } + else + { + builder << (int)writer.matchAlgorithm(); + } - builder << ", "; - builder << R"("MinTradeVol": )"; - builder << +writer.minTradeVol(); + builder << ", "; + builder << R"("MinTradeVol": )"; + builder << +writer.minTradeVol(); - builder << ", "; - builder << R"("MaxTradeVol": )"; - builder << +writer.maxTradeVol(); + builder << ", "; + builder << R"("MaxTradeVol": )"; + builder << +writer.maxTradeVol(); - builder << ", "; - builder << R"("MinPriceIncrement": )"; - builder << writer.minPriceIncrement(); + builder << ", "; + builder << R"("MinPriceIncrement": )"; + builder << writer.minPriceIncrement(); - builder << ", "; - builder << R"("DisplayFactor": )"; - builder << writer.displayFactor(); + builder << ", "; + builder << R"("DisplayFactor": )"; + builder << writer.displayFactor(); - builder << ", "; - builder << R"("MainFraction": )"; - builder << +writer.mainFraction(); + builder << ", "; + builder << R"("MainFraction": )"; + builder << +writer.mainFraction(); - builder << ", "; - builder << R"("SubFraction": )"; - builder << +writer.subFraction(); + builder << ", "; + builder << R"("SubFraction": )"; + builder << +writer.subFraction(); - builder << ", "; - builder << R"("PriceDisplayFormat": )"; - builder << +writer.priceDisplayFormat(); + builder << ", "; + builder << R"("PriceDisplayFormat": )"; + builder << +writer.priceDisplayFormat(); - builder << ", "; - builder << R"("UnitOfMeasure": )"; - builder << '"' << writer.getUnitOfMeasureAsJsonEscapedString().c_str() - << '"'; + builder << ", "; + builder << R"("UnitOfMeasure": )"; + builder << '"' << + writer.getUnitOfMeasureAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("UnitOfMeasureQty": )"; - builder << writer.unitOfMeasureQty(); + builder << ", "; + builder << R"("UnitOfMeasureQty": )"; + builder << writer.unitOfMeasureQty(); - builder << ", "; - builder << R"("TradingReferencePrice": )"; - builder << writer.tradingReferencePrice(); + builder << ", "; + builder << R"("TradingReferencePrice": )"; + builder << writer.tradingReferencePrice(); - builder << ", "; - builder << R"("SettlPriceType": )"; - builder << writer.settlPriceType(); + builder << ", "; + builder << R"("SettlPriceType": )"; + builder << writer.settlPriceType(); - builder << ", "; - builder << R"("OpenInterestQty": )"; - builder << +writer.openInterestQty(); + builder << ", "; + builder << R"("OpenInterestQty": )"; + builder << +writer.openInterestQty(); - builder << ", "; - builder << R"("ClearedVolume": )"; - builder << +writer.clearedVolume(); + builder << ", "; + builder << R"("ClearedVolume": )"; + builder << +writer.clearedVolume(); - builder << ", "; - builder << R"("HighLimitPrice": )"; - builder << writer.highLimitPrice(); + builder << ", "; + builder << R"("HighLimitPrice": )"; + builder << writer.highLimitPrice(); - builder << ", "; - builder << R"("LowLimitPrice": )"; - builder << writer.lowLimitPrice(); + builder << ", "; + builder << R"("LowLimitPrice": )"; + builder << writer.lowLimitPrice(); - builder << ", "; - builder << R"("MaxPriceVariation": )"; - builder << writer.maxPriceVariation(); + builder << ", "; + builder << R"("MaxPriceVariation": )"; + builder << writer.maxPriceVariation(); - builder << ", "; - builder << R"("DecayQuantity": )"; - builder << +writer.decayQuantity(); + builder << ", "; + builder << R"("DecayQuantity": )"; + builder << +writer.decayQuantity(); - builder << ", "; - builder << R"("DecayStartDate": )"; - builder << +writer.decayStartDate(); + builder << ", "; + builder << R"("DecayStartDate": )"; + builder << +writer.decayStartDate(); - builder << ", "; - builder << R"("OriginalContractSize": )"; - builder << +writer.originalContractSize(); + builder << ", "; + builder << R"("OriginalContractSize": )"; + builder << +writer.originalContractSize(); - builder << ", "; - builder << R"("ContractMultiplier": )"; - builder << +writer.contractMultiplier(); + builder << ", "; + builder << R"("ContractMultiplier": )"; + builder << +writer.contractMultiplier(); - builder << ", "; - builder << R"("ContractMultiplierUnit": )"; - builder << +writer.contractMultiplierUnit(); + builder << ", "; + builder << R"("ContractMultiplierUnit": )"; + builder << +writer.contractMultiplierUnit(); - builder << ", "; - builder << R"("FlowScheduleType": )"; - builder << +writer.flowScheduleType(); + builder << ", "; + builder << R"("FlowScheduleType": )"; + builder << +writer.flowScheduleType(); - builder << ", "; - builder << R"("MinPriceIncrementAmount": )"; - builder << writer.minPriceIncrementAmount(); + builder << ", "; + builder << R"("MinPriceIncrementAmount": )"; + builder << writer.minPriceIncrementAmount(); - builder << ", "; - builder << R"("UserDefinedInstrument": )"; - if (std::isprint(writer.userDefinedInstrument())) { - builder << '"' << (char)writer.userDefinedInstrument() << '"'; - } else { - builder << (int)writer.userDefinedInstrument(); - } + builder << ", "; + builder << R"("UserDefinedInstrument": )"; + if (std::isprint(writer.userDefinedInstrument())) + { + builder << '"' << (char)writer.userDefinedInstrument() << '"'; + } + else + { + builder << (int)writer.userDefinedInstrument(); + } - builder << ", "; - builder << R"("TradingReferenceDate": )"; - builder << +writer.tradingReferenceDate(); + builder << ", "; + builder << R"("TradingReferenceDate": )"; + builder << +writer.tradingReferenceDate(); - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoEvents": [)"; - writer.noEvents().forEach([&](NoEvents &noEvents) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoEvents": [)"; + writer.noEvents().forEach([&](NoEvents& noEvents) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noEvents; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDFeedTypes": [)"; - writer.noMDFeedTypes().forEach([&](NoMDFeedTypes &noMDFeedTypes) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDFeedTypes": [)"; + writer.noMDFeedTypes().forEach([&](NoMDFeedTypes& noMDFeedTypes) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDFeedTypes; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoInstAttrib": [)"; - writer.noInstAttrib().forEach([&](NoInstAttrib &noInstAttrib) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoInstAttrib": [)"; + writer.noInstAttrib().forEach([&](NoInstAttrib& noInstAttrib) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noInstAttrib; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoLotTypeRules": [)"; - writer.noLotTypeRules().forEach([&](NoLotTypeRules &noLotTypeRules) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoLotTypeRules": [)"; + writer.noLotTypeRules().forEach([&](NoLotTypeRules& noLotTypeRules) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noLotTypeRules; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noEvents().forEach([](NoEvents e) + { + e.skip(); + }); + noMDFeedTypes().forEach([](NoMDFeedTypes e) + { + e.skip(); + }); + noInstAttrib().forEach([](NoInstAttrib e) + { + e.skip(); + }); + noLotTypeRules().forEach([](NoLotTypeRules e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength( + std::size_t noEventsLength = 0, + std::size_t noMDFeedTypesLength = 0, + std::size_t noInstAttribLength = 0, + std::size_t noLotTypeRulesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoEvents::sbeHeaderSize(); + if (noEventsLength > 254LL) + { + throw std::runtime_error("noEventsLength outside of allowed range [E110]"); + } + length += noEventsLength *NoEvents::sbeBlockLength(); + + length += NoMDFeedTypes::sbeHeaderSize(); + if (noMDFeedTypesLength > 254LL) + { + throw std::runtime_error("noMDFeedTypesLength outside of allowed range [E110]"); + } + length += noMDFeedTypesLength *NoMDFeedTypes::sbeBlockLength(); + + length += NoInstAttrib::sbeHeaderSize(); + if (noInstAttribLength > 254LL) + { + throw std::runtime_error("noInstAttribLength outside of allowed range [E110]"); + } + length += noInstAttribLength *NoInstAttrib::sbeBlockLength(); + + length += NoLotTypeRules::sbeHeaderSize(); + if (noLotTypeRulesLength > 254LL) + { + throw std::runtime_error("noLotTypeRulesLength outside of allowed range [E110]"); + } + length += noLotTypeRulesLength *NoLotTypeRules::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionOption41.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionOption41.h index 89780e5c4..c61f44687 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionOption41.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionOption41.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,7089 +86,7698 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDInstrumentDefinitionOption41 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDInstrumentDefinitionOption41 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(213); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(41); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDInstrumentDefinitionOption41() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDInstrumentDefinitionOption41( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDInstrumentDefinitionOption41( - char *buffer, const std::uint64_t bufferLength) - : MDInstrumentDefinitionOption41( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDInstrumentDefinitionOption41() = default; - MDInstrumentDefinitionOption41( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDInstrumentDefinitionOption41( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDInstrumentDefinitionOption41( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)213; - } + MDInstrumentDefinitionOption41(char *buffer, const std::uint64_t bufferLength) : + MDInstrumentDefinitionOption41(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)41; - } + MDInstrumentDefinitionOption41( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDInstrumentDefinitionOption41(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(213); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "d"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(41); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDInstrumentDefinitionOption41 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDInstrumentDefinitionOption41( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDInstrumentDefinitionOption41 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "d"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDInstrumentDefinitionOption41( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDInstrumentDefinitionOption41 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDInstrumentDefinitionOption41(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDInstrumentDefinitionOption41 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDInstrumentDefinitionOption41( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDInstrumentDefinitionOption41 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDInstrumentDefinitionOption41( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDInstrumentDefinitionOption41 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDInstrumentDefinitionOption41(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDInstrumentDefinitionOption41 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD static const char * - TotNumReportsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TotNumReportsMetaAttribute(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 totNumReportsId() SBE_NOEXCEPT { - return 911; - } + static SBE_CONSTEXPR std::uint16_t totNumReportsId() SBE_NOEXCEPT + { + return 911; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - totNumReportsSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNumReportsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= totNumReportsSinceVersion(); + return m_actingVersion >= totNumReportsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - totNumReportsEncodingOffset() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNumReportsEncodingOffset() SBE_NOEXCEPT + { + return 1; + } - static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT { - return 4294967295; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT + { + return UINT32_C(0xffffffff); + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionOption41 & - totNumReports(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionOption41 &totNumReports(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityUpdateActionMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityUpdateActionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityUpdateActionId() SBE_NOEXCEPT { - return 980; - } + static SBE_CONSTEXPR std::uint16_t securityUpdateActionId() SBE_NOEXCEPT + { + return 980; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityUpdateActionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityUpdateActionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityUpdateActionSinceVersion(); + return m_actingVersion >= securityUpdateActionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 5; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 5; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD SecurityUpdateAction::Value - securityUpdateAction() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 5, sizeof(char)); - return SecurityUpdateAction::get((val)); - } + SBE_NODISCARD SecurityUpdateAction::Value securityUpdateAction() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 5, sizeof(char)); + return SecurityUpdateAction::get((val)); + } - MDInstrumentDefinitionOption41 & - securityUpdateAction(const SecurityUpdateAction::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 5, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionOption41 &securityUpdateAction(const SecurityUpdateAction::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 5, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char * - LastUpdateTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *LastUpdateTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t lastUpdateTimeId() SBE_NOEXCEPT { - return 779; - } + static SBE_CONSTEXPR std::uint16_t lastUpdateTimeId() SBE_NOEXCEPT + { + return 779; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lastUpdateTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastUpdateTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool lastUpdateTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool lastUpdateTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lastUpdateTimeSinceVersion(); + return m_actingVersion >= lastUpdateTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lastUpdateTimeEncodingOffset() SBE_NOEXCEPT { - return 6; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastUpdateTimeEncodingOffset() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t - lastUpdateTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t lastUpdateTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t lastUpdateTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 6, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t lastUpdateTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 6, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - MDInstrumentDefinitionOption41 & - lastUpdateTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 6, &val, sizeof(std::uint64_t)); - return *this; - } + MDInstrumentDefinitionOption41 &lastUpdateTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 6, &val, sizeof(std::uint64_t)); + return *this; + } - SBE_NODISCARD static const char *MDSecurityTradingStatusMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MDSecurityTradingStatusMetaAttribute(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 mDSecurityTradingStatusId() SBE_NOEXCEPT { - return 1682; - } + static SBE_CONSTEXPR std::uint16_t mDSecurityTradingStatusId() SBE_NOEXCEPT + { + return 1682; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDSecurityTradingStatusSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDSecurityTradingStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool mDSecurityTradingStatusInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool mDSecurityTradingStatusInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDSecurityTradingStatusSinceVersion(); + return m_actingVersion >= mDSecurityTradingStatusSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDSecurityTradingStatusEncodingOffset() SBE_NOEXCEPT { - return 14; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDSecurityTradingStatusEncodingOffset() SBE_NOEXCEPT + { + return 14; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDSecurityTradingStatusEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDSecurityTradingStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD SecurityTradingStatus::Value - mDSecurityTradingStatus() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); - return SecurityTradingStatus::get((val)); - } + SBE_NODISCARD SecurityTradingStatus::Value mDSecurityTradingStatus() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return SecurityTradingStatus::get((val)); + } - MDInstrumentDefinitionOption41 &mDSecurityTradingStatus( - const SecurityTradingStatus::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionOption41 &mDSecurityTradingStatus(const SecurityTradingStatus::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - ApplIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *ApplIDMetaAttribute(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 applIDId() SBE_NOEXCEPT { return 1180; } + static SBE_CONSTEXPR std::uint16_t applIDId() SBE_NOEXCEPT + { + return 1180; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - applIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t applIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool applIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool applIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= applIDSinceVersion(); + return m_actingVersion >= applIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - applIDEncodingOffset() SBE_NOEXCEPT { - return 15; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t applIDEncodingOffset() SBE_NOEXCEPT + { + return 15; + } - static SBE_CONSTEXPR std::int16_t applIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT16; - } + static SBE_CONSTEXPR std::int16_t applIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT16; + } - static SBE_CONSTEXPR std::int16_t applIDMinValue() SBE_NOEXCEPT { - return (std::int16_t)-32767; - } + static SBE_CONSTEXPR std::int16_t applIDMinValue() SBE_NOEXCEPT + { + return static_cast(-32767); + } - static SBE_CONSTEXPR std::int16_t applIDMaxValue() SBE_NOEXCEPT { - return (std::int16_t)32767; - } + static SBE_CONSTEXPR std::int16_t applIDMaxValue() SBE_NOEXCEPT + { + return static_cast(32767); + } - static SBE_CONSTEXPR std::size_t applIDEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t applIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::int16_t applID() const SBE_NOEXCEPT { - std::int16_t val; - std::memcpy(&val, m_buffer + m_offset + 15, sizeof(std::int16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::int16_t applID() const SBE_NOEXCEPT + { + std::int16_t val; + std::memcpy(&val, m_buffer + m_offset + 15, sizeof(std::int16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MDInstrumentDefinitionOption41 & - applID(const std::int16_t value) SBE_NOEXCEPT { - std::int16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 15, &val, sizeof(std::int16_t)); - return *this; - } + MDInstrumentDefinitionOption41 &applID(const std::int16_t value) SBE_NOEXCEPT + { + std::int16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 15, &val, sizeof(std::int16_t)); + return *this; + } - SBE_NODISCARD static const char *MarketSegmentIDMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MarketSegmentIDMetaAttribute(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 marketSegmentIDId() SBE_NOEXCEPT { - return 1300; - } + static SBE_CONSTEXPR std::uint16_t marketSegmentIDId() SBE_NOEXCEPT + { + return 1300; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - marketSegmentIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketSegmentIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= marketSegmentIDSinceVersion(); + return m_actingVersion >= marketSegmentIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - marketSegmentIDEncodingOffset() SBE_NOEXCEPT { - return 17; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingOffset() SBE_NOEXCEPT + { + return 17; + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT8; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - marketSegmentIDEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionOption41 & - marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionOption41 &marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *UnderlyingProductMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UnderlyingProductMetaAttribute(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 underlyingProductId() SBE_NOEXCEPT { - return 462; - } + static SBE_CONSTEXPR std::uint16_t underlyingProductId() SBE_NOEXCEPT + { + return 462; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - underlyingProductSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t underlyingProductSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool underlyingProductInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool underlyingProductInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= underlyingProductSinceVersion(); + return m_actingVersion >= underlyingProductSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - underlyingProductEncodingOffset() SBE_NOEXCEPT { - return 18; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t underlyingProductEncodingOffset() SBE_NOEXCEPT + { + return 18; + } - static SBE_CONSTEXPR std::uint8_t underlyingProductNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT8; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } - static SBE_CONSTEXPR std::uint8_t underlyingProductMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t underlyingProductMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - underlyingProductEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t underlyingProductEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t underlyingProduct() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t underlyingProduct() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionOption41 & - underlyingProduct(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionOption41 &underlyingProduct(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityExchangeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Exchange"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityExchangeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Exchange"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityExchangeId() SBE_NOEXCEPT { - return 207; - } + static SBE_CONSTEXPR std::uint16_t securityExchangeId() SBE_NOEXCEPT + { + return 207; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityExchangeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityExchangeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityExchangeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityExchangeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityExchangeSinceVersion(); + return m_actingVersion >= securityExchangeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityExchangeEncodingOffset() SBE_NOEXCEPT { - return 19; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityExchangeEncodingOffset() SBE_NOEXCEPT + { + return 19; + } - static SBE_CONSTEXPR char securityExchangeNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityExchangeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityExchangeMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityExchangeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityExchangeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityExchangeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - securityExchangeEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t securityExchangeEncodingLength() SBE_NOEXCEPT + { + return 4; + } - static SBE_CONSTEXPR std::uint64_t securityExchangeLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::uint64_t securityExchangeLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD const char *securityExchange() const SBE_NOEXCEPT { - return m_buffer + m_offset + 19; - } + SBE_NODISCARD const char *securityExchange() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 19; + } - SBE_NODISCARD char *securityExchange() SBE_NOEXCEPT { - return m_buffer + m_offset + 19; - } + SBE_NODISCARD char *securityExchange() SBE_NOEXCEPT + { + return m_buffer + m_offset + 19; + } - SBE_NODISCARD char securityExchange(const std::uint64_t index) const { - if (index >= 4) { - throw std::runtime_error( - "index out of range for securityExchange [E104]"); - } + SBE_NODISCARD char securityExchange(const std::uint64_t index) const + { + if (index >= 4) + { + throw std::runtime_error("index out of range for securityExchange [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 19 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 19 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption41 & - securityExchange(const std::uint64_t index, const char value) { - if (index >= 4) { - throw std::runtime_error( - "index out of range for securityExchange [E105]"); - } + MDInstrumentDefinitionOption41 &securityExchange(const std::uint64_t index, const char value) + { + if (index >= 4) + { + throw std::runtime_error("index out of range for securityExchange [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 19 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 19 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityExchange(char *const dst, const std::uint64_t length) const { - if (length > 4) { - throw std::runtime_error( - "length too large for getSecurityExchange [E106]"); - } + std::uint64_t getSecurityExchange(char *const dst, const std::uint64_t length) const + { + if (length > 4) + { + throw std::runtime_error("length too large for getSecurityExchange [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 19, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 19, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption41 & - putSecurityExchange(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 19, src, sizeof(char) * 4); - return *this; - } + MDInstrumentDefinitionOption41 &putSecurityExchange(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 19, src, sizeof(char) * 4); + return *this; + } - MDInstrumentDefinitionOption41 &putSecurityExchange( - const char value0, - const char value1, - const char value2, - const char value3) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 19, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 20, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 21, &val2, sizeof(char)); - char val3 = (value3); - std::memcpy(m_buffer + m_offset + 22, &val3, sizeof(char)); + MDInstrumentDefinitionOption41 &putSecurityExchange( + const char value0, + const char value1, + const char value2, + const char value3) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 19, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 20, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 21, &val2, sizeof(char)); + char val3 = (value3); + std::memcpy(m_buffer + m_offset + 22, &val3, sizeof(char)); - return *this; - } + return *this; + } - std::string getSecurityExchangeAsString() const { - const char *buffer = m_buffer + m_offset + 19; - size_t length = 0; + SBE_NODISCARD std::string getSecurityExchangeAsString() const + { + const char *buffer = m_buffer + m_offset + 19; + size_t length = 0; - for (; length < 4 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 4 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityExchangeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityExchangeAsString(); + std::string getSecurityExchangeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityExchangeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityExchangeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 19; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityExchangeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 19; + size_t length = 0; - for (; length < 4 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 4 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption41 & - putSecurityExchange(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 4) { - throw std::runtime_error( - "string too large for putSecurityExchange [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption41 &putSecurityExchange(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 4) + { + throw std::runtime_error("string too large for putSecurityExchange [E106]"); + } - std::memcpy(m_buffer + m_offset + 19, str.data(), srcLength); - for (size_t start = srcLength; start < 4; ++start) { - m_buffer[m_offset + 19 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 19, str.data(), srcLength); + for (size_t start = srcLength; start < 4; ++start) + { + m_buffer[m_offset + 19 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption41 &putSecurityExchange(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 4) { - throw std::runtime_error( - "string too large for putSecurityExchange [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption41 &putSecurityExchange(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 4) + { + throw std::runtime_error("string too large for putSecurityExchange [E106]"); + } - std::memcpy(m_buffer + m_offset + 19, str.c_str(), srcLength); - for (size_t start = srcLength; start < 4; ++start) { - m_buffer[m_offset + 19 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 19, str.c_str(), srcLength); + for (size_t start = srcLength; start < 4; ++start) + { + m_buffer[m_offset + 19 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT { - return 1151; - } + static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT + { + return 1151; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityGroupSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityGroupSinceVersion(); + return m_actingVersion >= securityGroupSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityGroupEncodingOffset() SBE_NOEXCEPT { - return 23; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityGroupEncodingOffset() SBE_NOEXCEPT + { + return 23; + } - static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT { - return m_buffer + m_offset + 23; - } + SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 23; + } - SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT { - return m_buffer + m_offset + 23; - } + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 23; + } - SBE_NODISCARD char securityGroup(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error( - "index out of range for securityGroup [E104]"); - } + SBE_NODISCARD char securityGroup(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 23 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 23 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption41 & - securityGroup(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error( - "index out of range for securityGroup [E105]"); - } + MDInstrumentDefinitionOption41 &securityGroup(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 23 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 23 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityGroup(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error( - "length too large for getSecurityGroup [E106]"); - } + std::uint64_t getSecurityGroup(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityGroup [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 23, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 23, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption41 & - putSecurityGroup(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 23, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionOption41 &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 23, src, sizeof(char) * 6); + return *this; + } - std::string getSecurityGroupAsString() const { - const char *buffer = m_buffer + m_offset + 23; - size_t length = 0; + SBE_NODISCARD std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 23; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityGroupAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityGroupAsString(); + std::string getSecurityGroupAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityGroupAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 23; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 23; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption41 & - putSecurityGroup(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityGroup [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption41 &putSecurityGroup(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } - std::memcpy(m_buffer + m_offset + 23, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 23 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 23, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 23 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption41 &putSecurityGroup(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityGroup [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption41 &putSecurityGroup(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } - std::memcpy(m_buffer + m_offset + 23, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 23 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 23, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 23 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - AssetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *AssetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t assetId() SBE_NOEXCEPT { return 6937; } + static SBE_CONSTEXPR std::uint16_t assetId() SBE_NOEXCEPT + { + return 6937; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - assetSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t assetSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool assetInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool assetInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= assetSinceVersion(); + return m_actingVersion >= assetSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - assetEncodingOffset() SBE_NOEXCEPT { - return 29; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t assetEncodingOffset() SBE_NOEXCEPT + { + return 29; + } - static SBE_CONSTEXPR char assetNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char assetNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char assetMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char assetMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char assetMaxValue() SBE_NOEXCEPT { return (char)126; } + static SBE_CONSTEXPR char assetMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t assetEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t assetEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t assetLength() SBE_NOEXCEPT { return 6; } + static SBE_CONSTEXPR std::uint64_t assetLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *asset() const SBE_NOEXCEPT { - return m_buffer + m_offset + 29; - } + SBE_NODISCARD const char *asset() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 29; + } - SBE_NODISCARD char *asset() SBE_NOEXCEPT { return m_buffer + m_offset + 29; } + SBE_NODISCARD char *asset() SBE_NOEXCEPT + { + return m_buffer + m_offset + 29; + } - SBE_NODISCARD char asset(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for asset [E104]"); - } + SBE_NODISCARD char asset(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for asset [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 29 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 29 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption41 & - asset(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for asset [E105]"); - } + MDInstrumentDefinitionOption41 &asset(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for asset [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 29 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 29 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getAsset(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error("length too large for getAsset [E106]"); - } + std::uint64_t getAsset(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getAsset [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 29, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 29, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption41 & - putAsset(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 29, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionOption41 &putAsset(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 29, src, sizeof(char) * 6); + return *this; + } - std::string getAssetAsString() const { - const char *buffer = m_buffer + m_offset + 29; - size_t length = 0; + SBE_NODISCARD std::string getAssetAsString() const + { + const char *buffer = m_buffer + m_offset + 29; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getAssetAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getAssetAsString(); + std::string getAssetAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getAssetAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getAssetAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 29; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getAssetAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 29; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption41 &putAsset(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putAsset [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption41 &putAsset(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putAsset [E106]"); + } - std::memcpy(m_buffer + m_offset + 29, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 29 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 29, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 29 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption41 &putAsset(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putAsset [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption41 &putAsset(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putAsset [E106]"); + } - std::memcpy(m_buffer + m_offset + 29, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 29 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 29, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 29 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t symbolId() SBE_NOEXCEPT { return 55; } + static SBE_CONSTEXPR std::uint16_t symbolId() SBE_NOEXCEPT + { + return 55; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - symbolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t symbolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool symbolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool symbolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= symbolSinceVersion(); + return m_actingVersion >= symbolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - symbolEncodingOffset() SBE_NOEXCEPT { - return 35; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t symbolEncodingOffset() SBE_NOEXCEPT + { + return 35; + } - static SBE_CONSTEXPR char symbolNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char symbolNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char symbolMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char symbolMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char symbolMaxValue() SBE_NOEXCEPT { return (char)126; } + static SBE_CONSTEXPR char symbolMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t symbolEncodingLength() SBE_NOEXCEPT { - return 20; - } + static SBE_CONSTEXPR std::size_t symbolEncodingLength() SBE_NOEXCEPT + { + return 20; + } - static SBE_CONSTEXPR std::uint64_t symbolLength() SBE_NOEXCEPT { return 20; } + static SBE_CONSTEXPR std::uint64_t symbolLength() SBE_NOEXCEPT + { + return 20; + } - SBE_NODISCARD const char *symbol() const SBE_NOEXCEPT { - return m_buffer + m_offset + 35; - } + SBE_NODISCARD const char *symbol() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 35; + } - SBE_NODISCARD char *symbol() SBE_NOEXCEPT { - return m_buffer + m_offset + 35; - } + SBE_NODISCARD char *symbol() SBE_NOEXCEPT + { + return m_buffer + m_offset + 35; + } - SBE_NODISCARD char symbol(const std::uint64_t index) const { - if (index >= 20) { - throw std::runtime_error("index out of range for symbol [E104]"); - } + SBE_NODISCARD char symbol(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 35 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 35 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption41 & - symbol(const std::uint64_t index, const char value) { - if (index >= 20) { - throw std::runtime_error("index out of range for symbol [E105]"); - } + MDInstrumentDefinitionOption41 &symbol(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 35 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 35 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getSymbol(char *const dst, const std::uint64_t length) const { - if (length > 20) { - throw std::runtime_error("length too large for getSymbol [E106]"); - } + std::uint64_t getSymbol(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSymbol [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 35, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 35, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption41 & - putSymbol(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 35, src, sizeof(char) * 20); - return *this; - } + MDInstrumentDefinitionOption41 &putSymbol(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 35, src, sizeof(char) * 20); + return *this; + } - std::string getSymbolAsString() const { - const char *buffer = m_buffer + m_offset + 35; - size_t length = 0; + SBE_NODISCARD std::string getSymbolAsString() const + { + const char *buffer = m_buffer + m_offset + 35; + size_t length = 0; - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSymbolAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSymbolAsString(); + std::string getSymbolAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSymbolAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSymbolAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 35; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSymbolAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 35; + size_t length = 0; - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption41 &putSymbol(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error("string too large for putSymbol [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption41 &putSymbol(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } - std::memcpy(m_buffer + m_offset + 35, str.data(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 35 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 35, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 35 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption41 &putSymbol(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error("string too large for putSymbol [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption41 &putSymbol(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } - std::memcpy(m_buffer + m_offset + 35, str.c_str(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 35 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 35, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 35 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { return 48; } + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityIDSinceVersion(); + return m_actingVersion >= securityIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 55; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 55; + } - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 55, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 55, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionOption41 & - securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 55, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionOption41 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 55, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityIDSourceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityIDSourceId() SBE_NOEXCEPT { - return 22; - } + static SBE_CONSTEXPR std::uint16_t securityIDSourceId() SBE_NOEXCEPT + { + return 22; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSourceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityIDSourceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityIDSourceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityIDSourceSinceVersion(); + return m_actingVersion >= securityIDSourceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDSourceEncodingOffset() SBE_NOEXCEPT { - return 59; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 59; + } - static SBE_CONSTEXPR char securityIDSourceNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityIDSourceNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityIDSourceMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityIDSourceMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityIDSourceMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityIDSourceMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - securityIDSourceEncodingLength() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::size_t securityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t securityIDSourceLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::uint64_t securityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD const char *securityIDSource() const { - static const std::uint8_t securityIDSourceValues[] = {56}; + SBE_NODISCARD const char *securityIDSource() const + { + static const std::uint8_t securityIDSourceValues[] = { 56 }; - return (const char *)securityIDSourceValues; - } + return (const char *)securityIDSourceValues; + } - SBE_NODISCARD char securityIDSource(const std::uint64_t index) const { - static const std::uint8_t securityIDSourceValues[] = {56}; + SBE_NODISCARD char securityIDSource(const std::uint64_t index) const + { + static const std::uint8_t securityIDSourceValues[] = { 56 }; - return (char)securityIDSourceValues[index]; - } + return (char)securityIDSourceValues[index]; + } - std::uint64_t - getSecurityIDSource(char *dst, const std::uint64_t length) const { - static std::uint8_t securityIDSourceValues[] = {56}; - std::uint64_t bytesToCopy = length < sizeof(securityIDSourceValues) - ? length - : sizeof(securityIDSourceValues); + std::uint64_t getSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t securityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(securityIDSourceValues) ? length : sizeof(securityIDSourceValues); - std::memcpy( - dst, securityIDSourceValues, static_cast(bytesToCopy)); - return bytesToCopy; - } + std::memcpy(dst, securityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } - std::string getSecurityIDSourceAsString() const { - static const std::uint8_t SecurityIDSourceValues[] = {56}; + std::string getSecurityIDSourceAsString() const + { + static const std::uint8_t SecurityIDSourceValues[] = { 56 }; - return std::string((const char *)SecurityIDSourceValues, 1); - } + return std::string((const char *)SecurityIDSourceValues, 1); + } - std::string getSecurityIDSourceAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityIDSourceAsString(); + std::string getSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityIDSourceAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } - SBE_NODISCARD static const char * - SecurityTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityTypeId() SBE_NOEXCEPT { - return 167; - } + static SBE_CONSTEXPR std::uint16_t securityTypeId() SBE_NOEXCEPT + { + return 167; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityTypeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityTypeSinceVersion(); + return m_actingVersion >= securityTypeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityTypeEncodingOffset() SBE_NOEXCEPT { - return 59; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityTypeEncodingOffset() SBE_NOEXCEPT + { + return 59; + } - static SBE_CONSTEXPR char securityTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t securityTypeEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t securityTypeEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t securityTypeLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::uint64_t securityTypeLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *securityType() const SBE_NOEXCEPT { - return m_buffer + m_offset + 59; - } + SBE_NODISCARD const char *securityType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 59; + } - SBE_NODISCARD char *securityType() SBE_NOEXCEPT { - return m_buffer + m_offset + 59; - } + SBE_NODISCARD char *securityType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 59; + } - SBE_NODISCARD char securityType(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for securityType [E104]"); - } + SBE_NODISCARD char securityType(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityType [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 59 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 59 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption41 & - securityType(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for securityType [E105]"); - } + MDInstrumentDefinitionOption41 &securityType(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityType [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 59 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 59 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityType(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error( - "length too large for getSecurityType [E106]"); - } + std::uint64_t getSecurityType(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityType [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 59, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 59, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption41 & - putSecurityType(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 59, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionOption41 &putSecurityType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 59, src, sizeof(char) * 6); + return *this; + } - std::string getSecurityTypeAsString() const { - const char *buffer = m_buffer + m_offset + 59; - size_t length = 0; + SBE_NODISCARD std::string getSecurityTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 59; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityTypeAsString(); + std::string getSecurityTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityTypeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityTypeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 59; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 59; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption41 &putSecurityType(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityType [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption41 &putSecurityType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityType [E106]"); + } - std::memcpy(m_buffer + m_offset + 59, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 59 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 59, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 59 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption41 &putSecurityType(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityType [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption41 &putSecurityType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityType [E106]"); + } - std::memcpy(m_buffer + m_offset + 59, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 59 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 59, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 59 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - CFICodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *CFICodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t cFICodeId() SBE_NOEXCEPT { return 461; } + static SBE_CONSTEXPR std::uint16_t cFICodeId() SBE_NOEXCEPT + { + return 461; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - cFICodeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cFICodeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool cFICodeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool cFICodeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= cFICodeSinceVersion(); + return m_actingVersion >= cFICodeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - cFICodeEncodingOffset() SBE_NOEXCEPT { - return 65; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cFICodeEncodingOffset() SBE_NOEXCEPT + { + return 65; + } - static SBE_CONSTEXPR char cFICodeNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char cFICodeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char cFICodeMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char cFICodeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char cFICodeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char cFICodeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t cFICodeEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t cFICodeEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t cFICodeLength() SBE_NOEXCEPT { return 6; } + static SBE_CONSTEXPR std::uint64_t cFICodeLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *cFICode() const SBE_NOEXCEPT { - return m_buffer + m_offset + 65; - } + SBE_NODISCARD const char *cFICode() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 65; + } - SBE_NODISCARD char *cFICode() SBE_NOEXCEPT { - return m_buffer + m_offset + 65; - } + SBE_NODISCARD char *cFICode() SBE_NOEXCEPT + { + return m_buffer + m_offset + 65; + } - SBE_NODISCARD char cFICode(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for cFICode [E104]"); - } + SBE_NODISCARD char cFICode(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cFICode [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 65 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 65 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption41 & - cFICode(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for cFICode [E105]"); - } + MDInstrumentDefinitionOption41 &cFICode(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cFICode [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 65 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 65 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getCFICode(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error("length too large for getCFICode [E106]"); - } + std::uint64_t getCFICode(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getCFICode [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 65, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 65, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption41 & - putCFICode(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 65, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionOption41 &putCFICode(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 65, src, sizeof(char) * 6); + return *this; + } - std::string getCFICodeAsString() const { - const char *buffer = m_buffer + m_offset + 65; - size_t length = 0; + SBE_NODISCARD std::string getCFICodeAsString() const + { + const char *buffer = m_buffer + m_offset + 65; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getCFICodeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getCFICodeAsString(); + std::string getCFICodeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCFICodeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getCFICodeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 65; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCFICodeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 65; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption41 &putCFICode(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putCFICode [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption41 &putCFICode(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCFICode [E106]"); + } - std::memcpy(m_buffer + m_offset + 65, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 65 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 65, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 65 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption41 &putCFICode(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putCFICode [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption41 &putCFICode(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCFICode [E106]"); + } - std::memcpy(m_buffer + m_offset + 65, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 65 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 65, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 65 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - PutOrCallMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *PutOrCallMetaAttribute(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 putOrCallId() SBE_NOEXCEPT { return 201; } + static SBE_CONSTEXPR std::uint16_t putOrCallId() SBE_NOEXCEPT + { + return 201; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - putOrCallSinceVersion() SBE_NOEXCEPT { - return 3; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t putOrCallSinceVersion() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD bool putOrCallInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool putOrCallInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= putOrCallSinceVersion(); + return m_actingVersion >= putOrCallSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - putOrCallEncodingOffset() SBE_NOEXCEPT { - return 71; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t putOrCallEncodingOffset() SBE_NOEXCEPT + { + return 71; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - putOrCallEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t putOrCallEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD PutOrCall::Value putOrCall() const SBE_NOEXCEPT { - if (m_actingVersion < 3) { - return PutOrCall::NULL_VALUE; - } + SBE_NODISCARD PutOrCall::Value putOrCall() const + { + if (m_actingVersion < 3) + { + return PutOrCall::NULL_VALUE; + } - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 71, sizeof(std::uint8_t)); - return PutOrCall::get((val)); - } + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 71, sizeof(std::uint8_t)); + return PutOrCall::get((val)); + } - MDInstrumentDefinitionOption41 & - putOrCall(const PutOrCall::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 71, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionOption41 &putOrCall(const PutOrCall::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 71, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *MaturityMonthYearMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MonthYear"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaturityMonthYearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MonthYear"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t maturityMonthYearId() SBE_NOEXCEPT { - return 200; - } + static SBE_CONSTEXPR std::uint16_t maturityMonthYearId() SBE_NOEXCEPT + { + return 200; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maturityMonthYearSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maturityMonthYearSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool maturityMonthYearInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maturityMonthYearInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maturityMonthYearSinceVersion(); + return m_actingVersion >= maturityMonthYearSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maturityMonthYearEncodingOffset() SBE_NOEXCEPT { - return 72; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maturityMonthYearEncodingOffset() SBE_NOEXCEPT + { + return 72; + } - private: - MaturityMonthYear m_maturityMonthYear; +private: + MaturityMonthYear m_maturityMonthYear; - public: - SBE_NODISCARD MaturityMonthYear &maturityMonthYear() { - m_maturityMonthYear.wrap( - m_buffer, m_offset + 72, m_actingVersion, m_bufferLength); - return m_maturityMonthYear; - } +public: + SBE_NODISCARD MaturityMonthYear &maturityMonthYear() + { + m_maturityMonthYear.wrap(m_buffer, m_offset + 72, m_actingVersion, m_bufferLength); + return m_maturityMonthYear; + } - SBE_NODISCARD static const char * - CurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Currency"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *CurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Currency"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t currencyId() SBE_NOEXCEPT { return 15; } + static SBE_CONSTEXPR std::uint16_t currencyId() SBE_NOEXCEPT + { + return 15; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - currencySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t currencySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool currencyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool currencyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= currencySinceVersion(); + return m_actingVersion >= currencySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - currencyEncodingOffset() SBE_NOEXCEPT { - return 77; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t currencyEncodingOffset() SBE_NOEXCEPT + { + return 77; + } - static SBE_CONSTEXPR char currencyNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char currencyNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char currencyMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char currencyMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char currencyMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char currencyMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t currencyEncodingLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::size_t currencyEncodingLength() SBE_NOEXCEPT + { + return 3; + } - static SBE_CONSTEXPR std::uint64_t currencyLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::uint64_t currencyLength() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD const char *currency() const SBE_NOEXCEPT { - return m_buffer + m_offset + 77; - } + SBE_NODISCARD const char *currency() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 77; + } - SBE_NODISCARD char *currency() SBE_NOEXCEPT { - return m_buffer + m_offset + 77; - } + SBE_NODISCARD char *currency() SBE_NOEXCEPT + { + return m_buffer + m_offset + 77; + } - SBE_NODISCARD char currency(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error("index out of range for currency [E104]"); - } + SBE_NODISCARD char currency(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for currency [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 77 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 77 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption41 & - currency(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error("index out of range for currency [E105]"); - } + MDInstrumentDefinitionOption41 ¤cy(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for currency [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 77 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 77 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getCurrency(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error("length too large for getCurrency [E106]"); - } + std::uint64_t getCurrency(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getCurrency [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 77, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 77, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption41 & - putCurrency(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 77, src, sizeof(char) * 3); - return *this; - } + MDInstrumentDefinitionOption41 &putCurrency(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 77, src, sizeof(char) * 3); + return *this; + } - MDInstrumentDefinitionOption41 &putCurrency( - const char value0, const char value1, const char value2) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 77, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 78, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 79, &val2, sizeof(char)); + MDInstrumentDefinitionOption41 &putCurrency( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 77, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 78, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 79, &val2, sizeof(char)); - return *this; - } + return *this; + } - std::string getCurrencyAsString() const { - const char *buffer = m_buffer + m_offset + 77; - size_t length = 0; + SBE_NODISCARD std::string getCurrencyAsString() const + { + const char *buffer = m_buffer + m_offset + 77; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getCurrencyAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getCurrencyAsString(); + std::string getCurrencyAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCurrencyAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getCurrencyAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 77; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCurrencyAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 77; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption41 &putCurrency(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error("string too large for putCurrency [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption41 &putCurrency(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 77, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 77 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 77, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 77 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption41 &putCurrency(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error("string too large for putCurrency [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption41 &putCurrency(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 77, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 77 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 77, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 77 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - StrikePriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *StrikePriceMetaAttribute(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 strikePriceId() SBE_NOEXCEPT { - return 202; - } + static SBE_CONSTEXPR std::uint16_t strikePriceId() SBE_NOEXCEPT + { + return 202; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - strikePriceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t strikePriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool strikePriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool strikePriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= strikePriceSinceVersion(); + return m_actingVersion >= strikePriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - strikePriceEncodingOffset() SBE_NOEXCEPT { - return 80; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t strikePriceEncodingOffset() SBE_NOEXCEPT + { + return 80; + } - private: - PRICENULL m_strikePrice; +private: + PRICENULL m_strikePrice; - public: - SBE_NODISCARD PRICENULL &strikePrice() { - m_strikePrice.wrap( - m_buffer, m_offset + 80, m_actingVersion, m_bufferLength); - return m_strikePrice; - } +public: + SBE_NODISCARD PRICENULL &strikePrice() + { + m_strikePrice.wrap(m_buffer, m_offset + 80, m_actingVersion, m_bufferLength); + return m_strikePrice; + } - SBE_NODISCARD static const char * - StrikeCurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Currency"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *StrikeCurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Currency"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t strikeCurrencyId() SBE_NOEXCEPT { - return 947; - } + static SBE_CONSTEXPR std::uint16_t strikeCurrencyId() SBE_NOEXCEPT + { + return 947; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - strikeCurrencySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t strikeCurrencySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool strikeCurrencyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool strikeCurrencyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= strikeCurrencySinceVersion(); + return m_actingVersion >= strikeCurrencySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - strikeCurrencyEncodingOffset() SBE_NOEXCEPT { - return 88; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t strikeCurrencyEncodingOffset() SBE_NOEXCEPT + { + return 88; + } - static SBE_CONSTEXPR char strikeCurrencyNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char strikeCurrencyNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char strikeCurrencyMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char strikeCurrencyMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char strikeCurrencyMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char strikeCurrencyMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - strikeCurrencyEncodingLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::size_t strikeCurrencyEncodingLength() SBE_NOEXCEPT + { + return 3; + } - static SBE_CONSTEXPR std::uint64_t strikeCurrencyLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::uint64_t strikeCurrencyLength() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD const char *strikeCurrency() const SBE_NOEXCEPT { - return m_buffer + m_offset + 88; - } + SBE_NODISCARD const char *strikeCurrency() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 88; + } - SBE_NODISCARD char *strikeCurrency() SBE_NOEXCEPT { - return m_buffer + m_offset + 88; - } + SBE_NODISCARD char *strikeCurrency() SBE_NOEXCEPT + { + return m_buffer + m_offset + 88; + } - SBE_NODISCARD char strikeCurrency(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error( - "index out of range for strikeCurrency [E104]"); - } + SBE_NODISCARD char strikeCurrency(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for strikeCurrency [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 88 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 88 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption41 & - strikeCurrency(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error( - "index out of range for strikeCurrency [E105]"); - } + MDInstrumentDefinitionOption41 &strikeCurrency(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for strikeCurrency [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 88 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 88 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getStrikeCurrency(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error( - "length too large for getStrikeCurrency [E106]"); - } + std::uint64_t getStrikeCurrency(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getStrikeCurrency [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 88, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 88, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption41 & - putStrikeCurrency(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 88, src, sizeof(char) * 3); - return *this; - } + MDInstrumentDefinitionOption41 &putStrikeCurrency(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 88, src, sizeof(char) * 3); + return *this; + } - MDInstrumentDefinitionOption41 &putStrikeCurrency( - const char value0, const char value1, const char value2) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 88, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 89, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 90, &val2, sizeof(char)); + MDInstrumentDefinitionOption41 &putStrikeCurrency( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 88, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 89, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 90, &val2, sizeof(char)); - return *this; - } + return *this; + } - std::string getStrikeCurrencyAsString() const { - const char *buffer = m_buffer + m_offset + 88; - size_t length = 0; + SBE_NODISCARD std::string getStrikeCurrencyAsString() const + { + const char *buffer = m_buffer + m_offset + 88; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getStrikeCurrencyAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getStrikeCurrencyAsString(); + std::string getStrikeCurrencyAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getStrikeCurrencyAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getStrikeCurrencyAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 88; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getStrikeCurrencyAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 88; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption41 & - putStrikeCurrency(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putStrikeCurrency [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption41 &putStrikeCurrency(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putStrikeCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 88, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 88 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 88, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 88 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption41 &putStrikeCurrency(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putStrikeCurrency [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption41 &putStrikeCurrency(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putStrikeCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 88, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 88 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 88, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 88 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SettlCurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Currency"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SettlCurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Currency"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t settlCurrencyId() SBE_NOEXCEPT { - return 120; - } + static SBE_CONSTEXPR std::uint16_t settlCurrencyId() SBE_NOEXCEPT + { + return 120; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - settlCurrencySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t settlCurrencySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool settlCurrencyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool settlCurrencyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= settlCurrencySinceVersion(); + return m_actingVersion >= settlCurrencySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - settlCurrencyEncodingOffset() SBE_NOEXCEPT { - return 91; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t settlCurrencyEncodingOffset() SBE_NOEXCEPT + { + return 91; + } - static SBE_CONSTEXPR char settlCurrencyNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char settlCurrencyNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char settlCurrencyMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char settlCurrencyMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char settlCurrencyMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char settlCurrencyMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t settlCurrencyEncodingLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::size_t settlCurrencyEncodingLength() SBE_NOEXCEPT + { + return 3; + } - static SBE_CONSTEXPR std::uint64_t settlCurrencyLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::uint64_t settlCurrencyLength() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD const char *settlCurrency() const SBE_NOEXCEPT { - return m_buffer + m_offset + 91; - } + SBE_NODISCARD const char *settlCurrency() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 91; + } - SBE_NODISCARD char *settlCurrency() SBE_NOEXCEPT { - return m_buffer + m_offset + 91; - } + SBE_NODISCARD char *settlCurrency() SBE_NOEXCEPT + { + return m_buffer + m_offset + 91; + } - SBE_NODISCARD char settlCurrency(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error( - "index out of range for settlCurrency [E104]"); - } + SBE_NODISCARD char settlCurrency(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for settlCurrency [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 91 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 91 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption41 & - settlCurrency(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error( - "index out of range for settlCurrency [E105]"); - } + MDInstrumentDefinitionOption41 &settlCurrency(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for settlCurrency [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 91 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 91 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSettlCurrency(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error( - "length too large for getSettlCurrency [E106]"); - } + std::uint64_t getSettlCurrency(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getSettlCurrency [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 91, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 91, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption41 & - putSettlCurrency(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 91, src, sizeof(char) * 3); - return *this; - } + MDInstrumentDefinitionOption41 &putSettlCurrency(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 91, src, sizeof(char) * 3); + return *this; + } - MDInstrumentDefinitionOption41 &putSettlCurrency( - const char value0, const char value1, const char value2) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 91, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 92, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 93, &val2, sizeof(char)); + MDInstrumentDefinitionOption41 &putSettlCurrency( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 91, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 92, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 93, &val2, sizeof(char)); - return *this; - } + return *this; + } - std::string getSettlCurrencyAsString() const { - const char *buffer = m_buffer + m_offset + 91; - size_t length = 0; + SBE_NODISCARD std::string getSettlCurrencyAsString() const + { + const char *buffer = m_buffer + m_offset + 91; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSettlCurrencyAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSettlCurrencyAsString(); + std::string getSettlCurrencyAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSettlCurrencyAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSettlCurrencyAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 91; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSettlCurrencyAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 91; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption41 & - putSettlCurrency(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putSettlCurrency [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption41 &putSettlCurrency(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putSettlCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 91, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 91 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 91, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 91 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption41 &putSettlCurrency(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putSettlCurrency [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption41 &putSettlCurrency(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putSettlCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 91, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 91 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 91, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 91 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - MinCabPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinCabPriceMetaAttribute(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 minCabPriceId() SBE_NOEXCEPT { - return 9850; - } + static SBE_CONSTEXPR std::uint16_t minCabPriceId() SBE_NOEXCEPT + { + return 9850; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minCabPriceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minCabPriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool minCabPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minCabPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minCabPriceSinceVersion(); + return m_actingVersion >= minCabPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minCabPriceEncodingOffset() SBE_NOEXCEPT { - return 94; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minCabPriceEncodingOffset() SBE_NOEXCEPT + { + return 94; + } - private: - PRICENULL m_minCabPrice; +private: + PRICENULL m_minCabPrice; - public: - SBE_NODISCARD PRICENULL &minCabPrice() { - m_minCabPrice.wrap( - m_buffer, m_offset + 94, m_actingVersion, m_bufferLength); - return m_minCabPrice; - } +public: + SBE_NODISCARD PRICENULL &minCabPrice() + { + m_minCabPrice.wrap(m_buffer, m_offset + 94, m_actingVersion, m_bufferLength); + return m_minCabPrice; + } - SBE_NODISCARD static const char * - MatchAlgorithmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchAlgorithmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchAlgorithmId() SBE_NOEXCEPT { - return 1142; - } + static SBE_CONSTEXPR std::uint16_t matchAlgorithmId() SBE_NOEXCEPT + { + return 1142; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchAlgorithmSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchAlgorithmSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchAlgorithmInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchAlgorithmInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchAlgorithmSinceVersion(); + return m_actingVersion >= matchAlgorithmSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchAlgorithmEncodingOffset() SBE_NOEXCEPT { - return 102; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchAlgorithmEncodingOffset() SBE_NOEXCEPT + { + return 102; + } - static SBE_CONSTEXPR char matchAlgorithmNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char matchAlgorithmNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char matchAlgorithmMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char matchAlgorithmMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char matchAlgorithmMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char matchAlgorithmMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - matchAlgorithmEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchAlgorithmEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD char matchAlgorithm() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 102, sizeof(char)); - return (val); - } + SBE_NODISCARD char matchAlgorithm() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 102, sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption41 & - matchAlgorithm(const char value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 102, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionOption41 &matchAlgorithm(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 102, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char * - MinTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t minTradeVolId() SBE_NOEXCEPT { - return 562; - } + static SBE_CONSTEXPR std::uint16_t minTradeVolId() SBE_NOEXCEPT + { + return 562; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minTradeVolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minTradeVolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool minTradeVolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minTradeVolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minTradeVolSinceVersion(); + return m_actingVersion >= minTradeVolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minTradeVolEncodingOffset() SBE_NOEXCEPT { - return 103; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minTradeVolEncodingOffset() SBE_NOEXCEPT + { + return 103; + } - static SBE_CONSTEXPR std::uint32_t minTradeVolNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t minTradeVolMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t minTradeVolMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t minTradeVolEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t minTradeVolEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t minTradeVol() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 103, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t minTradeVol() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 103, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionOption41 & - minTradeVol(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 103, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionOption41 &minTradeVol(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 103, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - MaxTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaxTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t maxTradeVolId() SBE_NOEXCEPT { - return 1140; - } + static SBE_CONSTEXPR std::uint16_t maxTradeVolId() SBE_NOEXCEPT + { + return 1140; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maxTradeVolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxTradeVolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool maxTradeVolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maxTradeVolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maxTradeVolSinceVersion(); + return m_actingVersion >= maxTradeVolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maxTradeVolEncodingOffset() SBE_NOEXCEPT { - return 107; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxTradeVolEncodingOffset() SBE_NOEXCEPT + { + return 107; + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t maxTradeVolEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t maxTradeVolEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t maxTradeVol() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 107, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t maxTradeVol() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 107, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionOption41 & - maxTradeVol(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 107, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionOption41 &maxTradeVol(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 107, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char *MinPriceIncrementMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinPriceIncrementMetaAttribute(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 minPriceIncrementId() SBE_NOEXCEPT { - return 969; - } + static SBE_CONSTEXPR std::uint16_t minPriceIncrementId() SBE_NOEXCEPT + { + return 969; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minPriceIncrementSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minPriceIncrementSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool minPriceIncrementInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minPriceIncrementInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minPriceIncrementSinceVersion(); + return m_actingVersion >= minPriceIncrementSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minPriceIncrementEncodingOffset() SBE_NOEXCEPT { - return 111; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minPriceIncrementEncodingOffset() SBE_NOEXCEPT + { + return 111; + } - private: - PRICENULL m_minPriceIncrement; +private: + PRICENULL m_minPriceIncrement; - public: - SBE_NODISCARD PRICENULL &minPriceIncrement() { - m_minPriceIncrement.wrap( - m_buffer, m_offset + 111, m_actingVersion, m_bufferLength); - return m_minPriceIncrement; - } +public: + SBE_NODISCARD PRICENULL &minPriceIncrement() + { + m_minPriceIncrement.wrap(m_buffer, m_offset + 111, m_actingVersion, m_bufferLength); + return m_minPriceIncrement; + } - SBE_NODISCARD static const char *MinPriceIncrementAmountMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinPriceIncrementAmountMetaAttribute(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 minPriceIncrementAmountId() SBE_NOEXCEPT { - return 1146; - } + static SBE_CONSTEXPR std::uint16_t minPriceIncrementAmountId() SBE_NOEXCEPT + { + return 1146; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minPriceIncrementAmountSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minPriceIncrementAmountSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool minPriceIncrementAmountInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minPriceIncrementAmountInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minPriceIncrementAmountSinceVersion(); + return m_actingVersion >= minPriceIncrementAmountSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minPriceIncrementAmountEncodingOffset() SBE_NOEXCEPT { - return 119; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minPriceIncrementAmountEncodingOffset() SBE_NOEXCEPT + { + return 119; + } - private: - PRICENULL m_minPriceIncrementAmount; +private: + PRICENULL m_minPriceIncrementAmount; - public: - SBE_NODISCARD PRICENULL &minPriceIncrementAmount() { - m_minPriceIncrementAmount.wrap( - m_buffer, m_offset + 119, m_actingVersion, m_bufferLength); - return m_minPriceIncrementAmount; - } +public: + SBE_NODISCARD PRICENULL &minPriceIncrementAmount() + { + m_minPriceIncrementAmount.wrap(m_buffer, m_offset + 119, m_actingVersion, m_bufferLength); + return m_minPriceIncrementAmount; + } - SBE_NODISCARD static const char * - DisplayFactorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "float"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *DisplayFactorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t displayFactorId() SBE_NOEXCEPT { - return 9787; - } + static SBE_CONSTEXPR std::uint16_t displayFactorId() SBE_NOEXCEPT + { + return 9787; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - displayFactorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayFactorSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool displayFactorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool displayFactorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= displayFactorSinceVersion(); + return m_actingVersion >= displayFactorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - displayFactorEncodingOffset() SBE_NOEXCEPT { - return 127; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayFactorEncodingOffset() SBE_NOEXCEPT + { + return 127; + } - private: - FLOAT m_displayFactor; +private: + FLOAT m_displayFactor; - public: - SBE_NODISCARD FLOAT &displayFactor() { - m_displayFactor.wrap( - m_buffer, m_offset + 127, m_actingVersion, m_bufferLength); - return m_displayFactor; - } +public: + SBE_NODISCARD FLOAT &displayFactor() + { + m_displayFactor.wrap(m_buffer, m_offset + 127, m_actingVersion, m_bufferLength); + return m_displayFactor; + } - SBE_NODISCARD static const char * - TickRuleMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TickRuleMetaAttribute(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 tickRuleId() SBE_NOEXCEPT { return 6350; } + static SBE_CONSTEXPR std::uint16_t tickRuleId() SBE_NOEXCEPT + { + return 6350; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tickRuleSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tickRuleSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool tickRuleInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tickRuleInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tickRuleSinceVersion(); + return m_actingVersion >= tickRuleSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tickRuleEncodingOffset() SBE_NOEXCEPT { - return 135; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tickRuleEncodingOffset() SBE_NOEXCEPT + { + return 135; + } - static SBE_CONSTEXPR std::int8_t tickRuleNullValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t tickRuleNullValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::int8_t tickRuleMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + static SBE_CONSTEXPR std::int8_t tickRuleMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - static SBE_CONSTEXPR std::int8_t tickRuleMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t tickRuleMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::size_t tickRuleEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t tickRuleEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::int8_t tickRule() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 135, sizeof(std::int8_t)); - return (val); - } + SBE_NODISCARD std::int8_t tickRule() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 135, sizeof(std::int8_t)); + return (val); + } - MDInstrumentDefinitionOption41 & - tickRule(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 135, &val, sizeof(std::int8_t)); - return *this; - } + MDInstrumentDefinitionOption41 &tickRule(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 135, &val, sizeof(std::int8_t)); + return *this; + } - SBE_NODISCARD static const char * - MainFractionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MainFractionMetaAttribute(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 mainFractionId() SBE_NOEXCEPT { - return 37702; - } + static SBE_CONSTEXPR std::uint16_t mainFractionId() SBE_NOEXCEPT + { + return 37702; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mainFractionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mainFractionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool mainFractionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool mainFractionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mainFractionSinceVersion(); + return m_actingVersion >= mainFractionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mainFractionEncodingOffset() SBE_NOEXCEPT { - return 136; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mainFractionEncodingOffset() SBE_NOEXCEPT + { + return 136; + } - static SBE_CONSTEXPR std::uint8_t mainFractionNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t mainFractionNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t mainFractionMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t mainFractionMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t mainFractionMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t mainFractionMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t mainFractionEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t mainFractionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t mainFraction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 136, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t mainFraction() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 136, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionOption41 & - mainFraction(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 136, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionOption41 &mainFraction(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 136, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - SubFractionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SubFractionMetaAttribute(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 subFractionId() SBE_NOEXCEPT { - return 37703; - } + static SBE_CONSTEXPR std::uint16_t subFractionId() SBE_NOEXCEPT + { + return 37703; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - subFractionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t subFractionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool subFractionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool subFractionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= subFractionSinceVersion(); + return m_actingVersion >= subFractionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - subFractionEncodingOffset() SBE_NOEXCEPT { - return 137; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t subFractionEncodingOffset() SBE_NOEXCEPT + { + return 137; + } - static SBE_CONSTEXPR std::uint8_t subFractionNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t subFractionNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t subFractionMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t subFractionMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t subFractionMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t subFractionMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t subFractionEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t subFractionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t subFraction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 137, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t subFraction() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 137, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionOption41 & - subFraction(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 137, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionOption41 &subFraction(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 137, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *PriceDisplayFormatMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *PriceDisplayFormatMetaAttribute(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 priceDisplayFormatId() SBE_NOEXCEPT { - return 9800; - } + static SBE_CONSTEXPR std::uint16_t priceDisplayFormatId() SBE_NOEXCEPT + { + return 9800; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - priceDisplayFormatSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceDisplayFormatSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool priceDisplayFormatInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool priceDisplayFormatInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= priceDisplayFormatSinceVersion(); + return m_actingVersion >= priceDisplayFormatSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - priceDisplayFormatEncodingOffset() SBE_NOEXCEPT { - return 138; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceDisplayFormatEncodingOffset() SBE_NOEXCEPT + { + return 138; + } - static SBE_CONSTEXPR std::uint8_t - priceDisplayFormatNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - priceDisplayFormatEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t priceDisplayFormatEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t priceDisplayFormat() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 138, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t priceDisplayFormat() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 138, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionOption41 & - priceDisplayFormat(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 138, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionOption41 &priceDisplayFormat(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 138, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - UnitOfMeasureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UnitOfMeasureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t unitOfMeasureId() SBE_NOEXCEPT { - return 996; - } + static SBE_CONSTEXPR std::uint16_t unitOfMeasureId() SBE_NOEXCEPT + { + return 996; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - unitOfMeasureSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t unitOfMeasureSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool unitOfMeasureInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool unitOfMeasureInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= unitOfMeasureSinceVersion(); + return m_actingVersion >= unitOfMeasureSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - unitOfMeasureEncodingOffset() SBE_NOEXCEPT { - return 139; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingOffset() SBE_NOEXCEPT + { + return 139; + } - static SBE_CONSTEXPR char unitOfMeasureNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char unitOfMeasureNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char unitOfMeasureMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char unitOfMeasureMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char unitOfMeasureMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char unitOfMeasureMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingLength() SBE_NOEXCEPT { - return 30; - } + static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingLength() SBE_NOEXCEPT + { + return 30; + } - static SBE_CONSTEXPR std::uint64_t unitOfMeasureLength() SBE_NOEXCEPT { - return 30; - } + static SBE_CONSTEXPR std::uint64_t unitOfMeasureLength() SBE_NOEXCEPT + { + return 30; + } - SBE_NODISCARD const char *unitOfMeasure() const SBE_NOEXCEPT { - return m_buffer + m_offset + 139; - } + SBE_NODISCARD const char *unitOfMeasure() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 139; + } - SBE_NODISCARD char *unitOfMeasure() SBE_NOEXCEPT { - return m_buffer + m_offset + 139; - } + SBE_NODISCARD char *unitOfMeasure() SBE_NOEXCEPT + { + return m_buffer + m_offset + 139; + } - SBE_NODISCARD char unitOfMeasure(const std::uint64_t index) const { - if (index >= 30) { - throw std::runtime_error( - "index out of range for unitOfMeasure [E104]"); - } + SBE_NODISCARD char unitOfMeasure(const std::uint64_t index) const + { + if (index >= 30) + { + throw std::runtime_error("index out of range for unitOfMeasure [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 139 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 139 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption41 & - unitOfMeasure(const std::uint64_t index, const char value) { - if (index >= 30) { - throw std::runtime_error( - "index out of range for unitOfMeasure [E105]"); - } + MDInstrumentDefinitionOption41 &unitOfMeasure(const std::uint64_t index, const char value) + { + if (index >= 30) + { + throw std::runtime_error("index out of range for unitOfMeasure [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 139 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 139 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getUnitOfMeasure(char *const dst, const std::uint64_t length) const { - if (length > 30) { - throw std::runtime_error( - "length too large for getUnitOfMeasure [E106]"); - } + std::uint64_t getUnitOfMeasure(char *const dst, const std::uint64_t length) const + { + if (length > 30) + { + throw std::runtime_error("length too large for getUnitOfMeasure [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 139, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 139, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption41 & - putUnitOfMeasure(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 139, src, sizeof(char) * 30); - return *this; - } + MDInstrumentDefinitionOption41 &putUnitOfMeasure(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 139, src, sizeof(char) * 30); + return *this; + } - std::string getUnitOfMeasureAsString() const { - const char *buffer = m_buffer + m_offset + 139; - size_t length = 0; + SBE_NODISCARD std::string getUnitOfMeasureAsString() const + { + const char *buffer = m_buffer + m_offset + 139; + size_t length = 0; - for (; length < 30 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getUnitOfMeasureAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getUnitOfMeasureAsString(); + std::string getUnitOfMeasureAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getUnitOfMeasureAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getUnitOfMeasureAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 139; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getUnitOfMeasureAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 139; + size_t length = 0; - for (; length < 30 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption41 & - putUnitOfMeasure(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 30) { - throw std::runtime_error( - "string too large for putUnitOfMeasure [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption41 &putUnitOfMeasure(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 30) + { + throw std::runtime_error("string too large for putUnitOfMeasure [E106]"); + } - std::memcpy(m_buffer + m_offset + 139, str.data(), srcLength); - for (size_t start = srcLength; start < 30; ++start) { - m_buffer[m_offset + 139 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 139, str.data(), srcLength); + for (size_t start = srcLength; start < 30; ++start) + { + m_buffer[m_offset + 139 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption41 &putUnitOfMeasure(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 30) { - throw std::runtime_error( - "string too large for putUnitOfMeasure [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption41 &putUnitOfMeasure(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 30) + { + throw std::runtime_error("string too large for putUnitOfMeasure [E106]"); + } - std::memcpy(m_buffer + m_offset + 139, str.c_str(), srcLength); - for (size_t start = srcLength; start < 30; ++start) { - m_buffer[m_offset + 139 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 139, str.c_str(), srcLength); + for (size_t start = srcLength; start < 30; ++start) + { + m_buffer[m_offset + 139 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char *UnitOfMeasureQtyMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UnitOfMeasureQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t unitOfMeasureQtyId() SBE_NOEXCEPT { - return 1147; - } + static SBE_CONSTEXPR std::uint16_t unitOfMeasureQtyId() SBE_NOEXCEPT + { + return 1147; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - unitOfMeasureQtySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t unitOfMeasureQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool unitOfMeasureQtyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool unitOfMeasureQtyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= unitOfMeasureQtySinceVersion(); + return m_actingVersion >= unitOfMeasureQtySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - unitOfMeasureQtyEncodingOffset() SBE_NOEXCEPT { - return 169; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t unitOfMeasureQtyEncodingOffset() SBE_NOEXCEPT + { + return 169; + } - private: - PRICENULL m_unitOfMeasureQty; +private: + PRICENULL m_unitOfMeasureQty; - public: - SBE_NODISCARD PRICENULL &unitOfMeasureQty() { - m_unitOfMeasureQty.wrap( - m_buffer, m_offset + 169, m_actingVersion, m_bufferLength); - return m_unitOfMeasureQty; - } +public: + SBE_NODISCARD PRICENULL &unitOfMeasureQty() + { + m_unitOfMeasureQty.wrap(m_buffer, m_offset + 169, m_actingVersion, m_bufferLength); + return m_unitOfMeasureQty; + } - SBE_NODISCARD static const char *TradingReferencePriceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TradingReferencePriceMetaAttribute(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 tradingReferencePriceId() SBE_NOEXCEPT { - return 1150; - } + static SBE_CONSTEXPR std::uint16_t tradingReferencePriceId() SBE_NOEXCEPT + { + return 1150; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradingReferencePriceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingReferencePriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool tradingReferencePriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tradingReferencePriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tradingReferencePriceSinceVersion(); + return m_actingVersion >= tradingReferencePriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradingReferencePriceEncodingOffset() SBE_NOEXCEPT { - return 177; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingReferencePriceEncodingOffset() SBE_NOEXCEPT + { + return 177; + } - private: - PRICENULL m_tradingReferencePrice; +private: + PRICENULL m_tradingReferencePrice; - public: - SBE_NODISCARD PRICENULL &tradingReferencePrice() { - m_tradingReferencePrice.wrap( - m_buffer, m_offset + 177, m_actingVersion, m_bufferLength); - return m_tradingReferencePrice; - } +public: + SBE_NODISCARD PRICENULL &tradingReferencePrice() + { + m_tradingReferencePrice.wrap(m_buffer, m_offset + 177, m_actingVersion, m_bufferLength); + return m_tradingReferencePrice; + } - SBE_NODISCARD static const char * - SettlPriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SettlPriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT { - return 731; - } + static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT + { + return 731; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - settlPriceTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t settlPriceTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= settlPriceTypeSinceVersion(); + return m_actingVersion >= settlPriceTypeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingOffset() SBE_NOEXCEPT { - return 185; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingOffset() SBE_NOEXCEPT + { + return 185; + } - private: - SettlPriceType m_settlPriceType; +private: + SettlPriceType m_settlPriceType; - public: - SBE_NODISCARD SettlPriceType &settlPriceType() { - m_settlPriceType.wrap( - m_buffer, m_offset + 185, m_actingVersion, m_bufferLength); - return m_settlPriceType; - } +public: + SBE_NODISCARD SettlPriceType &settlPriceType() + { + m_settlPriceType.wrap(m_buffer, m_offset + 185, m_actingVersion, m_bufferLength); + return m_settlPriceType; + } - static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD static const char * - ClearedVolumeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *ClearedVolumeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t clearedVolumeId() SBE_NOEXCEPT { - return 5791; - } + static SBE_CONSTEXPR std::uint16_t clearedVolumeId() SBE_NOEXCEPT + { + return 5791; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - clearedVolumeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearedVolumeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool clearedVolumeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool clearedVolumeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= clearedVolumeSinceVersion(); + return m_actingVersion >= clearedVolumeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - clearedVolumeEncodingOffset() SBE_NOEXCEPT { - return 186; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearedVolumeEncodingOffset() SBE_NOEXCEPT + { + return 186; + } - static SBE_CONSTEXPR std::int32_t clearedVolumeNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t clearedVolumeMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t clearedVolumeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t clearedVolumeEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t clearedVolumeEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t clearedVolume() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 186, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t clearedVolume() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 186, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionOption41 & - clearedVolume(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 186, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionOption41 &clearedVolume(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 186, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char *OpenInterestQtyMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *OpenInterestQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t openInterestQtyId() SBE_NOEXCEPT { - return 5792; - } + static SBE_CONSTEXPR std::uint16_t openInterestQtyId() SBE_NOEXCEPT + { + return 5792; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - openInterestQtySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t openInterestQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool openInterestQtyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool openInterestQtyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= openInterestQtySinceVersion(); + return m_actingVersion >= openInterestQtySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - openInterestQtyEncodingOffset() SBE_NOEXCEPT { - return 190; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t openInterestQtyEncodingOffset() SBE_NOEXCEPT + { + return 190; + } - static SBE_CONSTEXPR std::int32_t openInterestQtyNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t openInterestQtyMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t openInterestQtyMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t - openInterestQtyEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t openInterestQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t openInterestQty() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 190, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t openInterestQty() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 190, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionOption41 & - openInterestQty(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 190, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionOption41 &openInterestQty(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 190, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char * - LowLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *LowLimitPriceMetaAttribute(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 lowLimitPriceId() SBE_NOEXCEPT { - return 1148; - } + static SBE_CONSTEXPR std::uint16_t lowLimitPriceId() SBE_NOEXCEPT + { + return 1148; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lowLimitPriceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lowLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lowLimitPriceSinceVersion(); + return m_actingVersion >= lowLimitPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lowLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 194; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lowLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 194; + } - private: - PRICENULL m_lowLimitPrice; +private: + PRICENULL m_lowLimitPrice; - public: - SBE_NODISCARD PRICENULL &lowLimitPrice() { - m_lowLimitPrice.wrap( - m_buffer, m_offset + 194, m_actingVersion, m_bufferLength); - return m_lowLimitPrice; - } +public: + SBE_NODISCARD PRICENULL &lowLimitPrice() + { + m_lowLimitPrice.wrap(m_buffer, m_offset + 194, m_actingVersion, m_bufferLength); + return m_lowLimitPrice; + } - SBE_NODISCARD static const char * - HighLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *HighLimitPriceMetaAttribute(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 highLimitPriceId() SBE_NOEXCEPT { - return 1149; - } + static SBE_CONSTEXPR std::uint16_t highLimitPriceId() SBE_NOEXCEPT + { + return 1149; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - highLimitPriceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t highLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= highLimitPriceSinceVersion(); + return m_actingVersion >= highLimitPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - highLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 202; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t highLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 202; + } - private: - PRICENULL m_highLimitPrice; +private: + PRICENULL m_highLimitPrice; - public: - SBE_NODISCARD PRICENULL &highLimitPrice() { - m_highLimitPrice.wrap( - m_buffer, m_offset + 202, m_actingVersion, m_bufferLength); - return m_highLimitPrice; - } +public: + SBE_NODISCARD PRICENULL &highLimitPrice() + { + m_highLimitPrice.wrap(m_buffer, m_offset + 202, m_actingVersion, m_bufferLength); + return m_highLimitPrice; + } - SBE_NODISCARD static const char *UserDefinedInstrumentMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UserDefinedInstrumentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t userDefinedInstrumentId() SBE_NOEXCEPT { - return 9779; - } + static SBE_CONSTEXPR std::uint16_t userDefinedInstrumentId() SBE_NOEXCEPT + { + return 9779; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - userDefinedInstrumentSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t userDefinedInstrumentSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool userDefinedInstrumentInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool userDefinedInstrumentInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= userDefinedInstrumentSinceVersion(); + return m_actingVersion >= userDefinedInstrumentSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - userDefinedInstrumentEncodingOffset() SBE_NOEXCEPT { - return 210; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t userDefinedInstrumentEncodingOffset() SBE_NOEXCEPT + { + return 210; + } - static SBE_CONSTEXPR char userDefinedInstrumentNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char userDefinedInstrumentNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char userDefinedInstrumentMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char userDefinedInstrumentMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char userDefinedInstrumentMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char userDefinedInstrumentMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - userDefinedInstrumentEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t userDefinedInstrumentEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD char userDefinedInstrument() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 210, sizeof(char)); - return (val); - } + SBE_NODISCARD char userDefinedInstrument() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 210, sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption41 & - userDefinedInstrument(const char value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 210, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionOption41 &userDefinedInstrument(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 210, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "LocalMktDate"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute(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 tradingReferenceDateId() SBE_NOEXCEPT { - return 5796; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateId() SBE_NOEXCEPT + { + return 5796; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradingReferenceDateSinceVersion() SBE_NOEXCEPT { - return 6; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingReferenceDateSinceVersion() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tradingReferenceDateSinceVersion(); + return m_actingVersion >= tradingReferenceDateSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingOffset() SBE_NOEXCEPT { - return 211; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingOffset() SBE_NOEXCEPT + { + return 211; + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateNullValue() SBE_NOEXCEPT { - return (std::uint16_t)65535; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT { - if (m_actingVersion < 6) { - return (std::uint16_t)65535; - } + SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT + { + if (m_actingVersion < 6) + { + return static_cast(65535); + } - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 211, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 211, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MDInstrumentDefinitionOption41 & - tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 211, &val, sizeof(std::uint16_t)); - return *this; - } + MDInstrumentDefinitionOption41 &tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 211, &val, sizeof(std::uint16_t)); + return *this; + } - class NoEvents { + class NoEvents + { 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; + 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; - } + 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 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) { + 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(9)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 9; + 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 9; + } + + 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 NoEvents &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *EventTypeMetaAttribute(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 eventTypeId() SBE_NOEXCEPT + { + return 865; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t eventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool eventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= eventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD EventType::Value eventType() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); + return EventType::get((val)); + } + + NoEvents &eventType(const EventType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *EventTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t eventTimeId() SBE_NOEXCEPT + { + return 1145; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t eventTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool eventTimeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= eventTimeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTimeEncodingOffset() SBE_NOEXCEPT + { + return 1; + } + + static SBE_CONSTEXPR std::uint64_t eventTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t eventTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t eventTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t eventTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t eventTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoEvents &eventTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint64_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoEvents writer) + { + builder << '{'; + builder << R"("EventType": )"; + builder << '"' << writer.eventType() << '"'; + + builder << ", "; + builder << R"("EventTime": )"; + builder << +writer.eventTime(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)9); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 9; - 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; - } +private: + NoEvents m_noEvents; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 9; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoEventsId() SBE_NOEXCEPT + { + return 864; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoEvents &noEvents() + { + m_noEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noEvents; + } - 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; - } + NoEvents &noEventsCount(const std::uint8_t count) + { + m_noEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noEvents; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoEvents &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - EventTypeMetaAttribute(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 eventTypeId() SBE_NOEXCEPT { - return 865; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - eventTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool eventTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noEventsInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= eventTypeSinceVersion(); + return m_actingVersion >= noEventsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD EventType::Value eventType() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); - return EventType::get((val)); - } - - NoEvents &eventType(const EventType::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - EventTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t eventTimeId() SBE_NOEXCEPT { - return 1145; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - eventTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool eventTimeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= eventTimeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTimeEncodingOffset() SBE_NOEXCEPT { - return 1; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t eventTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t eventTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoEvents &eventTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint64_t)); - return *this; - } - - template - friend std::basic_ostream & - operator<<(std::basic_ostream &builder, NoEvents writer) { - builder << '{'; - builder << R"("EventType": )"; - builder << '"' << writer.eventType() << '"'; - - builder << ", "; - builder << R"("EventTime": )"; - builder << +writer.eventTime(); - - builder << '}'; - - return builder; - } - }; - - private: - NoEvents m_noEvents; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoEventsId() SBE_NOEXCEPT { - return 864; - } - - SBE_NODISCARD inline NoEvents &noEvents() { - m_noEvents.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noEvents; - } - - NoEvents &noEventsCount(const std::uint8_t count) { - m_noEvents.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noEvents; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noEventsSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noEventsInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noEventsSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoMDFeedTypes { + class NoMDFeedTypes + { 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; + 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; - } + 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 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) { + 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 NoMDFeedTypes &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *MDFeedTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDFeedTypeId() SBE_NOEXCEPT + { + return 1022; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDFeedTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDFeedTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDFeedTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char mDFeedTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char mDFeedTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char mDFeedTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingLength() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t mDFeedTypeLength() SBE_NOEXCEPT + { + return 3; + } + + SBE_NODISCARD const char *mDFeedType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *mDFeedType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char mDFeedType(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for mDFeedType [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoMDFeedTypes &mDFeedType(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for mDFeedType [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getMDFeedType(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getMDFeedType [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoMDFeedTypes &putMDFeedType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 3); + return *this; + } + + NoMDFeedTypes &putMDFeedType( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 0, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 1, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 2, &val2, sizeof(char)); + + return *this; + } + + SBE_NODISCARD std::string getMDFeedTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getMDFeedTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMDFeedTypeAsString(); + + 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 getMDFeedTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoMDFeedTypes &putMDFeedType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putMDFeedType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoMDFeedTypes &putMDFeedType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putMDFeedType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *MarketDepthMetaAttribute(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 marketDepthId() SBE_NOEXCEPT + { + return 264; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketDepthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool marketDepthInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= marketDepthSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketDepthEncodingOffset() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::int8_t marketDepthNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t marketDepthMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t marketDepthMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t marketDepthEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t marketDepth() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 3, sizeof(std::int8_t)); + return (val); + } + + NoMDFeedTypes &marketDepth(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 3, &val, sizeof(std::int8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDFeedTypes writer) + { + builder << '{'; + builder << R"("MDFeedType": )"; + builder << '"' << + writer.getMDFeedTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("MarketDepth": )"; + builder << +writer.marketDepth(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)4); - dimensions.numInGroup((std::uint8_t)count); - m_index = 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; - } +private: + NoMDFeedTypes m_noMDFeedTypes; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 4; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDFeedTypesId() SBE_NOEXCEPT + { + return 1141; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDFeedTypes &noMDFeedTypes() + { + m_noMDFeedTypes.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDFeedTypes; + } - 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; - } + NoMDFeedTypes &noMDFeedTypesCount(const std::uint8_t count) + { + m_noMDFeedTypes.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDFeedTypes; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDFeedTypesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDFeedTypes &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - MDFeedTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDFeedTypeId() SBE_NOEXCEPT { - return 1022; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDFeedTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDFeedTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDFeedTypesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDFeedTypeSinceVersion(); + return m_actingVersion >= noMDFeedTypesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDFeedTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR char mDFeedTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char mDFeedTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char mDFeedTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingLength() SBE_NOEXCEPT { - return 3; - } - - static SBE_CONSTEXPR std::uint64_t mDFeedTypeLength() SBE_NOEXCEPT { - return 3; - } - - SBE_NODISCARD const char *mDFeedType() const SBE_NOEXCEPT { - return m_buffer + m_offset + 0; - } - - SBE_NODISCARD char *mDFeedType() SBE_NOEXCEPT { - return m_buffer + m_offset + 0; - } - - SBE_NODISCARD char mDFeedType(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error( - "index out of range for mDFeedType [E104]"); - } - - char val; - std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); - return (val); - } - - NoMDFeedTypes &mDFeedType(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error( - "index out of range for mDFeedType [E105]"); - } - - char val = (value); - std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); - return *this; - } - - std::uint64_t - getMDFeedType(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error( - "length too large for getMDFeedType [E106]"); - } - - std::memcpy( - dst, m_buffer + m_offset + 0, - sizeof(char) * static_cast(length)); - return length; - } - - NoMDFeedTypes &putMDFeedType(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 3); - return *this; - } - - NoMDFeedTypes & - putMDFeedType(const char value0, const char value1, const char value2) - SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 0, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 1, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 2, &val2, sizeof(char)); - - return *this; - } - - std::string getMDFeedTypeAsString() const { - const char *buffer = m_buffer + m_offset + 0; - size_t length = 0; - - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); - - return result; - } - - std::string getMDFeedTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getMDFeedTypeAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } - } - } - - return oss.str(); - } - -#if __cplusplus >= 201703L - std::string_view getMDFeedTypeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 0; - size_t length = 0; - - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); - - return result; - } -#endif - -#if __cplusplus >= 201703L - NoMDFeedTypes &putMDFeedType(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putMDFeedType [E106]"); - } - - std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 0 + start] = 0; - } - - return *this; - } -#else - NoMDFeedTypes &putMDFeedType(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putMDFeedType [E106]"); - } - - std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 0 + start] = 0; - } - - return *this; - } -#endif - - SBE_NODISCARD static const char * - MarketDepthMetaAttribute(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 marketDepthId() SBE_NOEXCEPT { - return 264; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - marketDepthSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool marketDepthInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= marketDepthSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - marketDepthEncodingOffset() SBE_NOEXCEPT { - return 3; - } - - static SBE_CONSTEXPR std::int8_t marketDepthNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t marketDepthMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t marketDepthMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t - marketDepthEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::int8_t marketDepth() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 3, sizeof(std::int8_t)); - return (val); - } - - NoMDFeedTypes &marketDepth(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 3, &val, sizeof(std::int8_t)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDFeedTypes writer) { - builder << '{'; - builder << R"("MDFeedType": )"; - builder << '"' << writer.getMDFeedTypeAsJsonEscapedString().c_str() - << '"'; - - builder << ", "; - builder << R"("MarketDepth": )"; - builder << +writer.marketDepth(); - - builder << '}'; - - return builder; - } - }; - - private: - NoMDFeedTypes m_noMDFeedTypes; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDFeedTypesId() SBE_NOEXCEPT { - return 1141; - } - - SBE_NODISCARD inline NoMDFeedTypes &noMDFeedTypes() { - m_noMDFeedTypes.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDFeedTypes; - } - - NoMDFeedTypes &noMDFeedTypesCount(const std::uint8_t count) { - m_noMDFeedTypes.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDFeedTypes; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDFeedTypesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDFeedTypesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDFeedTypesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoInstAttrib { + class NoInstAttrib + { 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; + 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; - } + 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 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) { + 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 NoInstAttrib &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *InstAttribTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t instAttribTypeId() SBE_NOEXCEPT + { + return 871; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t instAttribTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool instAttribTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= instAttribTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t instAttribTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t instAttribTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t instAttribType() SBE_NOEXCEPT + { + return static_cast(24); + } + + SBE_NODISCARD static const char *InstAttribValueMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t instAttribValueId() SBE_NOEXCEPT + { + return 872; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t instAttribValueSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool instAttribValueInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= instAttribValueSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t instAttribValueEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + private: + InstAttribValue m_instAttribValue; + + public: + SBE_NODISCARD InstAttribValue &instAttribValue() + { + m_instAttribValue.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_instAttribValue; + } + + static SBE_CONSTEXPR std::size_t instAttribValueEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoInstAttrib writer) + { + builder << '{'; + builder << R"("InstAttribValue": )"; + builder << writer.instAttribValue(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)4); - dimensions.numInGroup((std::uint8_t)count); - m_index = 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; - } +private: + NoInstAttrib m_noInstAttrib; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 4; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoInstAttribId() SBE_NOEXCEPT + { + return 870; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoInstAttrib &noInstAttrib() + { + m_noInstAttrib.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noInstAttrib; + } - 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; - } + NoInstAttrib &noInstAttribCount(const std::uint8_t count) + { + m_noInstAttrib.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noInstAttrib; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noInstAttribSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoInstAttrib &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char *InstAttribTypeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t instAttribTypeId() SBE_NOEXCEPT { - return 871; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - instAttribTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool instAttribTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noInstAttribInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= instAttribTypeSinceVersion(); + return m_actingVersion >= noInstAttribSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - instAttribTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t - instAttribTypeEncodingLength() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::int8_t - instAttribType() SBE_NOEXCEPT { - return (std::int8_t)24; - } - - SBE_NODISCARD static const char *InstAttribValueMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t instAttribValueId() SBE_NOEXCEPT { - return 872; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - instAttribValueSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool instAttribValueInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= instAttribValueSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - instAttribValueEncodingOffset() SBE_NOEXCEPT { - return 0; - } + } + class NoLotTypeRules + { private: - InstAttribValue m_instAttribValue; + 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: - SBE_NODISCARD InstAttribValue &instAttribValue() { - m_instAttribValue.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_instAttribValue; - } + 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; + } - static SBE_CONSTEXPR std::size_t - instAttribValueEncodingLength() SBE_NOEXCEPT { - return 4; - } + 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(5)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 5; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoInstAttrib writer) { - builder << '{'; - builder << R"("InstAttribValue": )"; - builder << writer.instAttribValue(); + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } - builder << '}'; + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 5; + } - return builder; - } - }; + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - private: - NoInstAttrib m_noInstAttrib; + // 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; + } - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoInstAttribId() SBE_NOEXCEPT { - return 870; - } + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - SBE_NODISCARD inline NoInstAttrib &noInstAttrib() { - m_noInstAttrib.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noInstAttrib; - } + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - NoInstAttrib &noInstAttribCount(const std::uint8_t count) { - m_noInstAttrib.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noInstAttrib; - } + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noInstAttribSinceVersion() SBE_NOEXCEPT { - return 0; - } + inline NoLotTypeRules &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; - SBE_NODISCARD bool noInstAttribInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noInstAttribSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } + return *this; + } - class NoLotTypeRules { - 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; + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } - SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { - return m_positionPtr; - } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - 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; - } + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - inline void wrapForEncode( - char *buffer, - const std::uint8_t count, - std::uint64_t *pos, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { + #endif + + SBE_NODISCARD static const char *LotTypeMetaAttribute(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 lotTypeId() SBE_NOEXCEPT + { + return 1093; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lotTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lotTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= lotTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lotTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int8_t lotTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t lotTypeMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t lotTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t lotTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t lotType() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int8_t)); + return (val); + } + + NoLotTypeRules &lotType(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int8_t)); + return *this; + } + + SBE_NODISCARD static const char *MinLotSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t minLotSizeId() SBE_NOEXCEPT + { + return 1231; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minLotSizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minLotSizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= minLotSizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minLotSizeEncodingOffset() SBE_NOEXCEPT + { + return 1; + } + +private: + DecimalQty m_minLotSize; + +public: + SBE_NODISCARD DecimalQty &minLotSize() + { + m_minLotSize.wrap(m_buffer, m_offset + 1, m_actingVersion, m_bufferLength); + return m_minLotSize; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoLotTypeRules writer) + { + builder << '{'; + builder << R"("LotType": )"; + builder << +writer.lotType(); + + builder << ", "; + builder << R"("MinLotSize": )"; + builder << writer.minLotSize(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)5); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 5; - 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; - } +private: + NoLotTypeRules m_noLotTypeRules; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 5; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLotTypeRulesId() SBE_NOEXCEPT + { + return 1234; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoLotTypeRules &noLotTypeRules() + { + m_noLotTypeRules.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLotTypeRules; + } - 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; - } + NoLotTypeRules &noLotTypeRulesCount(const std::uint8_t count) + { + m_noLotTypeRules.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLotTypeRules; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noLotTypeRulesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoLotTypeRules &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - LotTypeMetaAttribute(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 lotTypeId() SBE_NOEXCEPT { - return 1093; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lotTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool lotTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noLotTypeRulesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lotTypeSinceVersion(); + return m_actingVersion >= noLotTypeRulesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lotTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int8_t lotTypeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t lotTypeMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t lotTypeMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t lotTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::int8_t lotType() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int8_t)); - return (val); - } - - NoLotTypeRules &lotType(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int8_t)); - return *this; - } - - SBE_NODISCARD static const char * - MinLotSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t minLotSizeId() SBE_NOEXCEPT { - return 1231; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minLotSizeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool minLotSizeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= minLotSizeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minLotSizeEncodingOffset() SBE_NOEXCEPT { - return 1; - } + } + class NoUnderlyings + { private: - DecimalQty m_minLotSize; + 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: - SBE_NODISCARD DecimalQty &minLotSize() { - m_minLotSize.wrap( - m_buffer, m_offset + 1, m_actingVersion, m_bufferLength); - return m_minLotSize; - } + 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; + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoLotTypeRules writer) { - builder << '{'; - builder << R"("LotType": )"; - builder << +writer.lotType(); + 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(24)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 24; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } - builder << ", "; - builder << R"("MinLotSize": )"; - builder << writer.minLotSize(); + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } - builder << '}'; + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 24; + } - return builder; - } - }; + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - private: - NoLotTypeRules m_noLotTypeRules; + // 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; + } - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoLotTypeRulesId() SBE_NOEXCEPT { - return 1234; - } + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - SBE_NODISCARD inline NoLotTypeRules &noLotTypeRules() { - m_noLotTypeRules.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noLotTypeRules; - } + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - NoLotTypeRules &noLotTypeRulesCount(const std::uint8_t count) { - m_noLotTypeRules.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noLotTypeRules; - } + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noLotTypeRulesSinceVersion() SBE_NOEXCEPT { - return 0; - } + inline NoUnderlyings &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; - SBE_NODISCARD bool noLotTypeRulesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noLotTypeRulesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } + return *this; + } - class NoUnderlyings { - 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; + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } - SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { - return m_positionPtr; - } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - 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; - } + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - inline void wrapForEncode( - char *buffer, - const std::uint8_t count, - std::uint64_t *pos, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { + #endif + + SBE_NODISCARD static const char *UnderlyingSecurityIDMetaAttribute(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 underlyingSecurityIDId() SBE_NOEXCEPT + { + return 309; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t underlyingSecurityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool underlyingSecurityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= underlyingSecurityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t underlyingSecurityIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int32_t underlyingSecurityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t underlyingSecurityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t underlyingSecurityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t underlyingSecurityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t underlyingSecurityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoUnderlyings &underlyingSecurityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *UnderlyingSecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t underlyingSecurityIDSourceId() SBE_NOEXCEPT + { + return 305; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t underlyingSecurityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool underlyingSecurityIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= underlyingSecurityIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t underlyingSecurityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR char underlyingSecurityIDSourceNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char underlyingSecurityIDSourceMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char underlyingSecurityIDSourceMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t underlyingSecurityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t underlyingSecurityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *underlyingSecurityIDSource() const + { + static const std::uint8_t underlyingSecurityIDSourceValues[] = { 56 }; + + return (const char *)underlyingSecurityIDSourceValues; + } + + SBE_NODISCARD char underlyingSecurityIDSource(const std::uint64_t index) const + { + static const std::uint8_t underlyingSecurityIDSourceValues[] = { 56 }; + + return (char)underlyingSecurityIDSourceValues[index]; + } + + std::uint64_t getUnderlyingSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t underlyingSecurityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(underlyingSecurityIDSourceValues) ? length : sizeof(underlyingSecurityIDSourceValues); + + std::memcpy(dst, underlyingSecurityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getUnderlyingSecurityIDSourceAsString() const + { + static const std::uint8_t UnderlyingSecurityIDSourceValues[] = { 56 }; + + return std::string((const char *)UnderlyingSecurityIDSourceValues, 1); + } + + std::string getUnderlyingSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getUnderlyingSecurityIDSourceAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char *UnderlyingSymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t underlyingSymbolId() SBE_NOEXCEPT + { + return 311; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t underlyingSymbolSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool underlyingSymbolInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= underlyingSymbolSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t underlyingSymbolEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR char underlyingSymbolNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char underlyingSymbolMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char underlyingSymbolMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t underlyingSymbolEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t underlyingSymbolLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *underlyingSymbol() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 4; + } + + SBE_NODISCARD char *underlyingSymbol() SBE_NOEXCEPT + { + return m_buffer + m_offset + 4; + } + + SBE_NODISCARD char underlyingSymbol(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for underlyingSymbol [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 4 + (index * 1), sizeof(char)); + return (val); + } + + NoUnderlyings &underlyingSymbol(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for underlyingSymbol [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 4 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getUnderlyingSymbol(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getUnderlyingSymbol [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 4, sizeof(char) * static_cast(length)); + return length; + } + + NoUnderlyings &putUnderlyingSymbol(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 4, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getUnderlyingSymbolAsString() const + { + const char *buffer = m_buffer + m_offset + 4; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getUnderlyingSymbolAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getUnderlyingSymbolAsString(); + + 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 getUnderlyingSymbolAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 4; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoUnderlyings &putUnderlyingSymbol(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putUnderlyingSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 4, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 4 + start] = 0; + } + + return *this; + } + #else + NoUnderlyings &putUnderlyingSymbol(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putUnderlyingSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 4, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 4 + start] = 0; + } + + return *this; + } + #endif + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoUnderlyings writer) + { + builder << '{'; + builder << R"("UnderlyingSecurityID": )"; + builder << +writer.underlyingSecurityID(); + + builder << ", "; + builder << R"("UnderlyingSymbol": )"; + builder << '"' << + writer.getUnderlyingSymbolAsJsonEscapedString().c_str() << '"'; + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static std::size_t computeLength() + { #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)24); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 24; - 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; - } +private: + NoUnderlyings m_noUnderlyings; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 24; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoUnderlyingsId() SBE_NOEXCEPT + { + return 711; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoUnderlyings &noUnderlyings() + { + m_noUnderlyings.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noUnderlyings; + } - 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; - } + NoUnderlyings &noUnderlyingsCount(const std::uint8_t count) + { + m_noUnderlyings.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noUnderlyings; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noUnderlyingsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoUnderlyings &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char *UnderlyingSecurityIDMetaAttribute( - 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 underlyingSecurityIDId() SBE_NOEXCEPT { - return 309; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - underlyingSecurityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool underlyingSecurityIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noUnderlyingsInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= underlyingSecurityIDSinceVersion(); + return m_actingVersion >= noUnderlyingsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - underlyingSecurityIDEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int32_t - underlyingSecurityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t - underlyingSecurityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t - underlyingSecurityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - underlyingSecurityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t underlyingSecurityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoUnderlyings & - underlyingSecurityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char *UnderlyingSecurityIDSourceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t - underlyingSecurityIDSourceId() SBE_NOEXCEPT { - return 305; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - underlyingSecurityIDSourceSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool - underlyingSecurityIDSourceInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= underlyingSecurityIDSourceSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - underlyingSecurityIDSourceEncodingOffset() SBE_NOEXCEPT { - return 4; - } - - static SBE_CONSTEXPR char - underlyingSecurityIDSourceNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char - underlyingSecurityIDSourceMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char - underlyingSecurityIDSourceMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t - underlyingSecurityIDSourceEncodingLength() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t - underlyingSecurityIDSourceLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD const char *underlyingSecurityIDSource() const { - static const std::uint8_t underlyingSecurityIDSourceValues[] = {56}; - - return (const char *)underlyingSecurityIDSourceValues; - } - - SBE_NODISCARD char - underlyingSecurityIDSource(const std::uint64_t index) const { - static const std::uint8_t underlyingSecurityIDSourceValues[] = {56}; - - return (char)underlyingSecurityIDSourceValues[index]; - } - - std::uint64_t getUnderlyingSecurityIDSource( - char *dst, const std::uint64_t length) const { - static std::uint8_t underlyingSecurityIDSourceValues[] = {56}; - std::uint64_t bytesToCopy = - length < sizeof(underlyingSecurityIDSourceValues) - ? length - : sizeof(underlyingSecurityIDSourceValues); - - std::memcpy( - dst, underlyingSecurityIDSourceValues, - static_cast(bytesToCopy)); - return bytesToCopy; - } - - std::string getUnderlyingSecurityIDSourceAsString() const { - static const std::uint8_t UnderlyingSecurityIDSourceValues[] = {56}; - - return std::string((const char *)UnderlyingSecurityIDSourceValues, 1); - } - - std::string getUnderlyingSecurityIDSourceAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getUnderlyingSecurityIDSourceAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } - } - } - - return oss.str(); - } - - SBE_NODISCARD static const char *UnderlyingSymbolMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t underlyingSymbolId() SBE_NOEXCEPT { - return 311; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - underlyingSymbolSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool underlyingSymbolInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= underlyingSymbolSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - underlyingSymbolEncodingOffset() SBE_NOEXCEPT { - return 4; - } - - static SBE_CONSTEXPR char underlyingSymbolNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char underlyingSymbolMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char underlyingSymbolMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t - underlyingSymbolEncodingLength() SBE_NOEXCEPT { - return 20; - } - - static SBE_CONSTEXPR std::uint64_t underlyingSymbolLength() SBE_NOEXCEPT { - return 20; - } - - SBE_NODISCARD const char *underlyingSymbol() const SBE_NOEXCEPT { - return m_buffer + m_offset + 4; - } - - SBE_NODISCARD char *underlyingSymbol() SBE_NOEXCEPT { - return m_buffer + m_offset + 4; - } - - SBE_NODISCARD char underlyingSymbol(const std::uint64_t index) const { - if (index >= 20) { - throw std::runtime_error( - "index out of range for underlyingSymbol [E104]"); - } - - char val; - std::memcpy(&val, m_buffer + m_offset + 4 + (index * 1), sizeof(char)); - return (val); - } - - NoUnderlyings & - underlyingSymbol(const std::uint64_t index, const char value) { - if (index >= 20) { - throw std::runtime_error( - "index out of range for underlyingSymbol [E105]"); - } - - char val = (value); - std::memcpy(m_buffer + m_offset + 4 + (index * 1), &val, sizeof(char)); - return *this; - } - - std::uint64_t - getUnderlyingSymbol(char *const dst, const std::uint64_t length) const { - if (length > 20) { - throw std::runtime_error( - "length too large for getUnderlyingSymbol [E106]"); - } - - std::memcpy( - dst, m_buffer + m_offset + 4, - sizeof(char) * static_cast(length)); - return length; - } - - NoUnderlyings &putUnderlyingSymbol(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 4, src, sizeof(char) * 20); - return *this; - } - - std::string getUnderlyingSymbolAsString() const { - const char *buffer = m_buffer + m_offset + 4; - size_t length = 0; - - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); - - return result; - } - - std::string getUnderlyingSymbolAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getUnderlyingSymbolAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } - } - } - - return oss.str(); - } - -#if __cplusplus >= 201703L - std::string_view getUnderlyingSymbolAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 4; - size_t length = 0; - - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); - - return result; - } -#endif - -#if __cplusplus >= 201703L - NoUnderlyings &putUnderlyingSymbol(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error( - "string too large for putUnderlyingSymbol [E106]"); - } - - std::memcpy(m_buffer + m_offset + 4, str.data(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 4 + start] = 0; - } - - return *this; - } -#else - NoUnderlyings &putUnderlyingSymbol(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error( - "string too large for putUnderlyingSymbol [E106]"); - } - - std::memcpy(m_buffer + m_offset + 4, str.c_str(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 4 + start] = 0; - } - - return *this; - } -#endif - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoUnderlyings writer) { - builder << '{'; - builder << R"("UnderlyingSecurityID": )"; - builder << +writer.underlyingSecurityID(); - - builder << ", "; - builder << R"("UnderlyingSymbol": )"; - builder << '"' - << writer.getUnderlyingSymbolAsJsonEscapedString().c_str() - << '"'; - - builder << '}'; - - return builder; - } - }; - - private: - NoUnderlyings m_noUnderlyings; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoUnderlyingsId() SBE_NOEXCEPT { - return 711; - } - - SBE_NODISCARD inline NoUnderlyings &noUnderlyings() { - m_noUnderlyings.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noUnderlyings; - } - - NoUnderlyings &noUnderlyingsCount(const std::uint8_t count) { - m_noUnderlyings.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noUnderlyings; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noUnderlyingsSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noUnderlyingsInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noUnderlyingsSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoRelatedInstruments { + class NoRelatedInstruments + { 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; + 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; - } + 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 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) { + 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(24)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 24; + 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 24; + } + + 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 NoRelatedInstruments &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *RelatedSecurityIDMetaAttribute(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 relatedSecurityIDId() SBE_NOEXCEPT + { + return 1650; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t relatedSecurityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool relatedSecurityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= relatedSecurityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t relatedSecurityIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int32_t relatedSecurityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t relatedSecurityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t relatedSecurityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t relatedSecurityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t relatedSecurityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoRelatedInstruments &relatedSecurityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *RelatedSecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t relatedSecurityIDSourceId() SBE_NOEXCEPT + { + return 1651; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t relatedSecurityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool relatedSecurityIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= relatedSecurityIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t relatedSecurityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR char relatedSecurityIDSourceNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char relatedSecurityIDSourceMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char relatedSecurityIDSourceMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t relatedSecurityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t relatedSecurityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *relatedSecurityIDSource() const + { + static const std::uint8_t relatedSecurityIDSourceValues[] = { 56 }; + + return (const char *)relatedSecurityIDSourceValues; + } + + SBE_NODISCARD char relatedSecurityIDSource(const std::uint64_t index) const + { + static const std::uint8_t relatedSecurityIDSourceValues[] = { 56 }; + + return (char)relatedSecurityIDSourceValues[index]; + } + + std::uint64_t getRelatedSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t relatedSecurityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(relatedSecurityIDSourceValues) ? length : sizeof(relatedSecurityIDSourceValues); + + std::memcpy(dst, relatedSecurityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getRelatedSecurityIDSourceAsString() const + { + static const std::uint8_t RelatedSecurityIDSourceValues[] = { 56 }; + + return std::string((const char *)RelatedSecurityIDSourceValues, 1); + } + + std::string getRelatedSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getRelatedSecurityIDSourceAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char *RelatedSymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t relatedSymbolId() SBE_NOEXCEPT + { + return 1649; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t relatedSymbolSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool relatedSymbolInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= relatedSymbolSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t relatedSymbolEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR char relatedSymbolNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char relatedSymbolMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char relatedSymbolMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t relatedSymbolEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t relatedSymbolLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *relatedSymbol() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 4; + } + + SBE_NODISCARD char *relatedSymbol() SBE_NOEXCEPT + { + return m_buffer + m_offset + 4; + } + + SBE_NODISCARD char relatedSymbol(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for relatedSymbol [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 4 + (index * 1), sizeof(char)); + return (val); + } + + NoRelatedInstruments &relatedSymbol(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for relatedSymbol [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 4 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getRelatedSymbol(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getRelatedSymbol [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 4, sizeof(char) * static_cast(length)); + return length; + } + + NoRelatedInstruments &putRelatedSymbol(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 4, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getRelatedSymbolAsString() const + { + const char *buffer = m_buffer + m_offset + 4; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getRelatedSymbolAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getRelatedSymbolAsString(); + + 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 getRelatedSymbolAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 4; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoRelatedInstruments &putRelatedSymbol(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putRelatedSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 4, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 4 + start] = 0; + } + + return *this; + } + #else + NoRelatedInstruments &putRelatedSymbol(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putRelatedSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 4, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 4 + start] = 0; + } + + return *this; + } + #endif + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoRelatedInstruments writer) + { + builder << '{'; + builder << R"("RelatedSecurityID": )"; + builder << +writer.relatedSecurityID(); + + builder << ", "; + builder << R"("RelatedSymbol": )"; + builder << '"' << + writer.getRelatedSymbolAsJsonEscapedString().c_str() << '"'; + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static std::size_t computeLength() + { #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)24); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 24; - 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; - } +private: + NoRelatedInstruments m_noRelatedInstruments; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 24; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoRelatedInstrumentsId() SBE_NOEXCEPT + { + return 1647; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoRelatedInstruments &noRelatedInstruments() + { + m_noRelatedInstruments.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noRelatedInstruments; + } - 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; - } + NoRelatedInstruments &noRelatedInstrumentsCount(const std::uint8_t count) + { + m_noRelatedInstruments.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noRelatedInstruments; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noRelatedInstrumentsSinceVersion() SBE_NOEXCEPT + { + return 7; + } - 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 NoRelatedInstruments &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char *RelatedSecurityIDMetaAttribute( - 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 relatedSecurityIDId() SBE_NOEXCEPT { - return 1650; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - relatedSecurityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool relatedSecurityIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noRelatedInstrumentsInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= relatedSecurityIDSinceVersion(); + return m_actingVersion >= noRelatedInstrumentsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - relatedSecurityIDEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int32_t - relatedSecurityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t - relatedSecurityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t - relatedSecurityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - relatedSecurityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t relatedSecurityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoRelatedInstruments & - relatedSecurityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char *RelatedSecurityIDSourceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t - relatedSecurityIDSourceId() SBE_NOEXCEPT { - return 1651; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - relatedSecurityIDSourceSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool relatedSecurityIDSourceInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= relatedSecurityIDSourceSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - relatedSecurityIDSourceEncodingOffset() SBE_NOEXCEPT { - return 4; - } - - static SBE_CONSTEXPR char - relatedSecurityIDSourceNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char relatedSecurityIDSourceMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char relatedSecurityIDSourceMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t - relatedSecurityIDSourceEncodingLength() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t - relatedSecurityIDSourceLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD const char *relatedSecurityIDSource() const { - static const std::uint8_t relatedSecurityIDSourceValues[] = {56}; - - return (const char *)relatedSecurityIDSourceValues; - } - - SBE_NODISCARD char - relatedSecurityIDSource(const std::uint64_t index) const { - static const std::uint8_t relatedSecurityIDSourceValues[] = {56}; - - return (char)relatedSecurityIDSourceValues[index]; - } - - std::uint64_t - getRelatedSecurityIDSource(char *dst, const std::uint64_t length) const { - static std::uint8_t relatedSecurityIDSourceValues[] = {56}; - std::uint64_t bytesToCopy = - length < sizeof(relatedSecurityIDSourceValues) - ? length - : sizeof(relatedSecurityIDSourceValues); - - std::memcpy( - dst, relatedSecurityIDSourceValues, - static_cast(bytesToCopy)); - return bytesToCopy; - } - - std::string getRelatedSecurityIDSourceAsString() const { - static const std::uint8_t RelatedSecurityIDSourceValues[] = {56}; - - return std::string((const char *)RelatedSecurityIDSourceValues, 1); - } - - std::string getRelatedSecurityIDSourceAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getRelatedSecurityIDSourceAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } - } - } - - return oss.str(); - } - - SBE_NODISCARD static const char *RelatedSymbolMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t relatedSymbolId() SBE_NOEXCEPT { - return 1649; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - relatedSymbolSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool relatedSymbolInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= relatedSymbolSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - relatedSymbolEncodingOffset() SBE_NOEXCEPT { - return 4; - } - - static SBE_CONSTEXPR char relatedSymbolNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char relatedSymbolMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char relatedSymbolMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t - relatedSymbolEncodingLength() SBE_NOEXCEPT { - return 20; - } - - static SBE_CONSTEXPR std::uint64_t relatedSymbolLength() SBE_NOEXCEPT { - return 20; - } - - SBE_NODISCARD const char *relatedSymbol() const SBE_NOEXCEPT { - return m_buffer + m_offset + 4; - } - - SBE_NODISCARD char *relatedSymbol() SBE_NOEXCEPT { - return m_buffer + m_offset + 4; - } - - SBE_NODISCARD char relatedSymbol(const std::uint64_t index) const { - if (index >= 20) { - throw std::runtime_error( - "index out of range for relatedSymbol [E104]"); - } - - char val; - std::memcpy(&val, m_buffer + m_offset + 4 + (index * 1), sizeof(char)); - return (val); - } - - NoRelatedInstruments & - relatedSymbol(const std::uint64_t index, const char value) { - if (index >= 20) { - throw std::runtime_error( - "index out of range for relatedSymbol [E105]"); - } - - char val = (value); - std::memcpy(m_buffer + m_offset + 4 + (index * 1), &val, sizeof(char)); - return *this; - } - - std::uint64_t - getRelatedSymbol(char *const dst, const std::uint64_t length) const { - if (length > 20) { - throw std::runtime_error( - "length too large for getRelatedSymbol [E106]"); - } - - std::memcpy( - dst, m_buffer + m_offset + 4, - sizeof(char) * static_cast(length)); - return length; - } - - NoRelatedInstruments & - putRelatedSymbol(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 4, src, sizeof(char) * 20); - return *this; - } - - std::string getRelatedSymbolAsString() const { - const char *buffer = m_buffer + m_offset + 4; - size_t length = 0; - - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); - - return result; - } - - std::string getRelatedSymbolAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getRelatedSymbolAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } - } - } - - return oss.str(); - } - -#if __cplusplus >= 201703L - std::string_view getRelatedSymbolAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 4; - size_t length = 0; - - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); - - return result; - } -#endif - -#if __cplusplus >= 201703L - NoRelatedInstruments &putRelatedSymbol(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error( - "string too large for putRelatedSymbol [E106]"); - } - - std::memcpy(m_buffer + m_offset + 4, str.data(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 4 + start] = 0; - } - - return *this; - } -#else - NoRelatedInstruments &putRelatedSymbol(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error( - "string too large for putRelatedSymbol [E106]"); - } - - std::memcpy(m_buffer + m_offset + 4, str.c_str(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 4 + start] = 0; - } - - return *this; - } -#endif - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - NoRelatedInstruments writer) { - builder << '{'; - builder << R"("RelatedSecurityID": )"; - builder << +writer.relatedSecurityID(); - - builder << ", "; - builder << R"("RelatedSymbol": )"; - builder << '"' << writer.getRelatedSymbolAsJsonEscapedString().c_str() - << '"'; - - builder << '}'; - - return builder; - } - }; - - private: - NoRelatedInstruments m_noRelatedInstruments; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoRelatedInstrumentsId() SBE_NOEXCEPT { - return 1647; - } - - SBE_NODISCARD inline NoRelatedInstruments &noRelatedInstruments() { - m_noRelatedInstruments.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noRelatedInstruments; - } - - NoRelatedInstruments &noRelatedInstrumentsCount(const std::uint8_t count) { - m_noRelatedInstruments.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noRelatedInstruments; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noRelatedInstrumentsSinceVersion() SBE_NOEXCEPT { - return 7; - } - - SBE_NODISCARD bool noRelatedInstrumentsInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noRelatedInstrumentsSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDInstrumentDefinitionOption41 _writer) { - MDInstrumentDefinitionOption41 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDInstrumentDefinitionOption41", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); - - builder << ", "; - builder << R"("TotNumReports": )"; - builder << +writer.totNumReports(); - - builder << ", "; - builder << R"("SecurityUpdateAction": )"; - builder << '"' << writer.securityUpdateAction() << '"'; - - builder << ", "; - builder << R"("LastUpdateTime": )"; - builder << +writer.lastUpdateTime(); - - builder << ", "; - builder << R"("MDSecurityTradingStatus": )"; - builder << '"' << writer.mDSecurityTradingStatus() << '"'; - - builder << ", "; - builder << R"("ApplID": )"; - builder << +writer.applID(); - - builder << ", "; - builder << R"("MarketSegmentID": )"; - builder << +writer.marketSegmentID(); - - builder << ", "; - builder << R"("UnderlyingProduct": )"; - builder << +writer.underlyingProduct(); - - builder << ", "; - builder << R"("SecurityExchange": )"; - builder << '"' << writer.getSecurityExchangeAsJsonEscapedString().c_str() - << '"'; - - builder << ", "; - builder << R"("SecurityGroup": )"; - builder << '"' << writer.getSecurityGroupAsJsonEscapedString().c_str() - << '"'; - - builder << ", "; - builder << R"("Asset": )"; - builder << '"' << writer.getAssetAsJsonEscapedString().c_str() << '"'; - - builder << ", "; - builder << R"("Symbol": )"; - builder << '"' << writer.getSymbolAsJsonEscapedString().c_str() << '"'; - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("SecurityType": )"; - builder << '"' << writer.getSecurityTypeAsJsonEscapedString().c_str() - << '"'; - - builder << ", "; - builder << R"("CFICode": )"; - builder << '"' << writer.getCFICodeAsJsonEscapedString().c_str() << '"'; - - builder << ", "; - builder << R"("PutOrCall": )"; - builder << '"' << writer.putOrCall() << '"'; - - builder << ", "; - builder << R"("MaturityMonthYear": )"; - builder << writer.maturityMonthYear(); - - builder << ", "; - builder << R"("Currency": )"; - builder << '"' << writer.getCurrencyAsJsonEscapedString().c_str() << '"'; - - builder << ", "; - builder << R"("StrikePrice": )"; - builder << writer.strikePrice(); - - builder << ", "; - builder << R"("StrikeCurrency": )"; - builder << '"' << writer.getStrikeCurrencyAsJsonEscapedString().c_str() - << '"'; - - builder << ", "; - builder << R"("SettlCurrency": )"; - builder << '"' << writer.getSettlCurrencyAsJsonEscapedString().c_str() - << '"'; - - builder << ", "; - builder << R"("MinCabPrice": )"; - builder << writer.minCabPrice(); - - builder << ", "; - builder << R"("MatchAlgorithm": )"; - if (std::isprint(writer.matchAlgorithm())) { - builder << '"' << (char)writer.matchAlgorithm() << '"'; - } else { - builder << (int)writer.matchAlgorithm(); - } - - builder << ", "; - builder << R"("MinTradeVol": )"; - builder << +writer.minTradeVol(); - - builder << ", "; - builder << R"("MaxTradeVol": )"; - builder << +writer.maxTradeVol(); - - builder << ", "; - builder << R"("MinPriceIncrement": )"; - builder << writer.minPriceIncrement(); - - builder << ", "; - builder << R"("MinPriceIncrementAmount": )"; - builder << writer.minPriceIncrementAmount(); - - builder << ", "; - builder << R"("DisplayFactor": )"; - builder << writer.displayFactor(); - - builder << ", "; - builder << R"("TickRule": )"; - builder << +writer.tickRule(); - - builder << ", "; - builder << R"("MainFraction": )"; - builder << +writer.mainFraction(); - - builder << ", "; - builder << R"("SubFraction": )"; - builder << +writer.subFraction(); - - builder << ", "; - builder << R"("PriceDisplayFormat": )"; - builder << +writer.priceDisplayFormat(); - - builder << ", "; - builder << R"("UnitOfMeasure": )"; - builder << '"' << writer.getUnitOfMeasureAsJsonEscapedString().c_str() - << '"'; - - builder << ", "; - builder << R"("UnitOfMeasureQty": )"; - builder << writer.unitOfMeasureQty(); - - builder << ", "; - builder << R"("TradingReferencePrice": )"; - builder << writer.tradingReferencePrice(); - - builder << ", "; - builder << R"("SettlPriceType": )"; - builder << writer.settlPriceType(); - - builder << ", "; - builder << R"("ClearedVolume": )"; - builder << +writer.clearedVolume(); - - builder << ", "; - builder << R"("OpenInterestQty": )"; - builder << +writer.openInterestQty(); - - builder << ", "; - builder << R"("LowLimitPrice": )"; - builder << writer.lowLimitPrice(); - - builder << ", "; - builder << R"("HighLimitPrice": )"; - builder << writer.highLimitPrice(); - - builder << ", "; - builder << R"("UserDefinedInstrument": )"; - if (std::isprint(writer.userDefinedInstrument())) { - builder << '"' << (char)writer.userDefinedInstrument() << '"'; - } else { - builder << (int)writer.userDefinedInstrument(); - } - - builder << ", "; - builder << R"("TradingReferenceDate": )"; - builder << +writer.tradingReferenceDate(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoEvents": [)"; - writer.noEvents().forEach([&](NoEvents &noEvents) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDInstrumentDefinitionOption41 _writer) +{ + MDInstrumentDefinitionOption41 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDInstrumentDefinitionOption41", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); + + builder << ", "; + builder << R"("TotNumReports": )"; + builder << +writer.totNumReports(); + + builder << ", "; + builder << R"("SecurityUpdateAction": )"; + builder << '"' << writer.securityUpdateAction() << '"'; + + builder << ", "; + builder << R"("LastUpdateTime": )"; + builder << +writer.lastUpdateTime(); + + builder << ", "; + builder << R"("MDSecurityTradingStatus": )"; + builder << '"' << writer.mDSecurityTradingStatus() << '"'; + + builder << ", "; + builder << R"("ApplID": )"; + builder << +writer.applID(); + + builder << ", "; + builder << R"("MarketSegmentID": )"; + builder << +writer.marketSegmentID(); + + builder << ", "; + builder << R"("UnderlyingProduct": )"; + builder << +writer.underlyingProduct(); + + builder << ", "; + builder << R"("SecurityExchange": )"; + builder << '"' << + writer.getSecurityExchangeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Asset": )"; + builder << '"' << + writer.getAssetAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Symbol": )"; + builder << '"' << + writer.getSymbolAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("SecurityType": )"; + builder << '"' << + writer.getSecurityTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("CFICode": )"; + builder << '"' << + writer.getCFICodeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PutOrCall": )"; + builder << '"' << writer.putOrCall() << '"'; + + builder << ", "; + builder << R"("MaturityMonthYear": )"; + builder << writer.maturityMonthYear(); + + builder << ", "; + builder << R"("Currency": )"; + builder << '"' << + writer.getCurrencyAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("StrikePrice": )"; + builder << writer.strikePrice(); + + builder << ", "; + builder << R"("StrikeCurrency": )"; + builder << '"' << + writer.getStrikeCurrencyAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SettlCurrency": )"; + builder << '"' << + writer.getSettlCurrencyAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("MinCabPrice": )"; + builder << writer.minCabPrice(); + + builder << ", "; + builder << R"("MatchAlgorithm": )"; + if (std::isprint(writer.matchAlgorithm())) + { + builder << '"' << (char)writer.matchAlgorithm() << '"'; + } + else + { + builder << (int)writer.matchAlgorithm(); + } + + builder << ", "; + builder << R"("MinTradeVol": )"; + builder << +writer.minTradeVol(); + + builder << ", "; + builder << R"("MaxTradeVol": )"; + builder << +writer.maxTradeVol(); + + builder << ", "; + builder << R"("MinPriceIncrement": )"; + builder << writer.minPriceIncrement(); + + builder << ", "; + builder << R"("MinPriceIncrementAmount": )"; + builder << writer.minPriceIncrementAmount(); + + builder << ", "; + builder << R"("DisplayFactor": )"; + builder << writer.displayFactor(); + + builder << ", "; + builder << R"("TickRule": )"; + builder << +writer.tickRule(); + + builder << ", "; + builder << R"("MainFraction": )"; + builder << +writer.mainFraction(); + + builder << ", "; + builder << R"("SubFraction": )"; + builder << +writer.subFraction(); + + builder << ", "; + builder << R"("PriceDisplayFormat": )"; + builder << +writer.priceDisplayFormat(); + + builder << ", "; + builder << R"("UnitOfMeasure": )"; + builder << '"' << + writer.getUnitOfMeasureAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("UnitOfMeasureQty": )"; + builder << writer.unitOfMeasureQty(); + + builder << ", "; + builder << R"("TradingReferencePrice": )"; + builder << writer.tradingReferencePrice(); + + builder << ", "; + builder << R"("SettlPriceType": )"; + builder << writer.settlPriceType(); + + builder << ", "; + builder << R"("ClearedVolume": )"; + builder << +writer.clearedVolume(); + + builder << ", "; + builder << R"("OpenInterestQty": )"; + builder << +writer.openInterestQty(); + + builder << ", "; + builder << R"("LowLimitPrice": )"; + builder << writer.lowLimitPrice(); + + builder << ", "; + builder << R"("HighLimitPrice": )"; + builder << writer.highLimitPrice(); + + builder << ", "; + builder << R"("UserDefinedInstrument": )"; + if (std::isprint(writer.userDefinedInstrument())) + { + builder << '"' << (char)writer.userDefinedInstrument() << '"'; + } + else + { + builder << (int)writer.userDefinedInstrument(); + } + + builder << ", "; + builder << R"("TradingReferenceDate": )"; + builder << +writer.tradingReferenceDate(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoEvents": [)"; + writer.noEvents().forEach([&](NoEvents& noEvents) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noEvents; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDFeedTypes": [)"; - writer.noMDFeedTypes().forEach([&](NoMDFeedTypes &noMDFeedTypes) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDFeedTypes": [)"; + writer.noMDFeedTypes().forEach([&](NoMDFeedTypes& noMDFeedTypes) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDFeedTypes; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoInstAttrib": [)"; - writer.noInstAttrib().forEach([&](NoInstAttrib &noInstAttrib) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoInstAttrib": [)"; + writer.noInstAttrib().forEach([&](NoInstAttrib& noInstAttrib) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noInstAttrib; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoLotTypeRules": [)"; - writer.noLotTypeRules().forEach([&](NoLotTypeRules &noLotTypeRules) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoLotTypeRules": [)"; + writer.noLotTypeRules().forEach([&](NoLotTypeRules& noLotTypeRules) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noLotTypeRules; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoUnderlyings": [)"; - writer.noUnderlyings().forEach([&](NoUnderlyings &noUnderlyings) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoUnderlyings": [)"; + writer.noUnderlyings().forEach([&](NoUnderlyings& noUnderlyings) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noUnderlyings; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoRelatedInstruments": [)"; - writer.noRelatedInstruments().forEach( - [&](NoRelatedInstruments &noRelatedInstruments) { - if (atLeastOne) { - builder << ", "; - } - atLeastOne = true; - builder << noRelatedInstruments; - }); - builder << ']'; - } + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoRelatedInstruments": [)"; + writer.noRelatedInstruments().forEach([&](NoRelatedInstruments& noRelatedInstruments) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noRelatedInstruments; + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noEvents().forEach([](NoEvents e) + { + e.skip(); + }); + noMDFeedTypes().forEach([](NoMDFeedTypes e) + { + e.skip(); + }); + noInstAttrib().forEach([](NoInstAttrib e) + { + e.skip(); + }); + noLotTypeRules().forEach([](NoLotTypeRules e) + { + e.skip(); + }); + noUnderlyings().forEach([](NoUnderlyings e) + { + e.skip(); + }); + noRelatedInstruments().forEach([](NoRelatedInstruments e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength( + std::size_t noEventsLength = 0, + std::size_t noMDFeedTypesLength = 0, + std::size_t noInstAttribLength = 0, + std::size_t noLotTypeRulesLength = 0, + std::size_t noUnderlyingsLength = 0, + std::size_t noRelatedInstrumentsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoEvents::sbeHeaderSize(); + if (noEventsLength > 254LL) + { + throw std::runtime_error("noEventsLength outside of allowed range [E110]"); + } + length += noEventsLength *NoEvents::sbeBlockLength(); + + length += NoMDFeedTypes::sbeHeaderSize(); + if (noMDFeedTypesLength > 254LL) + { + throw std::runtime_error("noMDFeedTypesLength outside of allowed range [E110]"); + } + length += noMDFeedTypesLength *NoMDFeedTypes::sbeBlockLength(); + + length += NoInstAttrib::sbeHeaderSize(); + if (noInstAttribLength > 254LL) + { + throw std::runtime_error("noInstAttribLength outside of allowed range [E110]"); + } + length += noInstAttribLength *NoInstAttrib::sbeBlockLength(); + + length += NoLotTypeRules::sbeHeaderSize(); + if (noLotTypeRulesLength > 254LL) + { + throw std::runtime_error("noLotTypeRulesLength outside of allowed range [E110]"); + } + length += noLotTypeRulesLength *NoLotTypeRules::sbeBlockLength(); + + length += NoUnderlyings::sbeHeaderSize(); + if (noUnderlyingsLength > 254LL) + { + throw std::runtime_error("noUnderlyingsLength outside of allowed range [E110]"); + } + length += noUnderlyingsLength *NoUnderlyings::sbeBlockLength(); + + length += NoRelatedInstruments::sbeHeaderSize(); + if (noRelatedInstrumentsLength > 254LL) + { + throw std::runtime_error("noRelatedInstrumentsLength outside of allowed range [E110]"); + } + length += noRelatedInstrumentsLength *NoRelatedInstruments::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionOption55.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionOption55.h index aaea1c4b0..c2763e12c 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionOption55.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionOption55.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,7085 +86,7693 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDInstrumentDefinitionOption55 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDInstrumentDefinitionOption55 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(213); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(55); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDInstrumentDefinitionOption55() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDInstrumentDefinitionOption55( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDInstrumentDefinitionOption55( - char *buffer, const std::uint64_t bufferLength) - : MDInstrumentDefinitionOption55( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDInstrumentDefinitionOption55() = default; - MDInstrumentDefinitionOption55( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDInstrumentDefinitionOption55( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDInstrumentDefinitionOption55( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)213; - } + MDInstrumentDefinitionOption55(char *buffer, const std::uint64_t bufferLength) : + MDInstrumentDefinitionOption55(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)55; - } + MDInstrumentDefinitionOption55( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDInstrumentDefinitionOption55(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(213); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "d"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(55); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDInstrumentDefinitionOption55 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDInstrumentDefinitionOption55( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDInstrumentDefinitionOption55 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "d"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDInstrumentDefinitionOption55( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDInstrumentDefinitionOption55 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDInstrumentDefinitionOption55(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDInstrumentDefinitionOption55 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDInstrumentDefinitionOption55( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDInstrumentDefinitionOption55 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDInstrumentDefinitionOption55( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDInstrumentDefinitionOption55 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDInstrumentDefinitionOption55(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDInstrumentDefinitionOption55 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD static const char * - TotNumReportsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TotNumReportsMetaAttribute(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 totNumReportsId() SBE_NOEXCEPT { - return 911; - } + static SBE_CONSTEXPR std::uint16_t totNumReportsId() SBE_NOEXCEPT + { + return 911; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - totNumReportsSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNumReportsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= totNumReportsSinceVersion(); + return m_actingVersion >= totNumReportsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - totNumReportsEncodingOffset() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNumReportsEncodingOffset() SBE_NOEXCEPT + { + return 1; + } - static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT { - return 4294967295; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT + { + return UINT32_C(0xffffffff); + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionOption55 & - totNumReports(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionOption55 &totNumReports(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityUpdateActionMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityUpdateActionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityUpdateActionId() SBE_NOEXCEPT { - return 980; - } + static SBE_CONSTEXPR std::uint16_t securityUpdateActionId() SBE_NOEXCEPT + { + return 980; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityUpdateActionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityUpdateActionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityUpdateActionSinceVersion(); + return m_actingVersion >= securityUpdateActionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 5; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 5; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD SecurityUpdateAction::Value - securityUpdateAction() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 5, sizeof(char)); - return SecurityUpdateAction::get((val)); - } + SBE_NODISCARD SecurityUpdateAction::Value securityUpdateAction() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 5, sizeof(char)); + return SecurityUpdateAction::get((val)); + } - MDInstrumentDefinitionOption55 & - securityUpdateAction(const SecurityUpdateAction::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 5, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionOption55 &securityUpdateAction(const SecurityUpdateAction::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 5, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char * - LastUpdateTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *LastUpdateTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t lastUpdateTimeId() SBE_NOEXCEPT { - return 779; - } + static SBE_CONSTEXPR std::uint16_t lastUpdateTimeId() SBE_NOEXCEPT + { + return 779; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lastUpdateTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastUpdateTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool lastUpdateTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool lastUpdateTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lastUpdateTimeSinceVersion(); + return m_actingVersion >= lastUpdateTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lastUpdateTimeEncodingOffset() SBE_NOEXCEPT { - return 6; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastUpdateTimeEncodingOffset() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t - lastUpdateTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t lastUpdateTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t lastUpdateTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 6, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t lastUpdateTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 6, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - MDInstrumentDefinitionOption55 & - lastUpdateTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 6, &val, sizeof(std::uint64_t)); - return *this; - } + MDInstrumentDefinitionOption55 &lastUpdateTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 6, &val, sizeof(std::uint64_t)); + return *this; + } - SBE_NODISCARD static const char *MDSecurityTradingStatusMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MDSecurityTradingStatusMetaAttribute(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 mDSecurityTradingStatusId() SBE_NOEXCEPT { - return 1682; - } + static SBE_CONSTEXPR std::uint16_t mDSecurityTradingStatusId() SBE_NOEXCEPT + { + return 1682; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDSecurityTradingStatusSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDSecurityTradingStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool mDSecurityTradingStatusInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool mDSecurityTradingStatusInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDSecurityTradingStatusSinceVersion(); + return m_actingVersion >= mDSecurityTradingStatusSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDSecurityTradingStatusEncodingOffset() SBE_NOEXCEPT { - return 14; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDSecurityTradingStatusEncodingOffset() SBE_NOEXCEPT + { + return 14; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDSecurityTradingStatusEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDSecurityTradingStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD SecurityTradingStatus::Value - mDSecurityTradingStatus() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); - return SecurityTradingStatus::get((val)); - } + SBE_NODISCARD SecurityTradingStatus::Value mDSecurityTradingStatus() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return SecurityTradingStatus::get((val)); + } - MDInstrumentDefinitionOption55 &mDSecurityTradingStatus( - const SecurityTradingStatus::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionOption55 &mDSecurityTradingStatus(const SecurityTradingStatus::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - ApplIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *ApplIDMetaAttribute(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 applIDId() SBE_NOEXCEPT { return 1180; } + static SBE_CONSTEXPR std::uint16_t applIDId() SBE_NOEXCEPT + { + return 1180; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - applIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t applIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool applIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool applIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= applIDSinceVersion(); + return m_actingVersion >= applIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - applIDEncodingOffset() SBE_NOEXCEPT { - return 15; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t applIDEncodingOffset() SBE_NOEXCEPT + { + return 15; + } - static SBE_CONSTEXPR std::int16_t applIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT16; - } + static SBE_CONSTEXPR std::int16_t applIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT16; + } - static SBE_CONSTEXPR std::int16_t applIDMinValue() SBE_NOEXCEPT { - return (std::int16_t)-32767; - } + static SBE_CONSTEXPR std::int16_t applIDMinValue() SBE_NOEXCEPT + { + return static_cast(-32767); + } - static SBE_CONSTEXPR std::int16_t applIDMaxValue() SBE_NOEXCEPT { - return (std::int16_t)32767; - } + static SBE_CONSTEXPR std::int16_t applIDMaxValue() SBE_NOEXCEPT + { + return static_cast(32767); + } - static SBE_CONSTEXPR std::size_t applIDEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t applIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::int16_t applID() const SBE_NOEXCEPT { - std::int16_t val; - std::memcpy(&val, m_buffer + m_offset + 15, sizeof(std::int16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::int16_t applID() const SBE_NOEXCEPT + { + std::int16_t val; + std::memcpy(&val, m_buffer + m_offset + 15, sizeof(std::int16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MDInstrumentDefinitionOption55 & - applID(const std::int16_t value) SBE_NOEXCEPT { - std::int16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 15, &val, sizeof(std::int16_t)); - return *this; - } + MDInstrumentDefinitionOption55 &applID(const std::int16_t value) SBE_NOEXCEPT + { + std::int16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 15, &val, sizeof(std::int16_t)); + return *this; + } - SBE_NODISCARD static const char *MarketSegmentIDMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MarketSegmentIDMetaAttribute(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 marketSegmentIDId() SBE_NOEXCEPT { - return 1300; - } + static SBE_CONSTEXPR std::uint16_t marketSegmentIDId() SBE_NOEXCEPT + { + return 1300; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - marketSegmentIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketSegmentIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= marketSegmentIDSinceVersion(); + return m_actingVersion >= marketSegmentIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - marketSegmentIDEncodingOffset() SBE_NOEXCEPT { - return 17; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingOffset() SBE_NOEXCEPT + { + return 17; + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT8; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - marketSegmentIDEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionOption55 & - marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionOption55 &marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *UnderlyingProductMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UnderlyingProductMetaAttribute(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 underlyingProductId() SBE_NOEXCEPT { - return 462; - } + static SBE_CONSTEXPR std::uint16_t underlyingProductId() SBE_NOEXCEPT + { + return 462; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - underlyingProductSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t underlyingProductSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool underlyingProductInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool underlyingProductInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= underlyingProductSinceVersion(); + return m_actingVersion >= underlyingProductSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - underlyingProductEncodingOffset() SBE_NOEXCEPT { - return 18; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t underlyingProductEncodingOffset() SBE_NOEXCEPT + { + return 18; + } - static SBE_CONSTEXPR std::uint8_t underlyingProductNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT8; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } - static SBE_CONSTEXPR std::uint8_t underlyingProductMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t underlyingProductMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - underlyingProductEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t underlyingProductEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t underlyingProduct() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t underlyingProduct() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionOption55 & - underlyingProduct(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionOption55 &underlyingProduct(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityExchangeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Exchange"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityExchangeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Exchange"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityExchangeId() SBE_NOEXCEPT { - return 207; - } + static SBE_CONSTEXPR std::uint16_t securityExchangeId() SBE_NOEXCEPT + { + return 207; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityExchangeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityExchangeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityExchangeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityExchangeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityExchangeSinceVersion(); + return m_actingVersion >= securityExchangeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityExchangeEncodingOffset() SBE_NOEXCEPT { - return 19; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityExchangeEncodingOffset() SBE_NOEXCEPT + { + return 19; + } - static SBE_CONSTEXPR char securityExchangeNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityExchangeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityExchangeMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityExchangeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityExchangeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityExchangeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - securityExchangeEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t securityExchangeEncodingLength() SBE_NOEXCEPT + { + return 4; + } - static SBE_CONSTEXPR std::uint64_t securityExchangeLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::uint64_t securityExchangeLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD const char *securityExchange() const SBE_NOEXCEPT { - return m_buffer + m_offset + 19; - } + SBE_NODISCARD const char *securityExchange() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 19; + } - SBE_NODISCARD char *securityExchange() SBE_NOEXCEPT { - return m_buffer + m_offset + 19; - } + SBE_NODISCARD char *securityExchange() SBE_NOEXCEPT + { + return m_buffer + m_offset + 19; + } - SBE_NODISCARD char securityExchange(const std::uint64_t index) const { - if (index >= 4) { - throw std::runtime_error( - "index out of range for securityExchange [E104]"); - } + SBE_NODISCARD char securityExchange(const std::uint64_t index) const + { + if (index >= 4) + { + throw std::runtime_error("index out of range for securityExchange [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 19 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 19 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption55 & - securityExchange(const std::uint64_t index, const char value) { - if (index >= 4) { - throw std::runtime_error( - "index out of range for securityExchange [E105]"); - } + MDInstrumentDefinitionOption55 &securityExchange(const std::uint64_t index, const char value) + { + if (index >= 4) + { + throw std::runtime_error("index out of range for securityExchange [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 19 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 19 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityExchange(char *const dst, const std::uint64_t length) const { - if (length > 4) { - throw std::runtime_error( - "length too large for getSecurityExchange [E106]"); - } + std::uint64_t getSecurityExchange(char *const dst, const std::uint64_t length) const + { + if (length > 4) + { + throw std::runtime_error("length too large for getSecurityExchange [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 19, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 19, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption55 & - putSecurityExchange(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 19, src, sizeof(char) * 4); - return *this; - } + MDInstrumentDefinitionOption55 &putSecurityExchange(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 19, src, sizeof(char) * 4); + return *this; + } - MDInstrumentDefinitionOption55 &putSecurityExchange( - const char value0, - const char value1, - const char value2, - const char value3) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 19, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 20, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 21, &val2, sizeof(char)); - char val3 = (value3); - std::memcpy(m_buffer + m_offset + 22, &val3, sizeof(char)); + MDInstrumentDefinitionOption55 &putSecurityExchange( + const char value0, + const char value1, + const char value2, + const char value3) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 19, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 20, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 21, &val2, sizeof(char)); + char val3 = (value3); + std::memcpy(m_buffer + m_offset + 22, &val3, sizeof(char)); - return *this; - } + return *this; + } - std::string getSecurityExchangeAsString() const { - const char *buffer = m_buffer + m_offset + 19; - size_t length = 0; + SBE_NODISCARD std::string getSecurityExchangeAsString() const + { + const char *buffer = m_buffer + m_offset + 19; + size_t length = 0; - for (; length < 4 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 4 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityExchangeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityExchangeAsString(); + std::string getSecurityExchangeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityExchangeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityExchangeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 19; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityExchangeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 19; + size_t length = 0; - for (; length < 4 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 4 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption55 & - putSecurityExchange(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 4) { - throw std::runtime_error( - "string too large for putSecurityExchange [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption55 &putSecurityExchange(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 4) + { + throw std::runtime_error("string too large for putSecurityExchange [E106]"); + } - std::memcpy(m_buffer + m_offset + 19, str.data(), srcLength); - for (size_t start = srcLength; start < 4; ++start) { - m_buffer[m_offset + 19 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 19, str.data(), srcLength); + for (size_t start = srcLength; start < 4; ++start) + { + m_buffer[m_offset + 19 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption55 &putSecurityExchange(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 4) { - throw std::runtime_error( - "string too large for putSecurityExchange [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption55 &putSecurityExchange(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 4) + { + throw std::runtime_error("string too large for putSecurityExchange [E106]"); + } - std::memcpy(m_buffer + m_offset + 19, str.c_str(), srcLength); - for (size_t start = srcLength; start < 4; ++start) { - m_buffer[m_offset + 19 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 19, str.c_str(), srcLength); + for (size_t start = srcLength; start < 4; ++start) + { + m_buffer[m_offset + 19 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT { - return 1151; - } + static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT + { + return 1151; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityGroupSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityGroupSinceVersion(); + return m_actingVersion >= securityGroupSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityGroupEncodingOffset() SBE_NOEXCEPT { - return 23; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityGroupEncodingOffset() SBE_NOEXCEPT + { + return 23; + } - static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT { - return m_buffer + m_offset + 23; - } + SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 23; + } - SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT { - return m_buffer + m_offset + 23; - } + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 23; + } - SBE_NODISCARD char securityGroup(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error( - "index out of range for securityGroup [E104]"); - } + SBE_NODISCARD char securityGroup(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 23 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 23 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption55 & - securityGroup(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error( - "index out of range for securityGroup [E105]"); - } + MDInstrumentDefinitionOption55 &securityGroup(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 23 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 23 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityGroup(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error( - "length too large for getSecurityGroup [E106]"); - } + std::uint64_t getSecurityGroup(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityGroup [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 23, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 23, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption55 & - putSecurityGroup(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 23, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionOption55 &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 23, src, sizeof(char) * 6); + return *this; + } - std::string getSecurityGroupAsString() const { - const char *buffer = m_buffer + m_offset + 23; - size_t length = 0; + SBE_NODISCARD std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 23; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityGroupAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityGroupAsString(); + std::string getSecurityGroupAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityGroupAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 23; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 23; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption55 & - putSecurityGroup(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityGroup [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption55 &putSecurityGroup(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } - std::memcpy(m_buffer + m_offset + 23, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 23 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 23, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 23 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption55 &putSecurityGroup(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityGroup [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption55 &putSecurityGroup(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } - std::memcpy(m_buffer + m_offset + 23, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 23 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 23, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 23 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - AssetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *AssetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t assetId() SBE_NOEXCEPT { return 6937; } + static SBE_CONSTEXPR std::uint16_t assetId() SBE_NOEXCEPT + { + return 6937; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - assetSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t assetSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool assetInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool assetInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= assetSinceVersion(); + return m_actingVersion >= assetSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - assetEncodingOffset() SBE_NOEXCEPT { - return 29; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t assetEncodingOffset() SBE_NOEXCEPT + { + return 29; + } - static SBE_CONSTEXPR char assetNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char assetNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char assetMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char assetMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char assetMaxValue() SBE_NOEXCEPT { return (char)126; } + static SBE_CONSTEXPR char assetMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t assetEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t assetEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t assetLength() SBE_NOEXCEPT { return 6; } + static SBE_CONSTEXPR std::uint64_t assetLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *asset() const SBE_NOEXCEPT { - return m_buffer + m_offset + 29; - } + SBE_NODISCARD const char *asset() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 29; + } - SBE_NODISCARD char *asset() SBE_NOEXCEPT { return m_buffer + m_offset + 29; } + SBE_NODISCARD char *asset() SBE_NOEXCEPT + { + return m_buffer + m_offset + 29; + } - SBE_NODISCARD char asset(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for asset [E104]"); - } + SBE_NODISCARD char asset(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for asset [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 29 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 29 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption55 & - asset(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for asset [E105]"); - } + MDInstrumentDefinitionOption55 &asset(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for asset [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 29 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 29 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getAsset(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error("length too large for getAsset [E106]"); - } + std::uint64_t getAsset(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getAsset [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 29, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 29, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption55 & - putAsset(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 29, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionOption55 &putAsset(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 29, src, sizeof(char) * 6); + return *this; + } - std::string getAssetAsString() const { - const char *buffer = m_buffer + m_offset + 29; - size_t length = 0; + SBE_NODISCARD std::string getAssetAsString() const + { + const char *buffer = m_buffer + m_offset + 29; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getAssetAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getAssetAsString(); + std::string getAssetAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getAssetAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getAssetAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 29; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getAssetAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 29; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption55 &putAsset(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putAsset [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption55 &putAsset(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putAsset [E106]"); + } - std::memcpy(m_buffer + m_offset + 29, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 29 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 29, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 29 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption55 &putAsset(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putAsset [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption55 &putAsset(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putAsset [E106]"); + } - std::memcpy(m_buffer + m_offset + 29, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 29 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 29, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 29 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t symbolId() SBE_NOEXCEPT { return 55; } + static SBE_CONSTEXPR std::uint16_t symbolId() SBE_NOEXCEPT + { + return 55; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - symbolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t symbolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool symbolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool symbolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= symbolSinceVersion(); + return m_actingVersion >= symbolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - symbolEncodingOffset() SBE_NOEXCEPT { - return 35; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t symbolEncodingOffset() SBE_NOEXCEPT + { + return 35; + } - static SBE_CONSTEXPR char symbolNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char symbolNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char symbolMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char symbolMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char symbolMaxValue() SBE_NOEXCEPT { return (char)126; } + static SBE_CONSTEXPR char symbolMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t symbolEncodingLength() SBE_NOEXCEPT { - return 20; - } + static SBE_CONSTEXPR std::size_t symbolEncodingLength() SBE_NOEXCEPT + { + return 20; + } - static SBE_CONSTEXPR std::uint64_t symbolLength() SBE_NOEXCEPT { return 20; } + static SBE_CONSTEXPR std::uint64_t symbolLength() SBE_NOEXCEPT + { + return 20; + } - SBE_NODISCARD const char *symbol() const SBE_NOEXCEPT { - return m_buffer + m_offset + 35; - } + SBE_NODISCARD const char *symbol() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 35; + } - SBE_NODISCARD char *symbol() SBE_NOEXCEPT { - return m_buffer + m_offset + 35; - } + SBE_NODISCARD char *symbol() SBE_NOEXCEPT + { + return m_buffer + m_offset + 35; + } - SBE_NODISCARD char symbol(const std::uint64_t index) const { - if (index >= 20) { - throw std::runtime_error("index out of range for symbol [E104]"); - } + SBE_NODISCARD char symbol(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 35 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 35 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption55 & - symbol(const std::uint64_t index, const char value) { - if (index >= 20) { - throw std::runtime_error("index out of range for symbol [E105]"); - } + MDInstrumentDefinitionOption55 &symbol(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 35 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 35 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getSymbol(char *const dst, const std::uint64_t length) const { - if (length > 20) { - throw std::runtime_error("length too large for getSymbol [E106]"); - } + std::uint64_t getSymbol(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSymbol [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 35, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 35, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption55 & - putSymbol(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 35, src, sizeof(char) * 20); - return *this; - } + MDInstrumentDefinitionOption55 &putSymbol(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 35, src, sizeof(char) * 20); + return *this; + } - std::string getSymbolAsString() const { - const char *buffer = m_buffer + m_offset + 35; - size_t length = 0; + SBE_NODISCARD std::string getSymbolAsString() const + { + const char *buffer = m_buffer + m_offset + 35; + size_t length = 0; - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSymbolAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSymbolAsString(); + std::string getSymbolAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSymbolAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSymbolAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 35; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSymbolAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 35; + size_t length = 0; - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption55 &putSymbol(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error("string too large for putSymbol [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption55 &putSymbol(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } - std::memcpy(m_buffer + m_offset + 35, str.data(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 35 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 35, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 35 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption55 &putSymbol(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error("string too large for putSymbol [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption55 &putSymbol(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } - std::memcpy(m_buffer + m_offset + 35, str.c_str(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 35 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 35, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 35 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { return 48; } + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityIDSinceVersion(); + return m_actingVersion >= securityIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 55; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 55; + } - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 55, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 55, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionOption55 & - securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 55, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionOption55 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 55, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityIDSourceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityIDSourceId() SBE_NOEXCEPT { - return 22; - } + static SBE_CONSTEXPR std::uint16_t securityIDSourceId() SBE_NOEXCEPT + { + return 22; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSourceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityIDSourceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityIDSourceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityIDSourceSinceVersion(); + return m_actingVersion >= securityIDSourceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDSourceEncodingOffset() SBE_NOEXCEPT { - return 59; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 59; + } - static SBE_CONSTEXPR char securityIDSourceNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityIDSourceNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityIDSourceMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityIDSourceMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityIDSourceMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityIDSourceMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - securityIDSourceEncodingLength() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::size_t securityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t securityIDSourceLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::uint64_t securityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD const char *securityIDSource() const { - static const std::uint8_t securityIDSourceValues[] = {56}; + SBE_NODISCARD const char *securityIDSource() const + { + static const std::uint8_t securityIDSourceValues[] = { 56 }; - return (const char *)securityIDSourceValues; - } + return (const char *)securityIDSourceValues; + } - SBE_NODISCARD char securityIDSource(const std::uint64_t index) const { - static const std::uint8_t securityIDSourceValues[] = {56}; + SBE_NODISCARD char securityIDSource(const std::uint64_t index) const + { + static const std::uint8_t securityIDSourceValues[] = { 56 }; - return (char)securityIDSourceValues[index]; - } + return (char)securityIDSourceValues[index]; + } - std::uint64_t - getSecurityIDSource(char *dst, const std::uint64_t length) const { - static std::uint8_t securityIDSourceValues[] = {56}; - std::uint64_t bytesToCopy = length < sizeof(securityIDSourceValues) - ? length - : sizeof(securityIDSourceValues); + std::uint64_t getSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t securityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(securityIDSourceValues) ? length : sizeof(securityIDSourceValues); - std::memcpy( - dst, securityIDSourceValues, static_cast(bytesToCopy)); - return bytesToCopy; - } + std::memcpy(dst, securityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } - std::string getSecurityIDSourceAsString() const { - static const std::uint8_t SecurityIDSourceValues[] = {56}; + std::string getSecurityIDSourceAsString() const + { + static const std::uint8_t SecurityIDSourceValues[] = { 56 }; - return std::string((const char *)SecurityIDSourceValues, 1); - } + return std::string((const char *)SecurityIDSourceValues, 1); + } - std::string getSecurityIDSourceAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityIDSourceAsString(); + std::string getSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityIDSourceAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } - SBE_NODISCARD static const char * - SecurityTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityTypeId() SBE_NOEXCEPT { - return 167; - } + static SBE_CONSTEXPR std::uint16_t securityTypeId() SBE_NOEXCEPT + { + return 167; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityTypeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityTypeSinceVersion(); + return m_actingVersion >= securityTypeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityTypeEncodingOffset() SBE_NOEXCEPT { - return 59; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityTypeEncodingOffset() SBE_NOEXCEPT + { + return 59; + } - static SBE_CONSTEXPR char securityTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t securityTypeEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t securityTypeEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t securityTypeLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::uint64_t securityTypeLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *securityType() const SBE_NOEXCEPT { - return m_buffer + m_offset + 59; - } + SBE_NODISCARD const char *securityType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 59; + } - SBE_NODISCARD char *securityType() SBE_NOEXCEPT { - return m_buffer + m_offset + 59; - } + SBE_NODISCARD char *securityType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 59; + } - SBE_NODISCARD char securityType(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for securityType [E104]"); - } + SBE_NODISCARD char securityType(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityType [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 59 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 59 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption55 & - securityType(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for securityType [E105]"); - } + MDInstrumentDefinitionOption55 &securityType(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityType [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 59 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 59 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityType(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error( - "length too large for getSecurityType [E106]"); - } + std::uint64_t getSecurityType(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityType [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 59, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 59, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption55 & - putSecurityType(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 59, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionOption55 &putSecurityType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 59, src, sizeof(char) * 6); + return *this; + } - std::string getSecurityTypeAsString() const { - const char *buffer = m_buffer + m_offset + 59; - size_t length = 0; + SBE_NODISCARD std::string getSecurityTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 59; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityTypeAsString(); + std::string getSecurityTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityTypeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityTypeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 59; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 59; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption55 &putSecurityType(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityType [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption55 &putSecurityType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityType [E106]"); + } - std::memcpy(m_buffer + m_offset + 59, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 59 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 59, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 59 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption55 &putSecurityType(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityType [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption55 &putSecurityType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityType [E106]"); + } - std::memcpy(m_buffer + m_offset + 59, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 59 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 59, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 59 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - CFICodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *CFICodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t cFICodeId() SBE_NOEXCEPT { return 461; } + static SBE_CONSTEXPR std::uint16_t cFICodeId() SBE_NOEXCEPT + { + return 461; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - cFICodeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cFICodeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool cFICodeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool cFICodeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= cFICodeSinceVersion(); + return m_actingVersion >= cFICodeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - cFICodeEncodingOffset() SBE_NOEXCEPT { - return 65; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cFICodeEncodingOffset() SBE_NOEXCEPT + { + return 65; + } - static SBE_CONSTEXPR char cFICodeNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char cFICodeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char cFICodeMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char cFICodeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char cFICodeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char cFICodeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t cFICodeEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t cFICodeEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t cFICodeLength() SBE_NOEXCEPT { return 6; } + static SBE_CONSTEXPR std::uint64_t cFICodeLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *cFICode() const SBE_NOEXCEPT { - return m_buffer + m_offset + 65; - } + SBE_NODISCARD const char *cFICode() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 65; + } - SBE_NODISCARD char *cFICode() SBE_NOEXCEPT { - return m_buffer + m_offset + 65; - } + SBE_NODISCARD char *cFICode() SBE_NOEXCEPT + { + return m_buffer + m_offset + 65; + } - SBE_NODISCARD char cFICode(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for cFICode [E104]"); - } + SBE_NODISCARD char cFICode(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cFICode [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 65 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 65 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption55 & - cFICode(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for cFICode [E105]"); - } + MDInstrumentDefinitionOption55 &cFICode(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cFICode [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 65 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 65 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getCFICode(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error("length too large for getCFICode [E106]"); - } + std::uint64_t getCFICode(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getCFICode [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 65, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 65, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption55 & - putCFICode(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 65, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionOption55 &putCFICode(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 65, src, sizeof(char) * 6); + return *this; + } - std::string getCFICodeAsString() const { - const char *buffer = m_buffer + m_offset + 65; - size_t length = 0; + SBE_NODISCARD std::string getCFICodeAsString() const + { + const char *buffer = m_buffer + m_offset + 65; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getCFICodeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getCFICodeAsString(); + std::string getCFICodeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCFICodeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getCFICodeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 65; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCFICodeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 65; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption55 &putCFICode(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putCFICode [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption55 &putCFICode(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCFICode [E106]"); + } - std::memcpy(m_buffer + m_offset + 65, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 65 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 65, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 65 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption55 &putCFICode(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putCFICode [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption55 &putCFICode(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCFICode [E106]"); + } - std::memcpy(m_buffer + m_offset + 65, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 65 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 65, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 65 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - PutOrCallMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *PutOrCallMetaAttribute(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 putOrCallId() SBE_NOEXCEPT { return 201; } + static SBE_CONSTEXPR std::uint16_t putOrCallId() SBE_NOEXCEPT + { + return 201; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - putOrCallSinceVersion() SBE_NOEXCEPT { - return 3; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t putOrCallSinceVersion() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD bool putOrCallInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool putOrCallInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= putOrCallSinceVersion(); + return m_actingVersion >= putOrCallSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - putOrCallEncodingOffset() SBE_NOEXCEPT { - return 71; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t putOrCallEncodingOffset() SBE_NOEXCEPT + { + return 71; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - putOrCallEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t putOrCallEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD PutOrCall::Value putOrCall() const SBE_NOEXCEPT { - if (m_actingVersion < 3) { - return PutOrCall::NULL_VALUE; - } + SBE_NODISCARD PutOrCall::Value putOrCall() const + { + if (m_actingVersion < 3) + { + return PutOrCall::NULL_VALUE; + } - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 71, sizeof(std::uint8_t)); - return PutOrCall::get((val)); - } + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 71, sizeof(std::uint8_t)); + return PutOrCall::get((val)); + } - MDInstrumentDefinitionOption55 & - putOrCall(const PutOrCall::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 71, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionOption55 &putOrCall(const PutOrCall::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 71, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *MaturityMonthYearMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MonthYear"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaturityMonthYearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MonthYear"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t maturityMonthYearId() SBE_NOEXCEPT { - return 200; - } + static SBE_CONSTEXPR std::uint16_t maturityMonthYearId() SBE_NOEXCEPT + { + return 200; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maturityMonthYearSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maturityMonthYearSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool maturityMonthYearInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maturityMonthYearInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maturityMonthYearSinceVersion(); + return m_actingVersion >= maturityMonthYearSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maturityMonthYearEncodingOffset() SBE_NOEXCEPT { - return 72; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maturityMonthYearEncodingOffset() SBE_NOEXCEPT + { + return 72; + } - private: - MaturityMonthYear m_maturityMonthYear; +private: + MaturityMonthYear m_maturityMonthYear; - public: - SBE_NODISCARD MaturityMonthYear &maturityMonthYear() { - m_maturityMonthYear.wrap( - m_buffer, m_offset + 72, m_actingVersion, m_bufferLength); - return m_maturityMonthYear; - } +public: + SBE_NODISCARD MaturityMonthYear &maturityMonthYear() + { + m_maturityMonthYear.wrap(m_buffer, m_offset + 72, m_actingVersion, m_bufferLength); + return m_maturityMonthYear; + } - SBE_NODISCARD static const char * - CurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Currency"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *CurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Currency"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t currencyId() SBE_NOEXCEPT { return 15; } + static SBE_CONSTEXPR std::uint16_t currencyId() SBE_NOEXCEPT + { + return 15; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - currencySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t currencySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool currencyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool currencyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= currencySinceVersion(); + return m_actingVersion >= currencySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - currencyEncodingOffset() SBE_NOEXCEPT { - return 77; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t currencyEncodingOffset() SBE_NOEXCEPT + { + return 77; + } - static SBE_CONSTEXPR char currencyNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char currencyNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char currencyMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char currencyMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char currencyMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char currencyMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t currencyEncodingLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::size_t currencyEncodingLength() SBE_NOEXCEPT + { + return 3; + } - static SBE_CONSTEXPR std::uint64_t currencyLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::uint64_t currencyLength() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD const char *currency() const SBE_NOEXCEPT { - return m_buffer + m_offset + 77; - } + SBE_NODISCARD const char *currency() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 77; + } - SBE_NODISCARD char *currency() SBE_NOEXCEPT { - return m_buffer + m_offset + 77; - } + SBE_NODISCARD char *currency() SBE_NOEXCEPT + { + return m_buffer + m_offset + 77; + } - SBE_NODISCARD char currency(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error("index out of range for currency [E104]"); - } + SBE_NODISCARD char currency(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for currency [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 77 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 77 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption55 & - currency(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error("index out of range for currency [E105]"); - } + MDInstrumentDefinitionOption55 ¤cy(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for currency [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 77 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 77 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getCurrency(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error("length too large for getCurrency [E106]"); - } + std::uint64_t getCurrency(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getCurrency [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 77, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 77, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption55 & - putCurrency(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 77, src, sizeof(char) * 3); - return *this; - } + MDInstrumentDefinitionOption55 &putCurrency(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 77, src, sizeof(char) * 3); + return *this; + } - MDInstrumentDefinitionOption55 &putCurrency( - const char value0, const char value1, const char value2) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 77, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 78, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 79, &val2, sizeof(char)); + MDInstrumentDefinitionOption55 &putCurrency( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 77, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 78, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 79, &val2, sizeof(char)); - return *this; - } + return *this; + } - std::string getCurrencyAsString() const { - const char *buffer = m_buffer + m_offset + 77; - size_t length = 0; + SBE_NODISCARD std::string getCurrencyAsString() const + { + const char *buffer = m_buffer + m_offset + 77; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getCurrencyAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getCurrencyAsString(); + std::string getCurrencyAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCurrencyAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getCurrencyAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 77; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCurrencyAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 77; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption55 &putCurrency(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error("string too large for putCurrency [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption55 &putCurrency(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 77, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 77 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 77, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 77 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption55 &putCurrency(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error("string too large for putCurrency [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption55 &putCurrency(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 77, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 77 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 77, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 77 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - StrikePriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *StrikePriceMetaAttribute(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 strikePriceId() SBE_NOEXCEPT { - return 202; - } + static SBE_CONSTEXPR std::uint16_t strikePriceId() SBE_NOEXCEPT + { + return 202; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - strikePriceSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t strikePriceSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool strikePriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool strikePriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= strikePriceSinceVersion(); + return m_actingVersion >= strikePriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - strikePriceEncodingOffset() SBE_NOEXCEPT { - return 80; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t strikePriceEncodingOffset() SBE_NOEXCEPT + { + return 80; + } - private: - PRICENULL9 m_strikePrice; +private: + PRICENULL9 m_strikePrice; - public: - SBE_NODISCARD PRICENULL9 &strikePrice() { - m_strikePrice.wrap( - m_buffer, m_offset + 80, m_actingVersion, m_bufferLength); - return m_strikePrice; - } +public: + SBE_NODISCARD PRICENULL9 &strikePrice() + { + m_strikePrice.wrap(m_buffer, m_offset + 80, m_actingVersion, m_bufferLength); + return m_strikePrice; + } - SBE_NODISCARD static const char * - StrikeCurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Currency"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *StrikeCurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Currency"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t strikeCurrencyId() SBE_NOEXCEPT { - return 947; - } + static SBE_CONSTEXPR std::uint16_t strikeCurrencyId() SBE_NOEXCEPT + { + return 947; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - strikeCurrencySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t strikeCurrencySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool strikeCurrencyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool strikeCurrencyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= strikeCurrencySinceVersion(); + return m_actingVersion >= strikeCurrencySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - strikeCurrencyEncodingOffset() SBE_NOEXCEPT { - return 88; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t strikeCurrencyEncodingOffset() SBE_NOEXCEPT + { + return 88; + } - static SBE_CONSTEXPR char strikeCurrencyNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char strikeCurrencyNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char strikeCurrencyMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char strikeCurrencyMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char strikeCurrencyMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char strikeCurrencyMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - strikeCurrencyEncodingLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::size_t strikeCurrencyEncodingLength() SBE_NOEXCEPT + { + return 3; + } - static SBE_CONSTEXPR std::uint64_t strikeCurrencyLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::uint64_t strikeCurrencyLength() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD const char *strikeCurrency() const SBE_NOEXCEPT { - return m_buffer + m_offset + 88; - } + SBE_NODISCARD const char *strikeCurrency() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 88; + } - SBE_NODISCARD char *strikeCurrency() SBE_NOEXCEPT { - return m_buffer + m_offset + 88; - } + SBE_NODISCARD char *strikeCurrency() SBE_NOEXCEPT + { + return m_buffer + m_offset + 88; + } - SBE_NODISCARD char strikeCurrency(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error( - "index out of range for strikeCurrency [E104]"); - } + SBE_NODISCARD char strikeCurrency(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for strikeCurrency [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 88 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 88 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption55 & - strikeCurrency(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error( - "index out of range for strikeCurrency [E105]"); - } + MDInstrumentDefinitionOption55 &strikeCurrency(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for strikeCurrency [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 88 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 88 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getStrikeCurrency(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error( - "length too large for getStrikeCurrency [E106]"); - } + std::uint64_t getStrikeCurrency(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getStrikeCurrency [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 88, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 88, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption55 & - putStrikeCurrency(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 88, src, sizeof(char) * 3); - return *this; - } + MDInstrumentDefinitionOption55 &putStrikeCurrency(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 88, src, sizeof(char) * 3); + return *this; + } - MDInstrumentDefinitionOption55 &putStrikeCurrency( - const char value0, const char value1, const char value2) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 88, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 89, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 90, &val2, sizeof(char)); + MDInstrumentDefinitionOption55 &putStrikeCurrency( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 88, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 89, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 90, &val2, sizeof(char)); - return *this; - } + return *this; + } - std::string getStrikeCurrencyAsString() const { - const char *buffer = m_buffer + m_offset + 88; - size_t length = 0; + SBE_NODISCARD std::string getStrikeCurrencyAsString() const + { + const char *buffer = m_buffer + m_offset + 88; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getStrikeCurrencyAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getStrikeCurrencyAsString(); + std::string getStrikeCurrencyAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getStrikeCurrencyAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getStrikeCurrencyAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 88; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getStrikeCurrencyAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 88; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption55 & - putStrikeCurrency(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putStrikeCurrency [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption55 &putStrikeCurrency(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putStrikeCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 88, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 88 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 88, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 88 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption55 &putStrikeCurrency(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putStrikeCurrency [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption55 &putStrikeCurrency(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putStrikeCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 88, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 88 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 88, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 88 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SettlCurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Currency"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SettlCurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Currency"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t settlCurrencyId() SBE_NOEXCEPT { - return 120; - } + static SBE_CONSTEXPR std::uint16_t settlCurrencyId() SBE_NOEXCEPT + { + return 120; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - settlCurrencySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t settlCurrencySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool settlCurrencyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool settlCurrencyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= settlCurrencySinceVersion(); + return m_actingVersion >= settlCurrencySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - settlCurrencyEncodingOffset() SBE_NOEXCEPT { - return 91; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t settlCurrencyEncodingOffset() SBE_NOEXCEPT + { + return 91; + } - static SBE_CONSTEXPR char settlCurrencyNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char settlCurrencyNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char settlCurrencyMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char settlCurrencyMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char settlCurrencyMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char settlCurrencyMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t settlCurrencyEncodingLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::size_t settlCurrencyEncodingLength() SBE_NOEXCEPT + { + return 3; + } - static SBE_CONSTEXPR std::uint64_t settlCurrencyLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::uint64_t settlCurrencyLength() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD const char *settlCurrency() const SBE_NOEXCEPT { - return m_buffer + m_offset + 91; - } + SBE_NODISCARD const char *settlCurrency() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 91; + } - SBE_NODISCARD char *settlCurrency() SBE_NOEXCEPT { - return m_buffer + m_offset + 91; - } + SBE_NODISCARD char *settlCurrency() SBE_NOEXCEPT + { + return m_buffer + m_offset + 91; + } - SBE_NODISCARD char settlCurrency(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error( - "index out of range for settlCurrency [E104]"); - } + SBE_NODISCARD char settlCurrency(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for settlCurrency [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 91 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 91 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption55 & - settlCurrency(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error( - "index out of range for settlCurrency [E105]"); - } + MDInstrumentDefinitionOption55 &settlCurrency(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for settlCurrency [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 91 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 91 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSettlCurrency(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error( - "length too large for getSettlCurrency [E106]"); - } + std::uint64_t getSettlCurrency(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getSettlCurrency [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 91, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 91, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption55 & - putSettlCurrency(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 91, src, sizeof(char) * 3); - return *this; - } + MDInstrumentDefinitionOption55 &putSettlCurrency(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 91, src, sizeof(char) * 3); + return *this; + } - MDInstrumentDefinitionOption55 &putSettlCurrency( - const char value0, const char value1, const char value2) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 91, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 92, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 93, &val2, sizeof(char)); + MDInstrumentDefinitionOption55 &putSettlCurrency( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 91, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 92, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 93, &val2, sizeof(char)); - return *this; - } + return *this; + } - std::string getSettlCurrencyAsString() const { - const char *buffer = m_buffer + m_offset + 91; - size_t length = 0; + SBE_NODISCARD std::string getSettlCurrencyAsString() const + { + const char *buffer = m_buffer + m_offset + 91; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSettlCurrencyAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSettlCurrencyAsString(); + std::string getSettlCurrencyAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSettlCurrencyAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSettlCurrencyAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 91; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSettlCurrencyAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 91; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption55 & - putSettlCurrency(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putSettlCurrency [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption55 &putSettlCurrency(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putSettlCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 91, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 91 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 91, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 91 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption55 &putSettlCurrency(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putSettlCurrency [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption55 &putSettlCurrency(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putSettlCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 91, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 91 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 91, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 91 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - MinCabPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinCabPriceMetaAttribute(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 minCabPriceId() SBE_NOEXCEPT { - return 9850; - } + static SBE_CONSTEXPR std::uint16_t minCabPriceId() SBE_NOEXCEPT + { + return 9850; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minCabPriceSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minCabPriceSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool minCabPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minCabPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minCabPriceSinceVersion(); + return m_actingVersion >= minCabPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minCabPriceEncodingOffset() SBE_NOEXCEPT { - return 94; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minCabPriceEncodingOffset() SBE_NOEXCEPT + { + return 94; + } - private: - PRICENULL9 m_minCabPrice; +private: + PRICENULL9 m_minCabPrice; - public: - SBE_NODISCARD PRICENULL9 &minCabPrice() { - m_minCabPrice.wrap( - m_buffer, m_offset + 94, m_actingVersion, m_bufferLength); - return m_minCabPrice; - } +public: + SBE_NODISCARD PRICENULL9 &minCabPrice() + { + m_minCabPrice.wrap(m_buffer, m_offset + 94, m_actingVersion, m_bufferLength); + return m_minCabPrice; + } - SBE_NODISCARD static const char * - MatchAlgorithmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchAlgorithmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchAlgorithmId() SBE_NOEXCEPT { - return 1142; - } + static SBE_CONSTEXPR std::uint16_t matchAlgorithmId() SBE_NOEXCEPT + { + return 1142; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchAlgorithmSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchAlgorithmSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchAlgorithmInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchAlgorithmInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchAlgorithmSinceVersion(); + return m_actingVersion >= matchAlgorithmSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchAlgorithmEncodingOffset() SBE_NOEXCEPT { - return 102; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchAlgorithmEncodingOffset() SBE_NOEXCEPT + { + return 102; + } - static SBE_CONSTEXPR char matchAlgorithmNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char matchAlgorithmNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char matchAlgorithmMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char matchAlgorithmMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char matchAlgorithmMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char matchAlgorithmMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - matchAlgorithmEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchAlgorithmEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD char matchAlgorithm() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 102, sizeof(char)); - return (val); - } + SBE_NODISCARD char matchAlgorithm() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 102, sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption55 & - matchAlgorithm(const char value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 102, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionOption55 &matchAlgorithm(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 102, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char * - MinTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t minTradeVolId() SBE_NOEXCEPT { - return 562; - } + static SBE_CONSTEXPR std::uint16_t minTradeVolId() SBE_NOEXCEPT + { + return 562; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minTradeVolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minTradeVolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool minTradeVolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minTradeVolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minTradeVolSinceVersion(); + return m_actingVersion >= minTradeVolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minTradeVolEncodingOffset() SBE_NOEXCEPT { - return 103; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minTradeVolEncodingOffset() SBE_NOEXCEPT + { + return 103; + } - static SBE_CONSTEXPR std::uint32_t minTradeVolNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t minTradeVolMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t minTradeVolMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t minTradeVolEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t minTradeVolEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t minTradeVol() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 103, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t minTradeVol() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 103, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionOption55 & - minTradeVol(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 103, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionOption55 &minTradeVol(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 103, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - MaxTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaxTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t maxTradeVolId() SBE_NOEXCEPT { - return 1140; - } + static SBE_CONSTEXPR std::uint16_t maxTradeVolId() SBE_NOEXCEPT + { + return 1140; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maxTradeVolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxTradeVolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool maxTradeVolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maxTradeVolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maxTradeVolSinceVersion(); + return m_actingVersion >= maxTradeVolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maxTradeVolEncodingOffset() SBE_NOEXCEPT { - return 107; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxTradeVolEncodingOffset() SBE_NOEXCEPT + { + return 107; + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t maxTradeVolEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t maxTradeVolEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t maxTradeVol() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 107, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t maxTradeVol() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 107, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionOption55 & - maxTradeVol(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 107, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionOption55 &maxTradeVol(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 107, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char *MinPriceIncrementMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinPriceIncrementMetaAttribute(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 minPriceIncrementId() SBE_NOEXCEPT { - return 969; - } + static SBE_CONSTEXPR std::uint16_t minPriceIncrementId() SBE_NOEXCEPT + { + return 969; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minPriceIncrementSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minPriceIncrementSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool minPriceIncrementInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minPriceIncrementInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minPriceIncrementSinceVersion(); + return m_actingVersion >= minPriceIncrementSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minPriceIncrementEncodingOffset() SBE_NOEXCEPT { - return 111; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minPriceIncrementEncodingOffset() SBE_NOEXCEPT + { + return 111; + } - private: - PRICENULL9 m_minPriceIncrement; +private: + PRICENULL9 m_minPriceIncrement; - public: - SBE_NODISCARD PRICENULL9 &minPriceIncrement() { - m_minPriceIncrement.wrap( - m_buffer, m_offset + 111, m_actingVersion, m_bufferLength); - return m_minPriceIncrement; - } +public: + SBE_NODISCARD PRICENULL9 &minPriceIncrement() + { + m_minPriceIncrement.wrap(m_buffer, m_offset + 111, m_actingVersion, m_bufferLength); + return m_minPriceIncrement; + } - SBE_NODISCARD static const char *MinPriceIncrementAmountMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinPriceIncrementAmountMetaAttribute(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 minPriceIncrementAmountId() SBE_NOEXCEPT { - return 1146; - } + static SBE_CONSTEXPR std::uint16_t minPriceIncrementAmountId() SBE_NOEXCEPT + { + return 1146; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minPriceIncrementAmountSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minPriceIncrementAmountSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool minPriceIncrementAmountInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minPriceIncrementAmountInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minPriceIncrementAmountSinceVersion(); + return m_actingVersion >= minPriceIncrementAmountSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minPriceIncrementAmountEncodingOffset() SBE_NOEXCEPT { - return 119; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minPriceIncrementAmountEncodingOffset() SBE_NOEXCEPT + { + return 119; + } - private: - PRICENULL9 m_minPriceIncrementAmount; +private: + PRICENULL9 m_minPriceIncrementAmount; - public: - SBE_NODISCARD PRICENULL9 &minPriceIncrementAmount() { - m_minPriceIncrementAmount.wrap( - m_buffer, m_offset + 119, m_actingVersion, m_bufferLength); - return m_minPriceIncrementAmount; - } +public: + SBE_NODISCARD PRICENULL9 &minPriceIncrementAmount() + { + m_minPriceIncrementAmount.wrap(m_buffer, m_offset + 119, m_actingVersion, m_bufferLength); + return m_minPriceIncrementAmount; + } - SBE_NODISCARD static const char * - DisplayFactorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "float"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *DisplayFactorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t displayFactorId() SBE_NOEXCEPT { - return 9787; - } + static SBE_CONSTEXPR std::uint16_t displayFactorId() SBE_NOEXCEPT + { + return 9787; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - displayFactorSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayFactorSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool displayFactorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool displayFactorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= displayFactorSinceVersion(); + return m_actingVersion >= displayFactorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - displayFactorEncodingOffset() SBE_NOEXCEPT { - return 127; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayFactorEncodingOffset() SBE_NOEXCEPT + { + return 127; + } - private: - Decimal9 m_displayFactor; +private: + Decimal9 m_displayFactor; - public: - SBE_NODISCARD Decimal9 &displayFactor() { - m_displayFactor.wrap( - m_buffer, m_offset + 127, m_actingVersion, m_bufferLength); - return m_displayFactor; - } +public: + SBE_NODISCARD Decimal9 &displayFactor() + { + m_displayFactor.wrap(m_buffer, m_offset + 127, m_actingVersion, m_bufferLength); + return m_displayFactor; + } - SBE_NODISCARD static const char * - TickRuleMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TickRuleMetaAttribute(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 tickRuleId() SBE_NOEXCEPT { return 6350; } + static SBE_CONSTEXPR std::uint16_t tickRuleId() SBE_NOEXCEPT + { + return 6350; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tickRuleSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tickRuleSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool tickRuleInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tickRuleInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tickRuleSinceVersion(); + return m_actingVersion >= tickRuleSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tickRuleEncodingOffset() SBE_NOEXCEPT { - return 135; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tickRuleEncodingOffset() SBE_NOEXCEPT + { + return 135; + } - static SBE_CONSTEXPR std::int8_t tickRuleNullValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t tickRuleNullValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::int8_t tickRuleMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + static SBE_CONSTEXPR std::int8_t tickRuleMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - static SBE_CONSTEXPR std::int8_t tickRuleMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t tickRuleMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::size_t tickRuleEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t tickRuleEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::int8_t tickRule() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 135, sizeof(std::int8_t)); - return (val); - } + SBE_NODISCARD std::int8_t tickRule() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 135, sizeof(std::int8_t)); + return (val); + } - MDInstrumentDefinitionOption55 & - tickRule(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 135, &val, sizeof(std::int8_t)); - return *this; - } + MDInstrumentDefinitionOption55 &tickRule(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 135, &val, sizeof(std::int8_t)); + return *this; + } - SBE_NODISCARD static const char * - MainFractionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MainFractionMetaAttribute(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 mainFractionId() SBE_NOEXCEPT { - return 37702; - } + static SBE_CONSTEXPR std::uint16_t mainFractionId() SBE_NOEXCEPT + { + return 37702; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mainFractionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mainFractionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool mainFractionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool mainFractionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mainFractionSinceVersion(); + return m_actingVersion >= mainFractionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mainFractionEncodingOffset() SBE_NOEXCEPT { - return 136; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mainFractionEncodingOffset() SBE_NOEXCEPT + { + return 136; + } - static SBE_CONSTEXPR std::uint8_t mainFractionNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t mainFractionNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t mainFractionMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t mainFractionMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t mainFractionMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t mainFractionMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t mainFractionEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t mainFractionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t mainFraction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 136, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t mainFraction() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 136, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionOption55 & - mainFraction(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 136, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionOption55 &mainFraction(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 136, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - SubFractionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SubFractionMetaAttribute(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 subFractionId() SBE_NOEXCEPT { - return 37703; - } + static SBE_CONSTEXPR std::uint16_t subFractionId() SBE_NOEXCEPT + { + return 37703; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - subFractionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t subFractionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool subFractionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool subFractionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= subFractionSinceVersion(); + return m_actingVersion >= subFractionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - subFractionEncodingOffset() SBE_NOEXCEPT { - return 137; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t subFractionEncodingOffset() SBE_NOEXCEPT + { + return 137; + } - static SBE_CONSTEXPR std::uint8_t subFractionNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t subFractionNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t subFractionMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t subFractionMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t subFractionMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t subFractionMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t subFractionEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t subFractionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t subFraction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 137, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t subFraction() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 137, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionOption55 & - subFraction(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 137, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionOption55 &subFraction(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 137, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *PriceDisplayFormatMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *PriceDisplayFormatMetaAttribute(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 priceDisplayFormatId() SBE_NOEXCEPT { - return 9800; - } + static SBE_CONSTEXPR std::uint16_t priceDisplayFormatId() SBE_NOEXCEPT + { + return 9800; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - priceDisplayFormatSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceDisplayFormatSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool priceDisplayFormatInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool priceDisplayFormatInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= priceDisplayFormatSinceVersion(); + return m_actingVersion >= priceDisplayFormatSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - priceDisplayFormatEncodingOffset() SBE_NOEXCEPT { - return 138; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceDisplayFormatEncodingOffset() SBE_NOEXCEPT + { + return 138; + } - static SBE_CONSTEXPR std::uint8_t - priceDisplayFormatNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - priceDisplayFormatEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t priceDisplayFormatEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t priceDisplayFormat() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 138, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t priceDisplayFormat() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 138, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionOption55 & - priceDisplayFormat(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 138, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionOption55 &priceDisplayFormat(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 138, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - UnitOfMeasureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UnitOfMeasureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t unitOfMeasureId() SBE_NOEXCEPT { - return 996; - } + static SBE_CONSTEXPR std::uint16_t unitOfMeasureId() SBE_NOEXCEPT + { + return 996; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - unitOfMeasureSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t unitOfMeasureSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool unitOfMeasureInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool unitOfMeasureInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= unitOfMeasureSinceVersion(); + return m_actingVersion >= unitOfMeasureSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - unitOfMeasureEncodingOffset() SBE_NOEXCEPT { - return 139; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingOffset() SBE_NOEXCEPT + { + return 139; + } - static SBE_CONSTEXPR char unitOfMeasureNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char unitOfMeasureNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char unitOfMeasureMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char unitOfMeasureMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char unitOfMeasureMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char unitOfMeasureMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingLength() SBE_NOEXCEPT { - return 30; - } + static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingLength() SBE_NOEXCEPT + { + return 30; + } - static SBE_CONSTEXPR std::uint64_t unitOfMeasureLength() SBE_NOEXCEPT { - return 30; - } + static SBE_CONSTEXPR std::uint64_t unitOfMeasureLength() SBE_NOEXCEPT + { + return 30; + } - SBE_NODISCARD const char *unitOfMeasure() const SBE_NOEXCEPT { - return m_buffer + m_offset + 139; - } + SBE_NODISCARD const char *unitOfMeasure() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 139; + } - SBE_NODISCARD char *unitOfMeasure() SBE_NOEXCEPT { - return m_buffer + m_offset + 139; - } + SBE_NODISCARD char *unitOfMeasure() SBE_NOEXCEPT + { + return m_buffer + m_offset + 139; + } - SBE_NODISCARD char unitOfMeasure(const std::uint64_t index) const { - if (index >= 30) { - throw std::runtime_error( - "index out of range for unitOfMeasure [E104]"); - } + SBE_NODISCARD char unitOfMeasure(const std::uint64_t index) const + { + if (index >= 30) + { + throw std::runtime_error("index out of range for unitOfMeasure [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 139 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 139 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption55 & - unitOfMeasure(const std::uint64_t index, const char value) { - if (index >= 30) { - throw std::runtime_error( - "index out of range for unitOfMeasure [E105]"); - } + MDInstrumentDefinitionOption55 &unitOfMeasure(const std::uint64_t index, const char value) + { + if (index >= 30) + { + throw std::runtime_error("index out of range for unitOfMeasure [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 139 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 139 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getUnitOfMeasure(char *const dst, const std::uint64_t length) const { - if (length > 30) { - throw std::runtime_error( - "length too large for getUnitOfMeasure [E106]"); - } + std::uint64_t getUnitOfMeasure(char *const dst, const std::uint64_t length) const + { + if (length > 30) + { + throw std::runtime_error("length too large for getUnitOfMeasure [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 139, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 139, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionOption55 & - putUnitOfMeasure(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 139, src, sizeof(char) * 30); - return *this; - } + MDInstrumentDefinitionOption55 &putUnitOfMeasure(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 139, src, sizeof(char) * 30); + return *this; + } - std::string getUnitOfMeasureAsString() const { - const char *buffer = m_buffer + m_offset + 139; - size_t length = 0; + SBE_NODISCARD std::string getUnitOfMeasureAsString() const + { + const char *buffer = m_buffer + m_offset + 139; + size_t length = 0; - for (; length < 30 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getUnitOfMeasureAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getUnitOfMeasureAsString(); + std::string getUnitOfMeasureAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getUnitOfMeasureAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getUnitOfMeasureAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 139; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getUnitOfMeasureAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 139; + size_t length = 0; - for (; length < 30 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionOption55 & - putUnitOfMeasure(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 30) { - throw std::runtime_error( - "string too large for putUnitOfMeasure [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionOption55 &putUnitOfMeasure(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 30) + { + throw std::runtime_error("string too large for putUnitOfMeasure [E106]"); + } - std::memcpy(m_buffer + m_offset + 139, str.data(), srcLength); - for (size_t start = srcLength; start < 30; ++start) { - m_buffer[m_offset + 139 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 139, str.data(), srcLength); + for (size_t start = srcLength; start < 30; ++start) + { + m_buffer[m_offset + 139 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionOption55 &putUnitOfMeasure(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 30) { - throw std::runtime_error( - "string too large for putUnitOfMeasure [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionOption55 &putUnitOfMeasure(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 30) + { + throw std::runtime_error("string too large for putUnitOfMeasure [E106]"); + } - std::memcpy(m_buffer + m_offset + 139, str.c_str(), srcLength); - for (size_t start = srcLength; start < 30; ++start) { - m_buffer[m_offset + 139 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 139, str.c_str(), srcLength); + for (size_t start = srcLength; start < 30; ++start) + { + m_buffer[m_offset + 139 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char *UnitOfMeasureQtyMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UnitOfMeasureQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t unitOfMeasureQtyId() SBE_NOEXCEPT { - return 1147; - } + static SBE_CONSTEXPR std::uint16_t unitOfMeasureQtyId() SBE_NOEXCEPT + { + return 1147; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - unitOfMeasureQtySinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t unitOfMeasureQtySinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool unitOfMeasureQtyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool unitOfMeasureQtyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= unitOfMeasureQtySinceVersion(); + return m_actingVersion >= unitOfMeasureQtySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - unitOfMeasureQtyEncodingOffset() SBE_NOEXCEPT { - return 169; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t unitOfMeasureQtyEncodingOffset() SBE_NOEXCEPT + { + return 169; + } - private: - Decimal9NULL m_unitOfMeasureQty; +private: + Decimal9NULL m_unitOfMeasureQty; - public: - SBE_NODISCARD Decimal9NULL &unitOfMeasureQty() { - m_unitOfMeasureQty.wrap( - m_buffer, m_offset + 169, m_actingVersion, m_bufferLength); - return m_unitOfMeasureQty; - } +public: + SBE_NODISCARD Decimal9NULL &unitOfMeasureQty() + { + m_unitOfMeasureQty.wrap(m_buffer, m_offset + 169, m_actingVersion, m_bufferLength); + return m_unitOfMeasureQty; + } - SBE_NODISCARD static const char *TradingReferencePriceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TradingReferencePriceMetaAttribute(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 tradingReferencePriceId() SBE_NOEXCEPT { - return 1150; - } + static SBE_CONSTEXPR std::uint16_t tradingReferencePriceId() SBE_NOEXCEPT + { + return 1150; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradingReferencePriceSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingReferencePriceSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool tradingReferencePriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tradingReferencePriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tradingReferencePriceSinceVersion(); + return m_actingVersion >= tradingReferencePriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradingReferencePriceEncodingOffset() SBE_NOEXCEPT { - return 177; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingReferencePriceEncodingOffset() SBE_NOEXCEPT + { + return 177; + } - private: - PRICENULL9 m_tradingReferencePrice; +private: + PRICENULL9 m_tradingReferencePrice; - public: - SBE_NODISCARD PRICENULL9 &tradingReferencePrice() { - m_tradingReferencePrice.wrap( - m_buffer, m_offset + 177, m_actingVersion, m_bufferLength); - return m_tradingReferencePrice; - } +public: + SBE_NODISCARD PRICENULL9 &tradingReferencePrice() + { + m_tradingReferencePrice.wrap(m_buffer, m_offset + 177, m_actingVersion, m_bufferLength); + return m_tradingReferencePrice; + } - SBE_NODISCARD static const char * - SettlPriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SettlPriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT { - return 731; - } + static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT + { + return 731; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - settlPriceTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t settlPriceTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= settlPriceTypeSinceVersion(); + return m_actingVersion >= settlPriceTypeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingOffset() SBE_NOEXCEPT { - return 185; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingOffset() SBE_NOEXCEPT + { + return 185; + } - private: - SettlPriceType m_settlPriceType; +private: + SettlPriceType m_settlPriceType; - public: - SBE_NODISCARD SettlPriceType &settlPriceType() { - m_settlPriceType.wrap( - m_buffer, m_offset + 185, m_actingVersion, m_bufferLength); - return m_settlPriceType; - } +public: + SBE_NODISCARD SettlPriceType &settlPriceType() + { + m_settlPriceType.wrap(m_buffer, m_offset + 185, m_actingVersion, m_bufferLength); + return m_settlPriceType; + } - static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD static const char * - ClearedVolumeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *ClearedVolumeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t clearedVolumeId() SBE_NOEXCEPT { - return 5791; - } + static SBE_CONSTEXPR std::uint16_t clearedVolumeId() SBE_NOEXCEPT + { + return 5791; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - clearedVolumeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearedVolumeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool clearedVolumeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool clearedVolumeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= clearedVolumeSinceVersion(); + return m_actingVersion >= clearedVolumeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - clearedVolumeEncodingOffset() SBE_NOEXCEPT { - return 186; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearedVolumeEncodingOffset() SBE_NOEXCEPT + { + return 186; + } - static SBE_CONSTEXPR std::int32_t clearedVolumeNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t clearedVolumeMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t clearedVolumeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t clearedVolumeEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t clearedVolumeEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t clearedVolume() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 186, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t clearedVolume() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 186, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionOption55 & - clearedVolume(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 186, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionOption55 &clearedVolume(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 186, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char *OpenInterestQtyMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *OpenInterestQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t openInterestQtyId() SBE_NOEXCEPT { - return 5792; - } + static SBE_CONSTEXPR std::uint16_t openInterestQtyId() SBE_NOEXCEPT + { + return 5792; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - openInterestQtySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t openInterestQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool openInterestQtyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool openInterestQtyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= openInterestQtySinceVersion(); + return m_actingVersion >= openInterestQtySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - openInterestQtyEncodingOffset() SBE_NOEXCEPT { - return 190; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t openInterestQtyEncodingOffset() SBE_NOEXCEPT + { + return 190; + } - static SBE_CONSTEXPR std::int32_t openInterestQtyNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t openInterestQtyMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t openInterestQtyMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t - openInterestQtyEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t openInterestQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t openInterestQty() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 190, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t openInterestQty() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 190, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionOption55 & - openInterestQty(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 190, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionOption55 &openInterestQty(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 190, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char * - LowLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *LowLimitPriceMetaAttribute(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 lowLimitPriceId() SBE_NOEXCEPT { - return 1148; - } + static SBE_CONSTEXPR std::uint16_t lowLimitPriceId() SBE_NOEXCEPT + { + return 1148; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lowLimitPriceSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lowLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lowLimitPriceSinceVersion(); + return m_actingVersion >= lowLimitPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lowLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 194; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lowLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 194; + } - private: - PRICENULL9 m_lowLimitPrice; +private: + PRICENULL9 m_lowLimitPrice; - public: - SBE_NODISCARD PRICENULL9 &lowLimitPrice() { - m_lowLimitPrice.wrap( - m_buffer, m_offset + 194, m_actingVersion, m_bufferLength); - return m_lowLimitPrice; - } +public: + SBE_NODISCARD PRICENULL9 &lowLimitPrice() + { + m_lowLimitPrice.wrap(m_buffer, m_offset + 194, m_actingVersion, m_bufferLength); + return m_lowLimitPrice; + } - SBE_NODISCARD static const char * - HighLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *HighLimitPriceMetaAttribute(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 highLimitPriceId() SBE_NOEXCEPT { - return 1149; - } + static SBE_CONSTEXPR std::uint16_t highLimitPriceId() SBE_NOEXCEPT + { + return 1149; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - highLimitPriceSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t highLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= highLimitPriceSinceVersion(); + return m_actingVersion >= highLimitPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - highLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 202; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t highLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 202; + } - private: - PRICENULL9 m_highLimitPrice; +private: + PRICENULL9 m_highLimitPrice; - public: - SBE_NODISCARD PRICENULL9 &highLimitPrice() { - m_highLimitPrice.wrap( - m_buffer, m_offset + 202, m_actingVersion, m_bufferLength); - return m_highLimitPrice; - } +public: + SBE_NODISCARD PRICENULL9 &highLimitPrice() + { + m_highLimitPrice.wrap(m_buffer, m_offset + 202, m_actingVersion, m_bufferLength); + return m_highLimitPrice; + } - SBE_NODISCARD static const char *UserDefinedInstrumentMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UserDefinedInstrumentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t userDefinedInstrumentId() SBE_NOEXCEPT { - return 9779; - } + static SBE_CONSTEXPR std::uint16_t userDefinedInstrumentId() SBE_NOEXCEPT + { + return 9779; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - userDefinedInstrumentSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t userDefinedInstrumentSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool userDefinedInstrumentInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool userDefinedInstrumentInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= userDefinedInstrumentSinceVersion(); + return m_actingVersion >= userDefinedInstrumentSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - userDefinedInstrumentEncodingOffset() SBE_NOEXCEPT { - return 210; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t userDefinedInstrumentEncodingOffset() SBE_NOEXCEPT + { + return 210; + } - static SBE_CONSTEXPR char userDefinedInstrumentNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char userDefinedInstrumentNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char userDefinedInstrumentMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char userDefinedInstrumentMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char userDefinedInstrumentMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char userDefinedInstrumentMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - userDefinedInstrumentEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t userDefinedInstrumentEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD char userDefinedInstrument() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 210, sizeof(char)); - return (val); - } + SBE_NODISCARD char userDefinedInstrument() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 210, sizeof(char)); + return (val); + } - MDInstrumentDefinitionOption55 & - userDefinedInstrument(const char value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 210, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionOption55 &userDefinedInstrument(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 210, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "LocalMktDate"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute(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 tradingReferenceDateId() SBE_NOEXCEPT { - return 5796; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateId() SBE_NOEXCEPT + { + return 5796; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradingReferenceDateSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingReferenceDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tradingReferenceDateSinceVersion(); + return m_actingVersion >= tradingReferenceDateSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingOffset() SBE_NOEXCEPT { - return 211; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingOffset() SBE_NOEXCEPT + { + return 211; + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateNullValue() SBE_NOEXCEPT { - return (std::uint16_t)65535; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 211, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 211, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MDInstrumentDefinitionOption55 & - tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 211, &val, sizeof(std::uint16_t)); - return *this; - } + MDInstrumentDefinitionOption55 &tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 211, &val, sizeof(std::uint16_t)); + return *this; + } - class NoEvents { + class NoEvents + { 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; + 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; - } + 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 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) { + 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(9)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 9; + 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 9; + } + + 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 NoEvents &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *EventTypeMetaAttribute(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 eventTypeId() SBE_NOEXCEPT + { + return 865; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t eventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool eventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= eventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD EventType::Value eventType() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); + return EventType::get((val)); + } + + NoEvents &eventType(const EventType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *EventTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t eventTimeId() SBE_NOEXCEPT + { + return 1145; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t eventTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool eventTimeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= eventTimeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTimeEncodingOffset() SBE_NOEXCEPT + { + return 1; + } + + static SBE_CONSTEXPR std::uint64_t eventTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t eventTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t eventTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t eventTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t eventTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoEvents &eventTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint64_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoEvents writer) + { + builder << '{'; + builder << R"("EventType": )"; + builder << '"' << writer.eventType() << '"'; + + builder << ", "; + builder << R"("EventTime": )"; + builder << +writer.eventTime(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)9); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 9; - 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; - } +private: + NoEvents m_noEvents; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 9; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoEventsId() SBE_NOEXCEPT + { + return 864; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoEvents &noEvents() + { + m_noEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noEvents; + } - 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; - } + NoEvents &noEventsCount(const std::uint8_t count) + { + m_noEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noEvents; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoEvents &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - EventTypeMetaAttribute(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 eventTypeId() SBE_NOEXCEPT { - return 865; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - eventTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool eventTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noEventsInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= eventTypeSinceVersion(); + return m_actingVersion >= noEventsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD EventType::Value eventType() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); - return EventType::get((val)); - } - - NoEvents &eventType(const EventType::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - EventTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t eventTimeId() SBE_NOEXCEPT { - return 1145; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - eventTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool eventTimeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= eventTimeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTimeEncodingOffset() SBE_NOEXCEPT { - return 1; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t eventTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t eventTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoEvents &eventTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint64_t)); - return *this; - } - - template - friend std::basic_ostream & - operator<<(std::basic_ostream &builder, NoEvents writer) { - builder << '{'; - builder << R"("EventType": )"; - builder << '"' << writer.eventType() << '"'; - - builder << ", "; - builder << R"("EventTime": )"; - builder << +writer.eventTime(); - - builder << '}'; - - return builder; - } - }; - - private: - NoEvents m_noEvents; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoEventsId() SBE_NOEXCEPT { - return 864; - } - - SBE_NODISCARD inline NoEvents &noEvents() { - m_noEvents.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noEvents; - } - - NoEvents &noEventsCount(const std::uint8_t count) { - m_noEvents.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noEvents; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noEventsSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noEventsInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noEventsSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoMDFeedTypes { + class NoMDFeedTypes + { 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; + 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; - } + 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 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) { + 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 NoMDFeedTypes &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *MDFeedTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDFeedTypeId() SBE_NOEXCEPT + { + return 1022; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDFeedTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDFeedTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDFeedTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char mDFeedTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char mDFeedTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char mDFeedTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingLength() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t mDFeedTypeLength() SBE_NOEXCEPT + { + return 3; + } + + SBE_NODISCARD const char *mDFeedType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *mDFeedType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char mDFeedType(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for mDFeedType [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoMDFeedTypes &mDFeedType(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for mDFeedType [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getMDFeedType(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getMDFeedType [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoMDFeedTypes &putMDFeedType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 3); + return *this; + } + + NoMDFeedTypes &putMDFeedType( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 0, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 1, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 2, &val2, sizeof(char)); + + return *this; + } + + SBE_NODISCARD std::string getMDFeedTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getMDFeedTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMDFeedTypeAsString(); + + 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 getMDFeedTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoMDFeedTypes &putMDFeedType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putMDFeedType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoMDFeedTypes &putMDFeedType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putMDFeedType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *MarketDepthMetaAttribute(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 marketDepthId() SBE_NOEXCEPT + { + return 264; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketDepthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool marketDepthInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= marketDepthSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketDepthEncodingOffset() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::int8_t marketDepthNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t marketDepthMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t marketDepthMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t marketDepthEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t marketDepth() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 3, sizeof(std::int8_t)); + return (val); + } + + NoMDFeedTypes &marketDepth(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 3, &val, sizeof(std::int8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDFeedTypes writer) + { + builder << '{'; + builder << R"("MDFeedType": )"; + builder << '"' << + writer.getMDFeedTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("MarketDepth": )"; + builder << +writer.marketDepth(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)4); - dimensions.numInGroup((std::uint8_t)count); - m_index = 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; - } +private: + NoMDFeedTypes m_noMDFeedTypes; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 4; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDFeedTypesId() SBE_NOEXCEPT + { + return 1141; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDFeedTypes &noMDFeedTypes() + { + m_noMDFeedTypes.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDFeedTypes; + } - 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; - } + NoMDFeedTypes &noMDFeedTypesCount(const std::uint8_t count) + { + m_noMDFeedTypes.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDFeedTypes; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDFeedTypesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDFeedTypes &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - MDFeedTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDFeedTypeId() SBE_NOEXCEPT { - return 1022; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDFeedTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDFeedTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDFeedTypesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDFeedTypeSinceVersion(); + return m_actingVersion >= noMDFeedTypesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDFeedTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR char mDFeedTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char mDFeedTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char mDFeedTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingLength() SBE_NOEXCEPT { - return 3; - } - - static SBE_CONSTEXPR std::uint64_t mDFeedTypeLength() SBE_NOEXCEPT { - return 3; - } - - SBE_NODISCARD const char *mDFeedType() const SBE_NOEXCEPT { - return m_buffer + m_offset + 0; - } - - SBE_NODISCARD char *mDFeedType() SBE_NOEXCEPT { - return m_buffer + m_offset + 0; - } - - SBE_NODISCARD char mDFeedType(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error( - "index out of range for mDFeedType [E104]"); - } - - char val; - std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); - return (val); - } - - NoMDFeedTypes &mDFeedType(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error( - "index out of range for mDFeedType [E105]"); - } - - char val = (value); - std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); - return *this; - } - - std::uint64_t - getMDFeedType(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error( - "length too large for getMDFeedType [E106]"); - } - - std::memcpy( - dst, m_buffer + m_offset + 0, - sizeof(char) * static_cast(length)); - return length; - } - - NoMDFeedTypes &putMDFeedType(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 3); - return *this; - } - - NoMDFeedTypes & - putMDFeedType(const char value0, const char value1, const char value2) - SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 0, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 1, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 2, &val2, sizeof(char)); - - return *this; - } - - std::string getMDFeedTypeAsString() const { - const char *buffer = m_buffer + m_offset + 0; - size_t length = 0; - - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); - - return result; - } - - std::string getMDFeedTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getMDFeedTypeAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } - } - } - - return oss.str(); - } - -#if __cplusplus >= 201703L - std::string_view getMDFeedTypeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 0; - size_t length = 0; - - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); - - return result; - } -#endif - -#if __cplusplus >= 201703L - NoMDFeedTypes &putMDFeedType(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putMDFeedType [E106]"); - } - - std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 0 + start] = 0; - } - - return *this; - } -#else - NoMDFeedTypes &putMDFeedType(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putMDFeedType [E106]"); - } - - std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 0 + start] = 0; - } - - return *this; - } -#endif - - SBE_NODISCARD static const char * - MarketDepthMetaAttribute(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 marketDepthId() SBE_NOEXCEPT { - return 264; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - marketDepthSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool marketDepthInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= marketDepthSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - marketDepthEncodingOffset() SBE_NOEXCEPT { - return 3; - } - - static SBE_CONSTEXPR std::int8_t marketDepthNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t marketDepthMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t marketDepthMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t - marketDepthEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::int8_t marketDepth() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 3, sizeof(std::int8_t)); - return (val); - } - - NoMDFeedTypes &marketDepth(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 3, &val, sizeof(std::int8_t)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDFeedTypes writer) { - builder << '{'; - builder << R"("MDFeedType": )"; - builder << '"' << writer.getMDFeedTypeAsJsonEscapedString().c_str() - << '"'; - - builder << ", "; - builder << R"("MarketDepth": )"; - builder << +writer.marketDepth(); - - builder << '}'; - - return builder; - } - }; - - private: - NoMDFeedTypes m_noMDFeedTypes; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDFeedTypesId() SBE_NOEXCEPT { - return 1141; - } - - SBE_NODISCARD inline NoMDFeedTypes &noMDFeedTypes() { - m_noMDFeedTypes.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDFeedTypes; - } - - NoMDFeedTypes &noMDFeedTypesCount(const std::uint8_t count) { - m_noMDFeedTypes.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDFeedTypes; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDFeedTypesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDFeedTypesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDFeedTypesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoInstAttrib { + class NoInstAttrib + { 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; + 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; - } + 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 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) { + 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 NoInstAttrib &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *InstAttribTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t instAttribTypeId() SBE_NOEXCEPT + { + return 871; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t instAttribTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool instAttribTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= instAttribTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t instAttribTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t instAttribTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t instAttribType() SBE_NOEXCEPT + { + return static_cast(24); + } + + SBE_NODISCARD static const char *InstAttribValueMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t instAttribValueId() SBE_NOEXCEPT + { + return 872; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t instAttribValueSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool instAttribValueInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= instAttribValueSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t instAttribValueEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + private: + InstAttribValue m_instAttribValue; + + public: + SBE_NODISCARD InstAttribValue &instAttribValue() + { + m_instAttribValue.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_instAttribValue; + } + + static SBE_CONSTEXPR std::size_t instAttribValueEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoInstAttrib writer) + { + builder << '{'; + builder << R"("InstAttribValue": )"; + builder << writer.instAttribValue(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)4); - dimensions.numInGroup((std::uint8_t)count); - m_index = 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; - } +private: + NoInstAttrib m_noInstAttrib; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 4; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoInstAttribId() SBE_NOEXCEPT + { + return 870; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoInstAttrib &noInstAttrib() + { + m_noInstAttrib.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noInstAttrib; + } - 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; - } + NoInstAttrib &noInstAttribCount(const std::uint8_t count) + { + m_noInstAttrib.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noInstAttrib; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noInstAttribSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoInstAttrib &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char *InstAttribTypeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t instAttribTypeId() SBE_NOEXCEPT { - return 871; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - instAttribTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool instAttribTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noInstAttribInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= instAttribTypeSinceVersion(); + return m_actingVersion >= noInstAttribSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - instAttribTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t - instAttribTypeEncodingLength() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::int8_t - instAttribType() SBE_NOEXCEPT { - return (std::int8_t)24; - } - - SBE_NODISCARD static const char *InstAttribValueMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t instAttribValueId() SBE_NOEXCEPT { - return 872; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - instAttribValueSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool instAttribValueInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= instAttribValueSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - instAttribValueEncodingOffset() SBE_NOEXCEPT { - return 0; - } + } + class NoLotTypeRules + { private: - InstAttribValue m_instAttribValue; + 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: - SBE_NODISCARD InstAttribValue &instAttribValue() { - m_instAttribValue.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_instAttribValue; - } + 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; + } - static SBE_CONSTEXPR std::size_t - instAttribValueEncodingLength() SBE_NOEXCEPT { - return 4; - } + 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(5)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 5; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoInstAttrib writer) { - builder << '{'; - builder << R"("InstAttribValue": )"; - builder << writer.instAttribValue(); + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } - builder << '}'; + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 5; + } - return builder; - } - }; + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - private: - NoInstAttrib m_noInstAttrib; + // 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; + } - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoInstAttribId() SBE_NOEXCEPT { - return 870; - } + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - SBE_NODISCARD inline NoInstAttrib &noInstAttrib() { - m_noInstAttrib.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noInstAttrib; - } + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - NoInstAttrib &noInstAttribCount(const std::uint8_t count) { - m_noInstAttrib.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noInstAttrib; - } + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noInstAttribSinceVersion() SBE_NOEXCEPT { - return 0; - } + inline NoLotTypeRules &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; - SBE_NODISCARD bool noInstAttribInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noInstAttribSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } + return *this; + } - class NoLotTypeRules { - 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; + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } - SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { - return m_positionPtr; - } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - 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; - } + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - inline void wrapForEncode( - char *buffer, - const std::uint8_t count, - std::uint64_t *pos, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { + #endif + + SBE_NODISCARD static const char *LotTypeMetaAttribute(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 lotTypeId() SBE_NOEXCEPT + { + return 1093; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lotTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lotTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= lotTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lotTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int8_t lotTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t lotTypeMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t lotTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t lotTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t lotType() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int8_t)); + return (val); + } + + NoLotTypeRules &lotType(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int8_t)); + return *this; + } + + SBE_NODISCARD static const char *MinLotSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t minLotSizeId() SBE_NOEXCEPT + { + return 1231; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minLotSizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool minLotSizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= minLotSizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minLotSizeEncodingOffset() SBE_NOEXCEPT + { + return 1; + } + +private: + DecimalQty m_minLotSize; + +public: + SBE_NODISCARD DecimalQty &minLotSize() + { + m_minLotSize.wrap(m_buffer, m_offset + 1, m_actingVersion, m_bufferLength); + return m_minLotSize; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoLotTypeRules writer) + { + builder << '{'; + builder << R"("LotType": )"; + builder << +writer.lotType(); + + builder << ", "; + builder << R"("MinLotSize": )"; + builder << writer.minLotSize(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)5); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 5; - 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; - } +private: + NoLotTypeRules m_noLotTypeRules; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 5; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLotTypeRulesId() SBE_NOEXCEPT + { + return 1234; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoLotTypeRules &noLotTypeRules() + { + m_noLotTypeRules.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLotTypeRules; + } - 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; - } + NoLotTypeRules &noLotTypeRulesCount(const std::uint8_t count) + { + m_noLotTypeRules.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLotTypeRules; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noLotTypeRulesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoLotTypeRules &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - LotTypeMetaAttribute(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 lotTypeId() SBE_NOEXCEPT { - return 1093; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lotTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool lotTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noLotTypeRulesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lotTypeSinceVersion(); + return m_actingVersion >= noLotTypeRulesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lotTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int8_t lotTypeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t lotTypeMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t lotTypeMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t lotTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::int8_t lotType() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int8_t)); - return (val); - } - - NoLotTypeRules &lotType(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int8_t)); - return *this; - } - - SBE_NODISCARD static const char * - MinLotSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t minLotSizeId() SBE_NOEXCEPT { - return 1231; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minLotSizeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool minLotSizeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= minLotSizeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minLotSizeEncodingOffset() SBE_NOEXCEPT { - return 1; - } + } + class NoUnderlyings + { private: - DecimalQty m_minLotSize; + 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: - SBE_NODISCARD DecimalQty &minLotSize() { - m_minLotSize.wrap( - m_buffer, m_offset + 1, m_actingVersion, m_bufferLength); - return m_minLotSize; - } + 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; + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoLotTypeRules writer) { - builder << '{'; - builder << R"("LotType": )"; - builder << +writer.lotType(); + 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(24)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 24; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } - builder << ", "; - builder << R"("MinLotSize": )"; - builder << writer.minLotSize(); + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } - builder << '}'; + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 24; + } - return builder; - } - }; + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - private: - NoLotTypeRules m_noLotTypeRules; + // 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; + } - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoLotTypeRulesId() SBE_NOEXCEPT { - return 1234; - } + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - SBE_NODISCARD inline NoLotTypeRules &noLotTypeRules() { - m_noLotTypeRules.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noLotTypeRules; - } + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - NoLotTypeRules &noLotTypeRulesCount(const std::uint8_t count) { - m_noLotTypeRules.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noLotTypeRules; - } + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noLotTypeRulesSinceVersion() SBE_NOEXCEPT { - return 0; - } + inline NoUnderlyings &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; - SBE_NODISCARD bool noLotTypeRulesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noLotTypeRulesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } + return *this; + } - class NoUnderlyings { - 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; + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } - SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { - return m_positionPtr; - } + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - 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; - } + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - inline void wrapForEncode( - char *buffer, - const std::uint8_t count, - std::uint64_t *pos, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { + #endif + + SBE_NODISCARD static const char *UnderlyingSecurityIDMetaAttribute(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 underlyingSecurityIDId() SBE_NOEXCEPT + { + return 309; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t underlyingSecurityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool underlyingSecurityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= underlyingSecurityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t underlyingSecurityIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int32_t underlyingSecurityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t underlyingSecurityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t underlyingSecurityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t underlyingSecurityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t underlyingSecurityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoUnderlyings &underlyingSecurityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *UnderlyingSecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t underlyingSecurityIDSourceId() SBE_NOEXCEPT + { + return 305; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t underlyingSecurityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool underlyingSecurityIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= underlyingSecurityIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t underlyingSecurityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR char underlyingSecurityIDSourceNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char underlyingSecurityIDSourceMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char underlyingSecurityIDSourceMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t underlyingSecurityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t underlyingSecurityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *underlyingSecurityIDSource() const + { + static const std::uint8_t underlyingSecurityIDSourceValues[] = { 56 }; + + return (const char *)underlyingSecurityIDSourceValues; + } + + SBE_NODISCARD char underlyingSecurityIDSource(const std::uint64_t index) const + { + static const std::uint8_t underlyingSecurityIDSourceValues[] = { 56 }; + + return (char)underlyingSecurityIDSourceValues[index]; + } + + std::uint64_t getUnderlyingSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t underlyingSecurityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(underlyingSecurityIDSourceValues) ? length : sizeof(underlyingSecurityIDSourceValues); + + std::memcpy(dst, underlyingSecurityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getUnderlyingSecurityIDSourceAsString() const + { + static const std::uint8_t UnderlyingSecurityIDSourceValues[] = { 56 }; + + return std::string((const char *)UnderlyingSecurityIDSourceValues, 1); + } + + std::string getUnderlyingSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getUnderlyingSecurityIDSourceAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char *UnderlyingSymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t underlyingSymbolId() SBE_NOEXCEPT + { + return 311; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t underlyingSymbolSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool underlyingSymbolInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= underlyingSymbolSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t underlyingSymbolEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR char underlyingSymbolNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char underlyingSymbolMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char underlyingSymbolMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t underlyingSymbolEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t underlyingSymbolLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *underlyingSymbol() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 4; + } + + SBE_NODISCARD char *underlyingSymbol() SBE_NOEXCEPT + { + return m_buffer + m_offset + 4; + } + + SBE_NODISCARD char underlyingSymbol(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for underlyingSymbol [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 4 + (index * 1), sizeof(char)); + return (val); + } + + NoUnderlyings &underlyingSymbol(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for underlyingSymbol [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 4 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getUnderlyingSymbol(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getUnderlyingSymbol [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 4, sizeof(char) * static_cast(length)); + return length; + } + + NoUnderlyings &putUnderlyingSymbol(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 4, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getUnderlyingSymbolAsString() const + { + const char *buffer = m_buffer + m_offset + 4; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getUnderlyingSymbolAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getUnderlyingSymbolAsString(); + + 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 getUnderlyingSymbolAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 4; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoUnderlyings &putUnderlyingSymbol(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putUnderlyingSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 4, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 4 + start] = 0; + } + + return *this; + } + #else + NoUnderlyings &putUnderlyingSymbol(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putUnderlyingSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 4, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 4 + start] = 0; + } + + return *this; + } + #endif + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoUnderlyings writer) + { + builder << '{'; + builder << R"("UnderlyingSecurityID": )"; + builder << +writer.underlyingSecurityID(); + + builder << ", "; + builder << R"("UnderlyingSymbol": )"; + builder << '"' << + writer.getUnderlyingSymbolAsJsonEscapedString().c_str() << '"'; + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static std::size_t computeLength() + { #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)24); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 24; - 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; - } +private: + NoUnderlyings m_noUnderlyings; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 24; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoUnderlyingsId() SBE_NOEXCEPT + { + return 711; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoUnderlyings &noUnderlyings() + { + m_noUnderlyings.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noUnderlyings; + } - 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; - } + NoUnderlyings &noUnderlyingsCount(const std::uint8_t count) + { + m_noUnderlyings.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noUnderlyings; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noUnderlyingsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoUnderlyings &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char *UnderlyingSecurityIDMetaAttribute( - 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 underlyingSecurityIDId() SBE_NOEXCEPT { - return 309; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - underlyingSecurityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool underlyingSecurityIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noUnderlyingsInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= underlyingSecurityIDSinceVersion(); + return m_actingVersion >= noUnderlyingsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - underlyingSecurityIDEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int32_t - underlyingSecurityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t - underlyingSecurityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t - underlyingSecurityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - underlyingSecurityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t underlyingSecurityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoUnderlyings & - underlyingSecurityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char *UnderlyingSecurityIDSourceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t - underlyingSecurityIDSourceId() SBE_NOEXCEPT { - return 305; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - underlyingSecurityIDSourceSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool - underlyingSecurityIDSourceInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= underlyingSecurityIDSourceSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - underlyingSecurityIDSourceEncodingOffset() SBE_NOEXCEPT { - return 4; - } - - static SBE_CONSTEXPR char - underlyingSecurityIDSourceNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char - underlyingSecurityIDSourceMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char - underlyingSecurityIDSourceMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t - underlyingSecurityIDSourceEncodingLength() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t - underlyingSecurityIDSourceLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD const char *underlyingSecurityIDSource() const { - static const std::uint8_t underlyingSecurityIDSourceValues[] = {56}; - - return (const char *)underlyingSecurityIDSourceValues; - } - - SBE_NODISCARD char - underlyingSecurityIDSource(const std::uint64_t index) const { - static const std::uint8_t underlyingSecurityIDSourceValues[] = {56}; - - return (char)underlyingSecurityIDSourceValues[index]; - } - - std::uint64_t getUnderlyingSecurityIDSource( - char *dst, const std::uint64_t length) const { - static std::uint8_t underlyingSecurityIDSourceValues[] = {56}; - std::uint64_t bytesToCopy = - length < sizeof(underlyingSecurityIDSourceValues) - ? length - : sizeof(underlyingSecurityIDSourceValues); - - std::memcpy( - dst, underlyingSecurityIDSourceValues, - static_cast(bytesToCopy)); - return bytesToCopy; - } - - std::string getUnderlyingSecurityIDSourceAsString() const { - static const std::uint8_t UnderlyingSecurityIDSourceValues[] = {56}; - - return std::string((const char *)UnderlyingSecurityIDSourceValues, 1); - } - - std::string getUnderlyingSecurityIDSourceAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getUnderlyingSecurityIDSourceAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } - } - } - - return oss.str(); - } - - SBE_NODISCARD static const char *UnderlyingSymbolMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t underlyingSymbolId() SBE_NOEXCEPT { - return 311; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - underlyingSymbolSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool underlyingSymbolInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= underlyingSymbolSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - underlyingSymbolEncodingOffset() SBE_NOEXCEPT { - return 4; - } - - static SBE_CONSTEXPR char underlyingSymbolNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char underlyingSymbolMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char underlyingSymbolMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t - underlyingSymbolEncodingLength() SBE_NOEXCEPT { - return 20; - } - - static SBE_CONSTEXPR std::uint64_t underlyingSymbolLength() SBE_NOEXCEPT { - return 20; - } - - SBE_NODISCARD const char *underlyingSymbol() const SBE_NOEXCEPT { - return m_buffer + m_offset + 4; - } - - SBE_NODISCARD char *underlyingSymbol() SBE_NOEXCEPT { - return m_buffer + m_offset + 4; - } - - SBE_NODISCARD char underlyingSymbol(const std::uint64_t index) const { - if (index >= 20) { - throw std::runtime_error( - "index out of range for underlyingSymbol [E104]"); - } - - char val; - std::memcpy(&val, m_buffer + m_offset + 4 + (index * 1), sizeof(char)); - return (val); - } - - NoUnderlyings & - underlyingSymbol(const std::uint64_t index, const char value) { - if (index >= 20) { - throw std::runtime_error( - "index out of range for underlyingSymbol [E105]"); - } - - char val = (value); - std::memcpy(m_buffer + m_offset + 4 + (index * 1), &val, sizeof(char)); - return *this; - } - - std::uint64_t - getUnderlyingSymbol(char *const dst, const std::uint64_t length) const { - if (length > 20) { - throw std::runtime_error( - "length too large for getUnderlyingSymbol [E106]"); - } - - std::memcpy( - dst, m_buffer + m_offset + 4, - sizeof(char) * static_cast(length)); - return length; - } - - NoUnderlyings &putUnderlyingSymbol(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 4, src, sizeof(char) * 20); - return *this; - } - - std::string getUnderlyingSymbolAsString() const { - const char *buffer = m_buffer + m_offset + 4; - size_t length = 0; - - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); - - return result; - } - - std::string getUnderlyingSymbolAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getUnderlyingSymbolAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } - } - } - - return oss.str(); - } - -#if __cplusplus >= 201703L - std::string_view getUnderlyingSymbolAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 4; - size_t length = 0; - - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); - - return result; - } -#endif - -#if __cplusplus >= 201703L - NoUnderlyings &putUnderlyingSymbol(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error( - "string too large for putUnderlyingSymbol [E106]"); - } - - std::memcpy(m_buffer + m_offset + 4, str.data(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 4 + start] = 0; - } - - return *this; - } -#else - NoUnderlyings &putUnderlyingSymbol(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error( - "string too large for putUnderlyingSymbol [E106]"); - } - - std::memcpy(m_buffer + m_offset + 4, str.c_str(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 4 + start] = 0; - } - - return *this; - } -#endif - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoUnderlyings writer) { - builder << '{'; - builder << R"("UnderlyingSecurityID": )"; - builder << +writer.underlyingSecurityID(); - - builder << ", "; - builder << R"("UnderlyingSymbol": )"; - builder << '"' - << writer.getUnderlyingSymbolAsJsonEscapedString().c_str() - << '"'; - - builder << '}'; - - return builder; - } - }; - - private: - NoUnderlyings m_noUnderlyings; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoUnderlyingsId() SBE_NOEXCEPT { - return 711; - } - - SBE_NODISCARD inline NoUnderlyings &noUnderlyings() { - m_noUnderlyings.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noUnderlyings; - } - - NoUnderlyings &noUnderlyingsCount(const std::uint8_t count) { - m_noUnderlyings.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noUnderlyings; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noUnderlyingsSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noUnderlyingsInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noUnderlyingsSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoRelatedInstruments { + class NoRelatedInstruments + { 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; + 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; - } + 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 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) { + 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(24)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 24; + 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 24; + } + + 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 NoRelatedInstruments &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *RelatedSecurityIDMetaAttribute(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 relatedSecurityIDId() SBE_NOEXCEPT + { + return 1650; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t relatedSecurityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool relatedSecurityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= relatedSecurityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t relatedSecurityIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int32_t relatedSecurityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t relatedSecurityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t relatedSecurityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t relatedSecurityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t relatedSecurityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoRelatedInstruments &relatedSecurityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *RelatedSecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t relatedSecurityIDSourceId() SBE_NOEXCEPT + { + return 1651; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t relatedSecurityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool relatedSecurityIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= relatedSecurityIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t relatedSecurityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR char relatedSecurityIDSourceNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char relatedSecurityIDSourceMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char relatedSecurityIDSourceMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t relatedSecurityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t relatedSecurityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *relatedSecurityIDSource() const + { + static const std::uint8_t relatedSecurityIDSourceValues[] = { 56 }; + + return (const char *)relatedSecurityIDSourceValues; + } + + SBE_NODISCARD char relatedSecurityIDSource(const std::uint64_t index) const + { + static const std::uint8_t relatedSecurityIDSourceValues[] = { 56 }; + + return (char)relatedSecurityIDSourceValues[index]; + } + + std::uint64_t getRelatedSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t relatedSecurityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(relatedSecurityIDSourceValues) ? length : sizeof(relatedSecurityIDSourceValues); + + std::memcpy(dst, relatedSecurityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getRelatedSecurityIDSourceAsString() const + { + static const std::uint8_t RelatedSecurityIDSourceValues[] = { 56 }; + + return std::string((const char *)RelatedSecurityIDSourceValues, 1); + } + + std::string getRelatedSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getRelatedSecurityIDSourceAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char *RelatedSymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t relatedSymbolId() SBE_NOEXCEPT + { + return 1649; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t relatedSymbolSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool relatedSymbolInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= relatedSymbolSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t relatedSymbolEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR char relatedSymbolNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char relatedSymbolMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char relatedSymbolMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t relatedSymbolEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t relatedSymbolLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *relatedSymbol() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 4; + } + + SBE_NODISCARD char *relatedSymbol() SBE_NOEXCEPT + { + return m_buffer + m_offset + 4; + } + + SBE_NODISCARD char relatedSymbol(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for relatedSymbol [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 4 + (index * 1), sizeof(char)); + return (val); + } + + NoRelatedInstruments &relatedSymbol(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for relatedSymbol [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 4 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getRelatedSymbol(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getRelatedSymbol [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 4, sizeof(char) * static_cast(length)); + return length; + } + + NoRelatedInstruments &putRelatedSymbol(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 4, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getRelatedSymbolAsString() const + { + const char *buffer = m_buffer + m_offset + 4; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getRelatedSymbolAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getRelatedSymbolAsString(); + + 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 getRelatedSymbolAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 4; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoRelatedInstruments &putRelatedSymbol(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putRelatedSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 4, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 4 + start] = 0; + } + + return *this; + } + #else + NoRelatedInstruments &putRelatedSymbol(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putRelatedSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 4, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 4 + start] = 0; + } + + return *this; + } + #endif + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoRelatedInstruments writer) + { + builder << '{'; + builder << R"("RelatedSecurityID": )"; + builder << +writer.relatedSecurityID(); + + builder << ", "; + builder << R"("RelatedSymbol": )"; + builder << '"' << + writer.getRelatedSymbolAsJsonEscapedString().c_str() << '"'; + + builder << '}'; + + return builder; + } + + void skip() + { + } + + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } + + SBE_NODISCARD static std::size_t computeLength() + { #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)24); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 24; - 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; - } +private: + NoRelatedInstruments m_noRelatedInstruments; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 24; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoRelatedInstrumentsId() SBE_NOEXCEPT + { + return 1647; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoRelatedInstruments &noRelatedInstruments() + { + m_noRelatedInstruments.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noRelatedInstruments; + } - 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; - } + NoRelatedInstruments &noRelatedInstrumentsCount(const std::uint8_t count) + { + m_noRelatedInstruments.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noRelatedInstruments; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noRelatedInstrumentsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoRelatedInstruments &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char *RelatedSecurityIDMetaAttribute( - 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 relatedSecurityIDId() SBE_NOEXCEPT { - return 1650; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - relatedSecurityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool relatedSecurityIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noRelatedInstrumentsInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= relatedSecurityIDSinceVersion(); + return m_actingVersion >= noRelatedInstrumentsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - relatedSecurityIDEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int32_t - relatedSecurityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t - relatedSecurityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t - relatedSecurityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - relatedSecurityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t relatedSecurityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoRelatedInstruments & - relatedSecurityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char *RelatedSecurityIDSourceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t - relatedSecurityIDSourceId() SBE_NOEXCEPT { - return 1651; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - relatedSecurityIDSourceSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool relatedSecurityIDSourceInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= relatedSecurityIDSourceSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - relatedSecurityIDSourceEncodingOffset() SBE_NOEXCEPT { - return 4; - } - - static SBE_CONSTEXPR char - relatedSecurityIDSourceNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char relatedSecurityIDSourceMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char relatedSecurityIDSourceMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t - relatedSecurityIDSourceEncodingLength() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t - relatedSecurityIDSourceLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD const char *relatedSecurityIDSource() const { - static const std::uint8_t relatedSecurityIDSourceValues[] = {56}; - - return (const char *)relatedSecurityIDSourceValues; - } - - SBE_NODISCARD char - relatedSecurityIDSource(const std::uint64_t index) const { - static const std::uint8_t relatedSecurityIDSourceValues[] = {56}; - - return (char)relatedSecurityIDSourceValues[index]; - } - - std::uint64_t - getRelatedSecurityIDSource(char *dst, const std::uint64_t length) const { - static std::uint8_t relatedSecurityIDSourceValues[] = {56}; - std::uint64_t bytesToCopy = - length < sizeof(relatedSecurityIDSourceValues) - ? length - : sizeof(relatedSecurityIDSourceValues); - - std::memcpy( - dst, relatedSecurityIDSourceValues, - static_cast(bytesToCopy)); - return bytesToCopy; - } - - std::string getRelatedSecurityIDSourceAsString() const { - static const std::uint8_t RelatedSecurityIDSourceValues[] = {56}; - - return std::string((const char *)RelatedSecurityIDSourceValues, 1); - } - - std::string getRelatedSecurityIDSourceAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getRelatedSecurityIDSourceAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } - } - } - - return oss.str(); - } - - SBE_NODISCARD static const char *RelatedSymbolMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t relatedSymbolId() SBE_NOEXCEPT { - return 1649; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - relatedSymbolSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool relatedSymbolInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= relatedSymbolSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - relatedSymbolEncodingOffset() SBE_NOEXCEPT { - return 4; - } - - static SBE_CONSTEXPR char relatedSymbolNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char relatedSymbolMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char relatedSymbolMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t - relatedSymbolEncodingLength() SBE_NOEXCEPT { - return 20; - } - - static SBE_CONSTEXPR std::uint64_t relatedSymbolLength() SBE_NOEXCEPT { - return 20; - } - - SBE_NODISCARD const char *relatedSymbol() const SBE_NOEXCEPT { - return m_buffer + m_offset + 4; - } - - SBE_NODISCARD char *relatedSymbol() SBE_NOEXCEPT { - return m_buffer + m_offset + 4; - } - - SBE_NODISCARD char relatedSymbol(const std::uint64_t index) const { - if (index >= 20) { - throw std::runtime_error( - "index out of range for relatedSymbol [E104]"); - } - - char val; - std::memcpy(&val, m_buffer + m_offset + 4 + (index * 1), sizeof(char)); - return (val); - } - - NoRelatedInstruments & - relatedSymbol(const std::uint64_t index, const char value) { - if (index >= 20) { - throw std::runtime_error( - "index out of range for relatedSymbol [E105]"); - } - - char val = (value); - std::memcpy(m_buffer + m_offset + 4 + (index * 1), &val, sizeof(char)); - return *this; - } - - std::uint64_t - getRelatedSymbol(char *const dst, const std::uint64_t length) const { - if (length > 20) { - throw std::runtime_error( - "length too large for getRelatedSymbol [E106]"); - } - - std::memcpy( - dst, m_buffer + m_offset + 4, - sizeof(char) * static_cast(length)); - return length; - } - - NoRelatedInstruments & - putRelatedSymbol(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 4, src, sizeof(char) * 20); - return *this; - } - - std::string getRelatedSymbolAsString() const { - const char *buffer = m_buffer + m_offset + 4; - size_t length = 0; - - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); - - return result; - } - - std::string getRelatedSymbolAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getRelatedSymbolAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } - } - } - - return oss.str(); - } - -#if __cplusplus >= 201703L - std::string_view getRelatedSymbolAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 4; - size_t length = 0; - - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); - - return result; - } -#endif - -#if __cplusplus >= 201703L - NoRelatedInstruments &putRelatedSymbol(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error( - "string too large for putRelatedSymbol [E106]"); - } - - std::memcpy(m_buffer + m_offset + 4, str.data(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 4 + start] = 0; - } - - return *this; - } -#else - NoRelatedInstruments &putRelatedSymbol(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error( - "string too large for putRelatedSymbol [E106]"); - } - - std::memcpy(m_buffer + m_offset + 4, str.c_str(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 4 + start] = 0; - } - - return *this; - } -#endif - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - NoRelatedInstruments writer) { - builder << '{'; - builder << R"("RelatedSecurityID": )"; - builder << +writer.relatedSecurityID(); - - builder << ", "; - builder << R"("RelatedSymbol": )"; - builder << '"' << writer.getRelatedSymbolAsJsonEscapedString().c_str() - << '"'; - - builder << '}'; - - return builder; - } - }; - - private: - NoRelatedInstruments m_noRelatedInstruments; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoRelatedInstrumentsId() SBE_NOEXCEPT { - return 1647; - } - - SBE_NODISCARD inline NoRelatedInstruments &noRelatedInstruments() { - m_noRelatedInstruments.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noRelatedInstruments; - } - - NoRelatedInstruments &noRelatedInstrumentsCount(const std::uint8_t count) { - m_noRelatedInstruments.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noRelatedInstruments; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noRelatedInstrumentsSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noRelatedInstrumentsInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noRelatedInstrumentsSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDInstrumentDefinitionOption55 _writer) { - MDInstrumentDefinitionOption55 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDInstrumentDefinitionOption55", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); - - builder << ", "; - builder << R"("TotNumReports": )"; - builder << +writer.totNumReports(); - - builder << ", "; - builder << R"("SecurityUpdateAction": )"; - builder << '"' << writer.securityUpdateAction() << '"'; - - builder << ", "; - builder << R"("LastUpdateTime": )"; - builder << +writer.lastUpdateTime(); - - builder << ", "; - builder << R"("MDSecurityTradingStatus": )"; - builder << '"' << writer.mDSecurityTradingStatus() << '"'; - - builder << ", "; - builder << R"("ApplID": )"; - builder << +writer.applID(); - - builder << ", "; - builder << R"("MarketSegmentID": )"; - builder << +writer.marketSegmentID(); - - builder << ", "; - builder << R"("UnderlyingProduct": )"; - builder << +writer.underlyingProduct(); - - builder << ", "; - builder << R"("SecurityExchange": )"; - builder << '"' << writer.getSecurityExchangeAsJsonEscapedString().c_str() - << '"'; - - builder << ", "; - builder << R"("SecurityGroup": )"; - builder << '"' << writer.getSecurityGroupAsJsonEscapedString().c_str() - << '"'; - - builder << ", "; - builder << R"("Asset": )"; - builder << '"' << writer.getAssetAsJsonEscapedString().c_str() << '"'; - - builder << ", "; - builder << R"("Symbol": )"; - builder << '"' << writer.getSymbolAsJsonEscapedString().c_str() << '"'; - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("SecurityType": )"; - builder << '"' << writer.getSecurityTypeAsJsonEscapedString().c_str() - << '"'; - - builder << ", "; - builder << R"("CFICode": )"; - builder << '"' << writer.getCFICodeAsJsonEscapedString().c_str() << '"'; - - builder << ", "; - builder << R"("PutOrCall": )"; - builder << '"' << writer.putOrCall() << '"'; - - builder << ", "; - builder << R"("MaturityMonthYear": )"; - builder << writer.maturityMonthYear(); - - builder << ", "; - builder << R"("Currency": )"; - builder << '"' << writer.getCurrencyAsJsonEscapedString().c_str() << '"'; - - builder << ", "; - builder << R"("StrikePrice": )"; - builder << writer.strikePrice(); - - builder << ", "; - builder << R"("StrikeCurrency": )"; - builder << '"' << writer.getStrikeCurrencyAsJsonEscapedString().c_str() - << '"'; - - builder << ", "; - builder << R"("SettlCurrency": )"; - builder << '"' << writer.getSettlCurrencyAsJsonEscapedString().c_str() - << '"'; - - builder << ", "; - builder << R"("MinCabPrice": )"; - builder << writer.minCabPrice(); - - builder << ", "; - builder << R"("MatchAlgorithm": )"; - if (std::isprint(writer.matchAlgorithm())) { - builder << '"' << (char)writer.matchAlgorithm() << '"'; - } else { - builder << (int)writer.matchAlgorithm(); - } - - builder << ", "; - builder << R"("MinTradeVol": )"; - builder << +writer.minTradeVol(); - - builder << ", "; - builder << R"("MaxTradeVol": )"; - builder << +writer.maxTradeVol(); - - builder << ", "; - builder << R"("MinPriceIncrement": )"; - builder << writer.minPriceIncrement(); - - builder << ", "; - builder << R"("MinPriceIncrementAmount": )"; - builder << writer.minPriceIncrementAmount(); - - builder << ", "; - builder << R"("DisplayFactor": )"; - builder << writer.displayFactor(); - - builder << ", "; - builder << R"("TickRule": )"; - builder << +writer.tickRule(); - - builder << ", "; - builder << R"("MainFraction": )"; - builder << +writer.mainFraction(); - - builder << ", "; - builder << R"("SubFraction": )"; - builder << +writer.subFraction(); - - builder << ", "; - builder << R"("PriceDisplayFormat": )"; - builder << +writer.priceDisplayFormat(); - - builder << ", "; - builder << R"("UnitOfMeasure": )"; - builder << '"' << writer.getUnitOfMeasureAsJsonEscapedString().c_str() - << '"'; - - builder << ", "; - builder << R"("UnitOfMeasureQty": )"; - builder << writer.unitOfMeasureQty(); - - builder << ", "; - builder << R"("TradingReferencePrice": )"; - builder << writer.tradingReferencePrice(); - - builder << ", "; - builder << R"("SettlPriceType": )"; - builder << writer.settlPriceType(); - - builder << ", "; - builder << R"("ClearedVolume": )"; - builder << +writer.clearedVolume(); - - builder << ", "; - builder << R"("OpenInterestQty": )"; - builder << +writer.openInterestQty(); - - builder << ", "; - builder << R"("LowLimitPrice": )"; - builder << writer.lowLimitPrice(); - - builder << ", "; - builder << R"("HighLimitPrice": )"; - builder << writer.highLimitPrice(); - - builder << ", "; - builder << R"("UserDefinedInstrument": )"; - if (std::isprint(writer.userDefinedInstrument())) { - builder << '"' << (char)writer.userDefinedInstrument() << '"'; - } else { - builder << (int)writer.userDefinedInstrument(); - } - - builder << ", "; - builder << R"("TradingReferenceDate": )"; - builder << +writer.tradingReferenceDate(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoEvents": [)"; - writer.noEvents().forEach([&](NoEvents &noEvents) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDInstrumentDefinitionOption55 _writer) +{ + MDInstrumentDefinitionOption55 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDInstrumentDefinitionOption55", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); + + builder << ", "; + builder << R"("TotNumReports": )"; + builder << +writer.totNumReports(); + + builder << ", "; + builder << R"("SecurityUpdateAction": )"; + builder << '"' << writer.securityUpdateAction() << '"'; + + builder << ", "; + builder << R"("LastUpdateTime": )"; + builder << +writer.lastUpdateTime(); + + builder << ", "; + builder << R"("MDSecurityTradingStatus": )"; + builder << '"' << writer.mDSecurityTradingStatus() << '"'; + + builder << ", "; + builder << R"("ApplID": )"; + builder << +writer.applID(); + + builder << ", "; + builder << R"("MarketSegmentID": )"; + builder << +writer.marketSegmentID(); + + builder << ", "; + builder << R"("UnderlyingProduct": )"; + builder << +writer.underlyingProduct(); + + builder << ", "; + builder << R"("SecurityExchange": )"; + builder << '"' << + writer.getSecurityExchangeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Asset": )"; + builder << '"' << + writer.getAssetAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Symbol": )"; + builder << '"' << + writer.getSymbolAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("SecurityType": )"; + builder << '"' << + writer.getSecurityTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("CFICode": )"; + builder << '"' << + writer.getCFICodeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("PutOrCall": )"; + builder << '"' << writer.putOrCall() << '"'; + + builder << ", "; + builder << R"("MaturityMonthYear": )"; + builder << writer.maturityMonthYear(); + + builder << ", "; + builder << R"("Currency": )"; + builder << '"' << + writer.getCurrencyAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("StrikePrice": )"; + builder << writer.strikePrice(); + + builder << ", "; + builder << R"("StrikeCurrency": )"; + builder << '"' << + writer.getStrikeCurrencyAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SettlCurrency": )"; + builder << '"' << + writer.getSettlCurrencyAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("MinCabPrice": )"; + builder << writer.minCabPrice(); + + builder << ", "; + builder << R"("MatchAlgorithm": )"; + if (std::isprint(writer.matchAlgorithm())) + { + builder << '"' << (char)writer.matchAlgorithm() << '"'; + } + else + { + builder << (int)writer.matchAlgorithm(); + } + + builder << ", "; + builder << R"("MinTradeVol": )"; + builder << +writer.minTradeVol(); + + builder << ", "; + builder << R"("MaxTradeVol": )"; + builder << +writer.maxTradeVol(); + + builder << ", "; + builder << R"("MinPriceIncrement": )"; + builder << writer.minPriceIncrement(); + + builder << ", "; + builder << R"("MinPriceIncrementAmount": )"; + builder << writer.minPriceIncrementAmount(); + + builder << ", "; + builder << R"("DisplayFactor": )"; + builder << writer.displayFactor(); + + builder << ", "; + builder << R"("TickRule": )"; + builder << +writer.tickRule(); + + builder << ", "; + builder << R"("MainFraction": )"; + builder << +writer.mainFraction(); + + builder << ", "; + builder << R"("SubFraction": )"; + builder << +writer.subFraction(); + + builder << ", "; + builder << R"("PriceDisplayFormat": )"; + builder << +writer.priceDisplayFormat(); + + builder << ", "; + builder << R"("UnitOfMeasure": )"; + builder << '"' << + writer.getUnitOfMeasureAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("UnitOfMeasureQty": )"; + builder << writer.unitOfMeasureQty(); + + builder << ", "; + builder << R"("TradingReferencePrice": )"; + builder << writer.tradingReferencePrice(); + + builder << ", "; + builder << R"("SettlPriceType": )"; + builder << writer.settlPriceType(); + + builder << ", "; + builder << R"("ClearedVolume": )"; + builder << +writer.clearedVolume(); + + builder << ", "; + builder << R"("OpenInterestQty": )"; + builder << +writer.openInterestQty(); + + builder << ", "; + builder << R"("LowLimitPrice": )"; + builder << writer.lowLimitPrice(); + + builder << ", "; + builder << R"("HighLimitPrice": )"; + builder << writer.highLimitPrice(); + + builder << ", "; + builder << R"("UserDefinedInstrument": )"; + if (std::isprint(writer.userDefinedInstrument())) + { + builder << '"' << (char)writer.userDefinedInstrument() << '"'; + } + else + { + builder << (int)writer.userDefinedInstrument(); + } + + builder << ", "; + builder << R"("TradingReferenceDate": )"; + builder << +writer.tradingReferenceDate(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoEvents": [)"; + writer.noEvents().forEach([&](NoEvents& noEvents) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noEvents; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDFeedTypes": [)"; - writer.noMDFeedTypes().forEach([&](NoMDFeedTypes &noMDFeedTypes) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDFeedTypes": [)"; + writer.noMDFeedTypes().forEach([&](NoMDFeedTypes& noMDFeedTypes) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDFeedTypes; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoInstAttrib": [)"; - writer.noInstAttrib().forEach([&](NoInstAttrib &noInstAttrib) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoInstAttrib": [)"; + writer.noInstAttrib().forEach([&](NoInstAttrib& noInstAttrib) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noInstAttrib; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoLotTypeRules": [)"; - writer.noLotTypeRules().forEach([&](NoLotTypeRules &noLotTypeRules) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoLotTypeRules": [)"; + writer.noLotTypeRules().forEach([&](NoLotTypeRules& noLotTypeRules) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noLotTypeRules; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoUnderlyings": [)"; - writer.noUnderlyings().forEach([&](NoUnderlyings &noUnderlyings) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoUnderlyings": [)"; + writer.noUnderlyings().forEach([&](NoUnderlyings& noUnderlyings) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noUnderlyings; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoRelatedInstruments": [)"; - writer.noRelatedInstruments().forEach( - [&](NoRelatedInstruments &noRelatedInstruments) { - if (atLeastOne) { - builder << ", "; - } - atLeastOne = true; - builder << noRelatedInstruments; - }); - builder << ']'; - } + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoRelatedInstruments": [)"; + writer.noRelatedInstruments().forEach([&](NoRelatedInstruments& noRelatedInstruments) + { + if (atLeastOne) + { + builder << ", "; + } + atLeastOne = true; + builder << noRelatedInstruments; + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noEvents().forEach([](NoEvents e) + { + e.skip(); + }); + noMDFeedTypes().forEach([](NoMDFeedTypes e) + { + e.skip(); + }); + noInstAttrib().forEach([](NoInstAttrib e) + { + e.skip(); + }); + noLotTypeRules().forEach([](NoLotTypeRules e) + { + e.skip(); + }); + noUnderlyings().forEach([](NoUnderlyings e) + { + e.skip(); + }); + noRelatedInstruments().forEach([](NoRelatedInstruments e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength( + std::size_t noEventsLength = 0, + std::size_t noMDFeedTypesLength = 0, + std::size_t noInstAttribLength = 0, + std::size_t noLotTypeRulesLength = 0, + std::size_t noUnderlyingsLength = 0, + std::size_t noRelatedInstrumentsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoEvents::sbeHeaderSize(); + if (noEventsLength > 254LL) + { + throw std::runtime_error("noEventsLength outside of allowed range [E110]"); + } + length += noEventsLength *NoEvents::sbeBlockLength(); + + length += NoMDFeedTypes::sbeHeaderSize(); + if (noMDFeedTypesLength > 254LL) + { + throw std::runtime_error("noMDFeedTypesLength outside of allowed range [E110]"); + } + length += noMDFeedTypesLength *NoMDFeedTypes::sbeBlockLength(); + + length += NoInstAttrib::sbeHeaderSize(); + if (noInstAttribLength > 254LL) + { + throw std::runtime_error("noInstAttribLength outside of allowed range [E110]"); + } + length += noInstAttribLength *NoInstAttrib::sbeBlockLength(); + + length += NoLotTypeRules::sbeHeaderSize(); + if (noLotTypeRulesLength > 254LL) + { + throw std::runtime_error("noLotTypeRulesLength outside of allowed range [E110]"); + } + length += noLotTypeRulesLength *NoLotTypeRules::sbeBlockLength(); + + length += NoUnderlyings::sbeHeaderSize(); + if (noUnderlyingsLength > 254LL) + { + throw std::runtime_error("noUnderlyingsLength outside of allowed range [E110]"); + } + length += noUnderlyingsLength *NoUnderlyings::sbeBlockLength(); + + length += NoRelatedInstruments::sbeHeaderSize(); + if (noRelatedInstrumentsLength > 254LL) + { + throw std::runtime_error("noRelatedInstrumentsLength outside of allowed range [E110]"); + } + length += noRelatedInstrumentsLength *NoRelatedInstruments::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionSpread29.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionSpread29.h index 9196149db..057957e33 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionSpread29.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionSpread29.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,6083 +86,6650 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDInstrumentDefinitionSpread29 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDInstrumentDefinitionSpread29 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(195); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(29); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDInstrumentDefinitionSpread29() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDInstrumentDefinitionSpread29( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDInstrumentDefinitionSpread29( - char *buffer, const std::uint64_t bufferLength) - : MDInstrumentDefinitionSpread29( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDInstrumentDefinitionSpread29() = default; - MDInstrumentDefinitionSpread29( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDInstrumentDefinitionSpread29( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDInstrumentDefinitionSpread29( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)195; - } + MDInstrumentDefinitionSpread29(char *buffer, const std::uint64_t bufferLength) : + MDInstrumentDefinitionSpread29(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)29; - } + MDInstrumentDefinitionSpread29( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDInstrumentDefinitionSpread29(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(195); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "d"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(29); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDInstrumentDefinitionSpread29 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDInstrumentDefinitionSpread29( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDInstrumentDefinitionSpread29 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "d"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDInstrumentDefinitionSpread29( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDInstrumentDefinitionSpread29 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDInstrumentDefinitionSpread29(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDInstrumentDefinitionSpread29 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDInstrumentDefinitionSpread29( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDInstrumentDefinitionSpread29 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDInstrumentDefinitionSpread29( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDInstrumentDefinitionSpread29 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDInstrumentDefinitionSpread29(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDInstrumentDefinitionSpread29 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD static const char * - TotNumReportsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TotNumReportsMetaAttribute(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 totNumReportsId() SBE_NOEXCEPT { - return 911; - } + static SBE_CONSTEXPR std::uint16_t totNumReportsId() SBE_NOEXCEPT + { + return 911; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - totNumReportsSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNumReportsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= totNumReportsSinceVersion(); + return m_actingVersion >= totNumReportsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - totNumReportsEncodingOffset() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNumReportsEncodingOffset() SBE_NOEXCEPT + { + return 1; + } - static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT { - return 4294967295; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT + { + return UINT32_C(0xffffffff); + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionSpread29 & - totNumReports(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionSpread29 &totNumReports(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityUpdateActionMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityUpdateActionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityUpdateActionId() SBE_NOEXCEPT { - return 980; - } + static SBE_CONSTEXPR std::uint16_t securityUpdateActionId() SBE_NOEXCEPT + { + return 980; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityUpdateActionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityUpdateActionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityUpdateActionSinceVersion(); + return m_actingVersion >= securityUpdateActionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 5; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 5; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD SecurityUpdateAction::Value - securityUpdateAction() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 5, sizeof(char)); - return SecurityUpdateAction::get((val)); - } + SBE_NODISCARD SecurityUpdateAction::Value securityUpdateAction() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 5, sizeof(char)); + return SecurityUpdateAction::get((val)); + } - MDInstrumentDefinitionSpread29 & - securityUpdateAction(const SecurityUpdateAction::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 5, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionSpread29 &securityUpdateAction(const SecurityUpdateAction::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 5, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char * - LastUpdateTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *LastUpdateTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t lastUpdateTimeId() SBE_NOEXCEPT { - return 779; - } + static SBE_CONSTEXPR std::uint16_t lastUpdateTimeId() SBE_NOEXCEPT + { + return 779; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lastUpdateTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastUpdateTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool lastUpdateTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool lastUpdateTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lastUpdateTimeSinceVersion(); + return m_actingVersion >= lastUpdateTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lastUpdateTimeEncodingOffset() SBE_NOEXCEPT { - return 6; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastUpdateTimeEncodingOffset() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t - lastUpdateTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t lastUpdateTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t lastUpdateTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 6, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t lastUpdateTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 6, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - MDInstrumentDefinitionSpread29 & - lastUpdateTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 6, &val, sizeof(std::uint64_t)); - return *this; - } + MDInstrumentDefinitionSpread29 &lastUpdateTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 6, &val, sizeof(std::uint64_t)); + return *this; + } - SBE_NODISCARD static const char *MDSecurityTradingStatusMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MDSecurityTradingStatusMetaAttribute(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 mDSecurityTradingStatusId() SBE_NOEXCEPT { - return 1682; - } + static SBE_CONSTEXPR std::uint16_t mDSecurityTradingStatusId() SBE_NOEXCEPT + { + return 1682; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDSecurityTradingStatusSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDSecurityTradingStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool mDSecurityTradingStatusInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool mDSecurityTradingStatusInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDSecurityTradingStatusSinceVersion(); + return m_actingVersion >= mDSecurityTradingStatusSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDSecurityTradingStatusEncodingOffset() SBE_NOEXCEPT { - return 14; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDSecurityTradingStatusEncodingOffset() SBE_NOEXCEPT + { + return 14; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDSecurityTradingStatusEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDSecurityTradingStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD SecurityTradingStatus::Value - mDSecurityTradingStatus() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); - return SecurityTradingStatus::get((val)); - } + SBE_NODISCARD SecurityTradingStatus::Value mDSecurityTradingStatus() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return SecurityTradingStatus::get((val)); + } - MDInstrumentDefinitionSpread29 &mDSecurityTradingStatus( - const SecurityTradingStatus::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionSpread29 &mDSecurityTradingStatus(const SecurityTradingStatus::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - ApplIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *ApplIDMetaAttribute(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 applIDId() SBE_NOEXCEPT { return 1180; } + static SBE_CONSTEXPR std::uint16_t applIDId() SBE_NOEXCEPT + { + return 1180; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - applIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t applIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool applIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool applIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= applIDSinceVersion(); + return m_actingVersion >= applIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - applIDEncodingOffset() SBE_NOEXCEPT { - return 15; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t applIDEncodingOffset() SBE_NOEXCEPT + { + return 15; + } - static SBE_CONSTEXPR std::int16_t applIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT16; - } + static SBE_CONSTEXPR std::int16_t applIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT16; + } - static SBE_CONSTEXPR std::int16_t applIDMinValue() SBE_NOEXCEPT { - return (std::int16_t)-32767; - } + static SBE_CONSTEXPR std::int16_t applIDMinValue() SBE_NOEXCEPT + { + return static_cast(-32767); + } - static SBE_CONSTEXPR std::int16_t applIDMaxValue() SBE_NOEXCEPT { - return (std::int16_t)32767; - } + static SBE_CONSTEXPR std::int16_t applIDMaxValue() SBE_NOEXCEPT + { + return static_cast(32767); + } - static SBE_CONSTEXPR std::size_t applIDEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t applIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::int16_t applID() const SBE_NOEXCEPT { - std::int16_t val; - std::memcpy(&val, m_buffer + m_offset + 15, sizeof(std::int16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::int16_t applID() const SBE_NOEXCEPT + { + std::int16_t val; + std::memcpy(&val, m_buffer + m_offset + 15, sizeof(std::int16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MDInstrumentDefinitionSpread29 & - applID(const std::int16_t value) SBE_NOEXCEPT { - std::int16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 15, &val, sizeof(std::int16_t)); - return *this; - } + MDInstrumentDefinitionSpread29 &applID(const std::int16_t value) SBE_NOEXCEPT + { + std::int16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 15, &val, sizeof(std::int16_t)); + return *this; + } - SBE_NODISCARD static const char *MarketSegmentIDMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MarketSegmentIDMetaAttribute(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 marketSegmentIDId() SBE_NOEXCEPT { - return 1300; - } + static SBE_CONSTEXPR std::uint16_t marketSegmentIDId() SBE_NOEXCEPT + { + return 1300; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - marketSegmentIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketSegmentIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= marketSegmentIDSinceVersion(); + return m_actingVersion >= marketSegmentIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - marketSegmentIDEncodingOffset() SBE_NOEXCEPT { - return 17; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingOffset() SBE_NOEXCEPT + { + return 17; + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT8; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - marketSegmentIDEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionSpread29 & - marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionSpread29 &marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *UnderlyingProductMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UnderlyingProductMetaAttribute(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 underlyingProductId() SBE_NOEXCEPT { - return 462; - } + static SBE_CONSTEXPR std::uint16_t underlyingProductId() SBE_NOEXCEPT + { + return 462; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - underlyingProductSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t underlyingProductSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool underlyingProductInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool underlyingProductInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= underlyingProductSinceVersion(); + return m_actingVersion >= underlyingProductSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - underlyingProductEncodingOffset() SBE_NOEXCEPT { - return 18; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t underlyingProductEncodingOffset() SBE_NOEXCEPT + { + return 18; + } - static SBE_CONSTEXPR std::uint8_t underlyingProductNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t underlyingProductMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t underlyingProductMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - underlyingProductEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t underlyingProductEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t underlyingProduct() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t underlyingProduct() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionSpread29 & - underlyingProduct(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionSpread29 &underlyingProduct(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityExchangeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Exchange"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityExchangeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Exchange"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityExchangeId() SBE_NOEXCEPT { - return 207; - } + static SBE_CONSTEXPR std::uint16_t securityExchangeId() SBE_NOEXCEPT + { + return 207; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityExchangeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityExchangeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityExchangeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityExchangeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityExchangeSinceVersion(); + return m_actingVersion >= securityExchangeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityExchangeEncodingOffset() SBE_NOEXCEPT { - return 19; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityExchangeEncodingOffset() SBE_NOEXCEPT + { + return 19; + } - static SBE_CONSTEXPR char securityExchangeNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityExchangeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityExchangeMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityExchangeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityExchangeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityExchangeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - securityExchangeEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t securityExchangeEncodingLength() SBE_NOEXCEPT + { + return 4; + } - static SBE_CONSTEXPR std::uint64_t securityExchangeLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::uint64_t securityExchangeLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD const char *securityExchange() const SBE_NOEXCEPT { - return m_buffer + m_offset + 19; - } + SBE_NODISCARD const char *securityExchange() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 19; + } - SBE_NODISCARD char *securityExchange() SBE_NOEXCEPT { - return m_buffer + m_offset + 19; - } + SBE_NODISCARD char *securityExchange() SBE_NOEXCEPT + { + return m_buffer + m_offset + 19; + } - SBE_NODISCARD char securityExchange(const std::uint64_t index) const { - if (index >= 4) { - throw std::runtime_error( - "index out of range for securityExchange [E104]"); - } + SBE_NODISCARD char securityExchange(const std::uint64_t index) const + { + if (index >= 4) + { + throw std::runtime_error("index out of range for securityExchange [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 19 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 19 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread29 & - securityExchange(const std::uint64_t index, const char value) { - if (index >= 4) { - throw std::runtime_error( - "index out of range for securityExchange [E105]"); - } + MDInstrumentDefinitionSpread29 &securityExchange(const std::uint64_t index, const char value) + { + if (index >= 4) + { + throw std::runtime_error("index out of range for securityExchange [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 19 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 19 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityExchange(char *const dst, const std::uint64_t length) const { - if (length > 4) { - throw std::runtime_error( - "length too large for getSecurityExchange [E106]"); - } + std::uint64_t getSecurityExchange(char *const dst, const std::uint64_t length) const + { + if (length > 4) + { + throw std::runtime_error("length too large for getSecurityExchange [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 19, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 19, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread29 & - putSecurityExchange(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 19, src, sizeof(char) * 4); - return *this; - } + MDInstrumentDefinitionSpread29 &putSecurityExchange(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 19, src, sizeof(char) * 4); + return *this; + } - MDInstrumentDefinitionSpread29 &putSecurityExchange( - const char value0, - const char value1, - const char value2, - const char value3) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 19, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 20, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 21, &val2, sizeof(char)); - char val3 = (value3); - std::memcpy(m_buffer + m_offset + 22, &val3, sizeof(char)); + MDInstrumentDefinitionSpread29 &putSecurityExchange( + const char value0, + const char value1, + const char value2, + const char value3) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 19, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 20, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 21, &val2, sizeof(char)); + char val3 = (value3); + std::memcpy(m_buffer + m_offset + 22, &val3, sizeof(char)); - return *this; - } + return *this; + } - std::string getSecurityExchangeAsString() const { - const char *buffer = m_buffer + m_offset + 19; - size_t length = 0; + SBE_NODISCARD std::string getSecurityExchangeAsString() const + { + const char *buffer = m_buffer + m_offset + 19; + size_t length = 0; - for (; length < 4 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 4 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityExchangeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityExchangeAsString(); + std::string getSecurityExchangeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityExchangeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityExchangeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 19; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityExchangeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 19; + size_t length = 0; - for (; length < 4 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 4 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread29 & - putSecurityExchange(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 4) { - throw std::runtime_error( - "string too large for putSecurityExchange [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread29 &putSecurityExchange(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 4) + { + throw std::runtime_error("string too large for putSecurityExchange [E106]"); + } - std::memcpy(m_buffer + m_offset + 19, str.data(), srcLength); - for (size_t start = srcLength; start < 4; ++start) { - m_buffer[m_offset + 19 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 19, str.data(), srcLength); + for (size_t start = srcLength; start < 4; ++start) + { + m_buffer[m_offset + 19 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread29 &putSecurityExchange(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 4) { - throw std::runtime_error( - "string too large for putSecurityExchange [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread29 &putSecurityExchange(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 4) + { + throw std::runtime_error("string too large for putSecurityExchange [E106]"); + } - std::memcpy(m_buffer + m_offset + 19, str.c_str(), srcLength); - for (size_t start = srcLength; start < 4; ++start) { - m_buffer[m_offset + 19 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 19, str.c_str(), srcLength); + for (size_t start = srcLength; start < 4; ++start) + { + m_buffer[m_offset + 19 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT { - return 1151; - } + static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT + { + return 1151; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityGroupSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityGroupSinceVersion(); + return m_actingVersion >= securityGroupSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityGroupEncodingOffset() SBE_NOEXCEPT { - return 23; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityGroupEncodingOffset() SBE_NOEXCEPT + { + return 23; + } - static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT { - return m_buffer + m_offset + 23; - } + SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 23; + } - SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT { - return m_buffer + m_offset + 23; - } + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 23; + } - SBE_NODISCARD char securityGroup(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error( - "index out of range for securityGroup [E104]"); - } + SBE_NODISCARD char securityGroup(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 23 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 23 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread29 & - securityGroup(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error( - "index out of range for securityGroup [E105]"); - } + MDInstrumentDefinitionSpread29 &securityGroup(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 23 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 23 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityGroup(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error( - "length too large for getSecurityGroup [E106]"); - } + std::uint64_t getSecurityGroup(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityGroup [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 23, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 23, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread29 & - putSecurityGroup(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 23, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionSpread29 &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 23, src, sizeof(char) * 6); + return *this; + } - std::string getSecurityGroupAsString() const { - const char *buffer = m_buffer + m_offset + 23; - size_t length = 0; + SBE_NODISCARD std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 23; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityGroupAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityGroupAsString(); + std::string getSecurityGroupAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityGroupAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 23; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 23; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread29 & - putSecurityGroup(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityGroup [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread29 &putSecurityGroup(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } - std::memcpy(m_buffer + m_offset + 23, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 23 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 23, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 23 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread29 &putSecurityGroup(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityGroup [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread29 &putSecurityGroup(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } - std::memcpy(m_buffer + m_offset + 23, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 23 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 23, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 23 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - AssetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *AssetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t assetId() SBE_NOEXCEPT { return 6937; } + static SBE_CONSTEXPR std::uint16_t assetId() SBE_NOEXCEPT + { + return 6937; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - assetSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t assetSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool assetInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool assetInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= assetSinceVersion(); + return m_actingVersion >= assetSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - assetEncodingOffset() SBE_NOEXCEPT { - return 29; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t assetEncodingOffset() SBE_NOEXCEPT + { + return 29; + } - static SBE_CONSTEXPR char assetNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char assetNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char assetMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char assetMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char assetMaxValue() SBE_NOEXCEPT { return (char)126; } + static SBE_CONSTEXPR char assetMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t assetEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t assetEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t assetLength() SBE_NOEXCEPT { return 6; } + static SBE_CONSTEXPR std::uint64_t assetLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *asset() const SBE_NOEXCEPT { - return m_buffer + m_offset + 29; - } + SBE_NODISCARD const char *asset() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 29; + } - SBE_NODISCARD char *asset() SBE_NOEXCEPT { return m_buffer + m_offset + 29; } + SBE_NODISCARD char *asset() SBE_NOEXCEPT + { + return m_buffer + m_offset + 29; + } - SBE_NODISCARD char asset(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for asset [E104]"); - } + SBE_NODISCARD char asset(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for asset [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 29 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 29 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread29 & - asset(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for asset [E105]"); - } + MDInstrumentDefinitionSpread29 &asset(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for asset [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 29 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 29 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getAsset(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error("length too large for getAsset [E106]"); - } + std::uint64_t getAsset(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getAsset [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 29, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 29, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread29 & - putAsset(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 29, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionSpread29 &putAsset(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 29, src, sizeof(char) * 6); + return *this; + } - std::string getAssetAsString() const { - const char *buffer = m_buffer + m_offset + 29; - size_t length = 0; + SBE_NODISCARD std::string getAssetAsString() const + { + const char *buffer = m_buffer + m_offset + 29; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getAssetAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getAssetAsString(); + std::string getAssetAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getAssetAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getAssetAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 29; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getAssetAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 29; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread29 &putAsset(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putAsset [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread29 &putAsset(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putAsset [E106]"); + } - std::memcpy(m_buffer + m_offset + 29, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 29 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 29, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 29 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread29 &putAsset(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putAsset [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread29 &putAsset(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putAsset [E106]"); + } - std::memcpy(m_buffer + m_offset + 29, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 29 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 29, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 29 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t symbolId() SBE_NOEXCEPT { return 55; } + static SBE_CONSTEXPR std::uint16_t symbolId() SBE_NOEXCEPT + { + return 55; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - symbolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t symbolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool symbolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool symbolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= symbolSinceVersion(); + return m_actingVersion >= symbolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - symbolEncodingOffset() SBE_NOEXCEPT { - return 35; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t symbolEncodingOffset() SBE_NOEXCEPT + { + return 35; + } - static SBE_CONSTEXPR char symbolNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char symbolNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char symbolMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char symbolMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char symbolMaxValue() SBE_NOEXCEPT { return (char)126; } + static SBE_CONSTEXPR char symbolMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t symbolEncodingLength() SBE_NOEXCEPT { - return 20; - } + static SBE_CONSTEXPR std::size_t symbolEncodingLength() SBE_NOEXCEPT + { + return 20; + } - static SBE_CONSTEXPR std::uint64_t symbolLength() SBE_NOEXCEPT { return 20; } + static SBE_CONSTEXPR std::uint64_t symbolLength() SBE_NOEXCEPT + { + return 20; + } - SBE_NODISCARD const char *symbol() const SBE_NOEXCEPT { - return m_buffer + m_offset + 35; - } + SBE_NODISCARD const char *symbol() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 35; + } - SBE_NODISCARD char *symbol() SBE_NOEXCEPT { - return m_buffer + m_offset + 35; - } + SBE_NODISCARD char *symbol() SBE_NOEXCEPT + { + return m_buffer + m_offset + 35; + } - SBE_NODISCARD char symbol(const std::uint64_t index) const { - if (index >= 20) { - throw std::runtime_error("index out of range for symbol [E104]"); - } + SBE_NODISCARD char symbol(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 35 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 35 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread29 & - symbol(const std::uint64_t index, const char value) { - if (index >= 20) { - throw std::runtime_error("index out of range for symbol [E105]"); - } + MDInstrumentDefinitionSpread29 &symbol(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 35 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 35 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getSymbol(char *const dst, const std::uint64_t length) const { - if (length > 20) { - throw std::runtime_error("length too large for getSymbol [E106]"); - } + std::uint64_t getSymbol(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSymbol [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 35, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 35, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread29 & - putSymbol(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 35, src, sizeof(char) * 20); - return *this; - } + MDInstrumentDefinitionSpread29 &putSymbol(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 35, src, sizeof(char) * 20); + return *this; + } - std::string getSymbolAsString() const { - const char *buffer = m_buffer + m_offset + 35; - size_t length = 0; + SBE_NODISCARD std::string getSymbolAsString() const + { + const char *buffer = m_buffer + m_offset + 35; + size_t length = 0; - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSymbolAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSymbolAsString(); + std::string getSymbolAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSymbolAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSymbolAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 35; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSymbolAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 35; + size_t length = 0; - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread29 &putSymbol(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error("string too large for putSymbol [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread29 &putSymbol(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } - std::memcpy(m_buffer + m_offset + 35, str.data(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 35 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 35, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 35 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread29 &putSymbol(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error("string too large for putSymbol [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread29 &putSymbol(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } - std::memcpy(m_buffer + m_offset + 35, str.c_str(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 35 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 35, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 35 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { return 48; } + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityIDSinceVersion(); + return m_actingVersion >= securityIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 55; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 55; + } - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 55, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 55, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionSpread29 & - securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 55, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionSpread29 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 55, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityIDSourceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityIDSourceId() SBE_NOEXCEPT { - return 22; - } + static SBE_CONSTEXPR std::uint16_t securityIDSourceId() SBE_NOEXCEPT + { + return 22; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSourceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityIDSourceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityIDSourceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityIDSourceSinceVersion(); + return m_actingVersion >= securityIDSourceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDSourceEncodingOffset() SBE_NOEXCEPT { - return 59; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 59; + } - static SBE_CONSTEXPR char securityIDSourceNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityIDSourceNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityIDSourceMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityIDSourceMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityIDSourceMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityIDSourceMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - securityIDSourceEncodingLength() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::size_t securityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t securityIDSourceLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::uint64_t securityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD const char *securityIDSource() const { - static const std::uint8_t securityIDSourceValues[] = {56}; + SBE_NODISCARD const char *securityIDSource() const + { + static const std::uint8_t securityIDSourceValues[] = { 56 }; - return (const char *)securityIDSourceValues; - } + return (const char *)securityIDSourceValues; + } - SBE_NODISCARD char securityIDSource(const std::uint64_t index) const { - static const std::uint8_t securityIDSourceValues[] = {56}; + SBE_NODISCARD char securityIDSource(const std::uint64_t index) const + { + static const std::uint8_t securityIDSourceValues[] = { 56 }; - return (char)securityIDSourceValues[index]; - } + return (char)securityIDSourceValues[index]; + } - std::uint64_t - getSecurityIDSource(char *dst, const std::uint64_t length) const { - static std::uint8_t securityIDSourceValues[] = {56}; - std::uint64_t bytesToCopy = length < sizeof(securityIDSourceValues) - ? length - : sizeof(securityIDSourceValues); + std::uint64_t getSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t securityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(securityIDSourceValues) ? length : sizeof(securityIDSourceValues); - std::memcpy( - dst, securityIDSourceValues, static_cast(bytesToCopy)); - return bytesToCopy; - } + std::memcpy(dst, securityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } - std::string getSecurityIDSourceAsString() const { - static const std::uint8_t SecurityIDSourceValues[] = {56}; + std::string getSecurityIDSourceAsString() const + { + static const std::uint8_t SecurityIDSourceValues[] = { 56 }; - return std::string((const char *)SecurityIDSourceValues, 1); - } + return std::string((const char *)SecurityIDSourceValues, 1); + } - std::string getSecurityIDSourceAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityIDSourceAsString(); + std::string getSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityIDSourceAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } - SBE_NODISCARD static const char * - SecurityTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityTypeId() SBE_NOEXCEPT { - return 167; - } + static SBE_CONSTEXPR std::uint16_t securityTypeId() SBE_NOEXCEPT + { + return 167; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityTypeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityTypeSinceVersion(); + return m_actingVersion >= securityTypeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityTypeEncodingOffset() SBE_NOEXCEPT { - return 59; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityTypeEncodingOffset() SBE_NOEXCEPT + { + return 59; + } - static SBE_CONSTEXPR char securityTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t securityTypeEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t securityTypeEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t securityTypeLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::uint64_t securityTypeLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *securityType() const SBE_NOEXCEPT { - return m_buffer + m_offset + 59; - } + SBE_NODISCARD const char *securityType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 59; + } - SBE_NODISCARD char *securityType() SBE_NOEXCEPT { - return m_buffer + m_offset + 59; - } + SBE_NODISCARD char *securityType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 59; + } - SBE_NODISCARD char securityType(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for securityType [E104]"); - } + SBE_NODISCARD char securityType(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityType [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 59 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 59 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread29 & - securityType(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for securityType [E105]"); - } + MDInstrumentDefinitionSpread29 &securityType(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityType [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 59 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 59 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityType(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error( - "length too large for getSecurityType [E106]"); - } + std::uint64_t getSecurityType(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityType [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 59, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 59, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread29 & - putSecurityType(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 59, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionSpread29 &putSecurityType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 59, src, sizeof(char) * 6); + return *this; + } - std::string getSecurityTypeAsString() const { - const char *buffer = m_buffer + m_offset + 59; - size_t length = 0; + SBE_NODISCARD std::string getSecurityTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 59; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityTypeAsString(); + std::string getSecurityTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityTypeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityTypeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 59; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 59; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread29 &putSecurityType(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityType [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread29 &putSecurityType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityType [E106]"); + } - std::memcpy(m_buffer + m_offset + 59, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 59 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 59, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 59 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread29 &putSecurityType(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityType [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread29 &putSecurityType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityType [E106]"); + } - std::memcpy(m_buffer + m_offset + 59, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 59 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 59, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 59 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - CFICodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *CFICodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t cFICodeId() SBE_NOEXCEPT { return 461; } + static SBE_CONSTEXPR std::uint16_t cFICodeId() SBE_NOEXCEPT + { + return 461; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - cFICodeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cFICodeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool cFICodeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool cFICodeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= cFICodeSinceVersion(); + return m_actingVersion >= cFICodeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - cFICodeEncodingOffset() SBE_NOEXCEPT { - return 65; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cFICodeEncodingOffset() SBE_NOEXCEPT + { + return 65; + } - static SBE_CONSTEXPR char cFICodeNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char cFICodeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char cFICodeMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char cFICodeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char cFICodeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char cFICodeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t cFICodeEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t cFICodeEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t cFICodeLength() SBE_NOEXCEPT { return 6; } + static SBE_CONSTEXPR std::uint64_t cFICodeLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *cFICode() const SBE_NOEXCEPT { - return m_buffer + m_offset + 65; - } + SBE_NODISCARD const char *cFICode() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 65; + } - SBE_NODISCARD char *cFICode() SBE_NOEXCEPT { - return m_buffer + m_offset + 65; - } + SBE_NODISCARD char *cFICode() SBE_NOEXCEPT + { + return m_buffer + m_offset + 65; + } - SBE_NODISCARD char cFICode(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for cFICode [E104]"); - } + SBE_NODISCARD char cFICode(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cFICode [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 65 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 65 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread29 & - cFICode(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for cFICode [E105]"); - } + MDInstrumentDefinitionSpread29 &cFICode(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cFICode [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 65 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 65 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getCFICode(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error("length too large for getCFICode [E106]"); - } + std::uint64_t getCFICode(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getCFICode [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 65, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 65, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread29 & - putCFICode(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 65, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionSpread29 &putCFICode(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 65, src, sizeof(char) * 6); + return *this; + } - std::string getCFICodeAsString() const { - const char *buffer = m_buffer + m_offset + 65; - size_t length = 0; + SBE_NODISCARD std::string getCFICodeAsString() const + { + const char *buffer = m_buffer + m_offset + 65; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getCFICodeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getCFICodeAsString(); + std::string getCFICodeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCFICodeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getCFICodeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 65; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCFICodeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 65; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread29 &putCFICode(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putCFICode [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread29 &putCFICode(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCFICode [E106]"); + } - std::memcpy(m_buffer + m_offset + 65, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 65 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 65, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 65 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread29 &putCFICode(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putCFICode [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread29 &putCFICode(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCFICode [E106]"); + } - std::memcpy(m_buffer + m_offset + 65, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 65 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 65, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 65 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char *MaturityMonthYearMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MonthYear"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaturityMonthYearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MonthYear"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t maturityMonthYearId() SBE_NOEXCEPT { - return 200; - } + static SBE_CONSTEXPR std::uint16_t maturityMonthYearId() SBE_NOEXCEPT + { + return 200; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maturityMonthYearSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maturityMonthYearSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool maturityMonthYearInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maturityMonthYearInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maturityMonthYearSinceVersion(); + return m_actingVersion >= maturityMonthYearSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maturityMonthYearEncodingOffset() SBE_NOEXCEPT { - return 71; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maturityMonthYearEncodingOffset() SBE_NOEXCEPT + { + return 71; + } - private: - MaturityMonthYear m_maturityMonthYear; +private: + MaturityMonthYear m_maturityMonthYear; - public: - SBE_NODISCARD MaturityMonthYear &maturityMonthYear() { - m_maturityMonthYear.wrap( - m_buffer, m_offset + 71, m_actingVersion, m_bufferLength); - return m_maturityMonthYear; - } +public: + SBE_NODISCARD MaturityMonthYear &maturityMonthYear() + { + m_maturityMonthYear.wrap(m_buffer, m_offset + 71, m_actingVersion, m_bufferLength); + return m_maturityMonthYear; + } - SBE_NODISCARD static const char * - CurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Currency"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *CurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Currency"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t currencyId() SBE_NOEXCEPT { return 15; } + static SBE_CONSTEXPR std::uint16_t currencyId() SBE_NOEXCEPT + { + return 15; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - currencySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t currencySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool currencyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool currencyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= currencySinceVersion(); + return m_actingVersion >= currencySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - currencyEncodingOffset() SBE_NOEXCEPT { - return 76; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t currencyEncodingOffset() SBE_NOEXCEPT + { + return 76; + } - static SBE_CONSTEXPR char currencyNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char currencyNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char currencyMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char currencyMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char currencyMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char currencyMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t currencyEncodingLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::size_t currencyEncodingLength() SBE_NOEXCEPT + { + return 3; + } - static SBE_CONSTEXPR std::uint64_t currencyLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::uint64_t currencyLength() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD const char *currency() const SBE_NOEXCEPT { - return m_buffer + m_offset + 76; - } + SBE_NODISCARD const char *currency() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 76; + } - SBE_NODISCARD char *currency() SBE_NOEXCEPT { - return m_buffer + m_offset + 76; - } + SBE_NODISCARD char *currency() SBE_NOEXCEPT + { + return m_buffer + m_offset + 76; + } - SBE_NODISCARD char currency(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error("index out of range for currency [E104]"); - } + SBE_NODISCARD char currency(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for currency [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 76 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 76 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread29 & - currency(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error("index out of range for currency [E105]"); - } + MDInstrumentDefinitionSpread29 ¤cy(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for currency [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 76 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 76 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getCurrency(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error("length too large for getCurrency [E106]"); - } + std::uint64_t getCurrency(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getCurrency [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 76, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 76, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread29 & - putCurrency(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 76, src, sizeof(char) * 3); - return *this; - } + MDInstrumentDefinitionSpread29 &putCurrency(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 76, src, sizeof(char) * 3); + return *this; + } - MDInstrumentDefinitionSpread29 &putCurrency( - const char value0, const char value1, const char value2) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 76, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 77, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 78, &val2, sizeof(char)); + MDInstrumentDefinitionSpread29 &putCurrency( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 76, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 77, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 78, &val2, sizeof(char)); - return *this; - } + return *this; + } - std::string getCurrencyAsString() const { - const char *buffer = m_buffer + m_offset + 76; - size_t length = 0; + SBE_NODISCARD std::string getCurrencyAsString() const + { + const char *buffer = m_buffer + m_offset + 76; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getCurrencyAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getCurrencyAsString(); + std::string getCurrencyAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCurrencyAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getCurrencyAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 76; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCurrencyAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 76; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread29 &putCurrency(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error("string too large for putCurrency [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread29 &putCurrency(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 76, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 76 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 76, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 76 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread29 &putCurrency(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error("string too large for putCurrency [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread29 &putCurrency(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 76, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 76 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 76, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 76 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char *SecuritySubTypeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecuritySubTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securitySubTypeId() SBE_NOEXCEPT { - return 762; - } + static SBE_CONSTEXPR std::uint16_t securitySubTypeId() SBE_NOEXCEPT + { + return 762; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securitySubTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securitySubTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securitySubTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securitySubTypeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securitySubTypeSinceVersion(); + return m_actingVersion >= securitySubTypeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securitySubTypeEncodingOffset() SBE_NOEXCEPT { - return 79; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securitySubTypeEncodingOffset() SBE_NOEXCEPT + { + return 79; + } - static SBE_CONSTEXPR char securitySubTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securitySubTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securitySubTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securitySubTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securitySubTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securitySubTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - securitySubTypeEncodingLength() SBE_NOEXCEPT { - return 5; - } + static SBE_CONSTEXPR std::size_t securitySubTypeEncodingLength() SBE_NOEXCEPT + { + return 5; + } - static SBE_CONSTEXPR std::uint64_t securitySubTypeLength() SBE_NOEXCEPT { - return 5; - } + static SBE_CONSTEXPR std::uint64_t securitySubTypeLength() SBE_NOEXCEPT + { + return 5; + } - SBE_NODISCARD const char *securitySubType() const SBE_NOEXCEPT { - return m_buffer + m_offset + 79; - } + SBE_NODISCARD const char *securitySubType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 79; + } - SBE_NODISCARD char *securitySubType() SBE_NOEXCEPT { - return m_buffer + m_offset + 79; - } + SBE_NODISCARD char *securitySubType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 79; + } - SBE_NODISCARD char securitySubType(const std::uint64_t index) const { - if (index >= 5) { - throw std::runtime_error( - "index out of range for securitySubType [E104]"); - } + SBE_NODISCARD char securitySubType(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for securitySubType [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 79 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 79 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread29 & - securitySubType(const std::uint64_t index, const char value) { - if (index >= 5) { - throw std::runtime_error( - "index out of range for securitySubType [E105]"); - } + MDInstrumentDefinitionSpread29 &securitySubType(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for securitySubType [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 79 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 79 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecuritySubType(char *const dst, const std::uint64_t length) const { - if (length > 5) { - throw std::runtime_error( - "length too large for getSecuritySubType [E106]"); - } + std::uint64_t getSecuritySubType(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getSecuritySubType [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 79, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 79, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread29 & - putSecuritySubType(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 79, src, sizeof(char) * 5); - return *this; - } + MDInstrumentDefinitionSpread29 &putSecuritySubType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 79, src, sizeof(char) * 5); + return *this; + } - std::string getSecuritySubTypeAsString() const { - const char *buffer = m_buffer + m_offset + 79; - size_t length = 0; + SBE_NODISCARD std::string getSecuritySubTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 79; + size_t length = 0; - for (; length < 5 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecuritySubTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecuritySubTypeAsString(); + std::string getSecuritySubTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecuritySubTypeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecuritySubTypeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 79; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecuritySubTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 79; + size_t length = 0; - for (; length < 5 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread29 & - putSecuritySubType(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 5) { - throw std::runtime_error( - "string too large for putSecuritySubType [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread29 &putSecuritySubType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putSecuritySubType [E106]"); + } - std::memcpy(m_buffer + m_offset + 79, str.data(), srcLength); - for (size_t start = srcLength; start < 5; ++start) { - m_buffer[m_offset + 79 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 79, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 79 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread29 &putSecuritySubType(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 5) { - throw std::runtime_error( - "string too large for putSecuritySubType [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread29 &putSecuritySubType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putSecuritySubType [E106]"); + } - std::memcpy(m_buffer + m_offset + 79, str.c_str(), srcLength); - for (size_t start = srcLength; start < 5; ++start) { - m_buffer[m_offset + 79 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 79, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 79 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char *UserDefinedInstrumentMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UserDefinedInstrumentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t userDefinedInstrumentId() SBE_NOEXCEPT { - return 9779; - } + static SBE_CONSTEXPR std::uint16_t userDefinedInstrumentId() SBE_NOEXCEPT + { + return 9779; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - userDefinedInstrumentSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t userDefinedInstrumentSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool userDefinedInstrumentInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool userDefinedInstrumentInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= userDefinedInstrumentSinceVersion(); + return m_actingVersion >= userDefinedInstrumentSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - userDefinedInstrumentEncodingOffset() SBE_NOEXCEPT { - return 84; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t userDefinedInstrumentEncodingOffset() SBE_NOEXCEPT + { + return 84; + } - static SBE_CONSTEXPR char userDefinedInstrumentNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char userDefinedInstrumentNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char userDefinedInstrumentMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char userDefinedInstrumentMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char userDefinedInstrumentMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char userDefinedInstrumentMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - userDefinedInstrumentEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t userDefinedInstrumentEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD char userDefinedInstrument() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 84, sizeof(char)); - return (val); - } + SBE_NODISCARD char userDefinedInstrument() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 84, sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread29 & - userDefinedInstrument(const char value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 84, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionSpread29 &userDefinedInstrument(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 84, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char * - MatchAlgorithmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchAlgorithmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchAlgorithmId() SBE_NOEXCEPT { - return 1142; - } + static SBE_CONSTEXPR std::uint16_t matchAlgorithmId() SBE_NOEXCEPT + { + return 1142; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchAlgorithmSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchAlgorithmSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchAlgorithmInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchAlgorithmInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchAlgorithmSinceVersion(); + return m_actingVersion >= matchAlgorithmSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchAlgorithmEncodingOffset() SBE_NOEXCEPT { - return 85; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchAlgorithmEncodingOffset() SBE_NOEXCEPT + { + return 85; + } - static SBE_CONSTEXPR char matchAlgorithmNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char matchAlgorithmNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char matchAlgorithmMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char matchAlgorithmMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char matchAlgorithmMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char matchAlgorithmMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - matchAlgorithmEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchAlgorithmEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD char matchAlgorithm() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 85, sizeof(char)); - return (val); - } + SBE_NODISCARD char matchAlgorithm() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 85, sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread29 & - matchAlgorithm(const char value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 85, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionSpread29 &matchAlgorithm(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 85, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char * - MinTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t minTradeVolId() SBE_NOEXCEPT { - return 562; - } + static SBE_CONSTEXPR std::uint16_t minTradeVolId() SBE_NOEXCEPT + { + return 562; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minTradeVolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minTradeVolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool minTradeVolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minTradeVolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minTradeVolSinceVersion(); + return m_actingVersion >= minTradeVolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minTradeVolEncodingOffset() SBE_NOEXCEPT { - return 86; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minTradeVolEncodingOffset() SBE_NOEXCEPT + { + return 86; + } - static SBE_CONSTEXPR std::uint32_t minTradeVolNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t minTradeVolMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t minTradeVolMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t minTradeVolEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t minTradeVolEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t minTradeVol() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 86, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t minTradeVol() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 86, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionSpread29 & - minTradeVol(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 86, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionSpread29 &minTradeVol(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 86, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - MaxTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaxTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t maxTradeVolId() SBE_NOEXCEPT { - return 1140; - } + static SBE_CONSTEXPR std::uint16_t maxTradeVolId() SBE_NOEXCEPT + { + return 1140; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maxTradeVolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxTradeVolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool maxTradeVolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maxTradeVolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maxTradeVolSinceVersion(); + return m_actingVersion >= maxTradeVolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maxTradeVolEncodingOffset() SBE_NOEXCEPT { - return 90; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxTradeVolEncodingOffset() SBE_NOEXCEPT + { + return 90; + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t maxTradeVolEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t maxTradeVolEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t maxTradeVol() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 90, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t maxTradeVol() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 90, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionSpread29 & - maxTradeVol(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 90, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionSpread29 &maxTradeVol(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 90, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char *MinPriceIncrementMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinPriceIncrementMetaAttribute(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 minPriceIncrementId() SBE_NOEXCEPT { - return 969; - } + static SBE_CONSTEXPR std::uint16_t minPriceIncrementId() SBE_NOEXCEPT + { + return 969; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minPriceIncrementSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minPriceIncrementSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool minPriceIncrementInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minPriceIncrementInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minPriceIncrementSinceVersion(); + return m_actingVersion >= minPriceIncrementSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minPriceIncrementEncodingOffset() SBE_NOEXCEPT { - return 94; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minPriceIncrementEncodingOffset() SBE_NOEXCEPT + { + return 94; + } - private: - PRICE m_minPriceIncrement; +private: + PRICE m_minPriceIncrement; - public: - SBE_NODISCARD PRICE &minPriceIncrement() { - m_minPriceIncrement.wrap( - m_buffer, m_offset + 94, m_actingVersion, m_bufferLength); - return m_minPriceIncrement; - } +public: + SBE_NODISCARD PRICE &minPriceIncrement() + { + m_minPriceIncrement.wrap(m_buffer, m_offset + 94, m_actingVersion, m_bufferLength); + return m_minPriceIncrement; + } - SBE_NODISCARD static const char * - DisplayFactorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "float"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *DisplayFactorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t displayFactorId() SBE_NOEXCEPT { - return 9787; - } + static SBE_CONSTEXPR std::uint16_t displayFactorId() SBE_NOEXCEPT + { + return 9787; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - displayFactorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayFactorSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool displayFactorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool displayFactorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= displayFactorSinceVersion(); + return m_actingVersion >= displayFactorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - displayFactorEncodingOffset() SBE_NOEXCEPT { - return 102; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayFactorEncodingOffset() SBE_NOEXCEPT + { + return 102; + } - private: - FLOAT m_displayFactor; +private: + FLOAT m_displayFactor; - public: - SBE_NODISCARD FLOAT &displayFactor() { - m_displayFactor.wrap( - m_buffer, m_offset + 102, m_actingVersion, m_bufferLength); - return m_displayFactor; - } +public: + SBE_NODISCARD FLOAT &displayFactor() + { + m_displayFactor.wrap(m_buffer, m_offset + 102, m_actingVersion, m_bufferLength); + return m_displayFactor; + } - SBE_NODISCARD static const char *PriceDisplayFormatMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *PriceDisplayFormatMetaAttribute(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 priceDisplayFormatId() SBE_NOEXCEPT { - return 9800; - } + static SBE_CONSTEXPR std::uint16_t priceDisplayFormatId() SBE_NOEXCEPT + { + return 9800; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - priceDisplayFormatSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceDisplayFormatSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool priceDisplayFormatInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool priceDisplayFormatInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= priceDisplayFormatSinceVersion(); + return m_actingVersion >= priceDisplayFormatSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - priceDisplayFormatEncodingOffset() SBE_NOEXCEPT { - return 110; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceDisplayFormatEncodingOffset() SBE_NOEXCEPT + { + return 110; + } - static SBE_CONSTEXPR std::uint8_t - priceDisplayFormatNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - priceDisplayFormatEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t priceDisplayFormatEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t priceDisplayFormat() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 110, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t priceDisplayFormat() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 110, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionSpread29 & - priceDisplayFormat(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 110, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionSpread29 &priceDisplayFormat(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 110, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - PriceRatioMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *PriceRatioMetaAttribute(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 priceRatioId() SBE_NOEXCEPT { - return 5770; - } + static SBE_CONSTEXPR std::uint16_t priceRatioId() SBE_NOEXCEPT + { + return 5770; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - priceRatioSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceRatioSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool priceRatioInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool priceRatioInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= priceRatioSinceVersion(); + return m_actingVersion >= priceRatioSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - priceRatioEncodingOffset() SBE_NOEXCEPT { - return 111; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceRatioEncodingOffset() SBE_NOEXCEPT + { + return 111; + } - private: - PRICENULL m_priceRatio; +private: + PRICENULL m_priceRatio; - public: - SBE_NODISCARD PRICENULL &priceRatio() { - m_priceRatio.wrap( - m_buffer, m_offset + 111, m_actingVersion, m_bufferLength); - return m_priceRatio; - } +public: + SBE_NODISCARD PRICENULL &priceRatio() + { + m_priceRatio.wrap(m_buffer, m_offset + 111, m_actingVersion, m_bufferLength); + return m_priceRatio; + } - SBE_NODISCARD static const char * - TickRuleMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TickRuleMetaAttribute(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 tickRuleId() SBE_NOEXCEPT { return 6350; } + static SBE_CONSTEXPR std::uint16_t tickRuleId() SBE_NOEXCEPT + { + return 6350; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tickRuleSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tickRuleSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool tickRuleInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tickRuleInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tickRuleSinceVersion(); + return m_actingVersion >= tickRuleSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tickRuleEncodingOffset() SBE_NOEXCEPT { - return 119; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tickRuleEncodingOffset() SBE_NOEXCEPT + { + return 119; + } - static SBE_CONSTEXPR std::int8_t tickRuleNullValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t tickRuleNullValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::int8_t tickRuleMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + static SBE_CONSTEXPR std::int8_t tickRuleMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - static SBE_CONSTEXPR std::int8_t tickRuleMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t tickRuleMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::size_t tickRuleEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t tickRuleEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::int8_t tickRule() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 119, sizeof(std::int8_t)); - return (val); - } + SBE_NODISCARD std::int8_t tickRule() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 119, sizeof(std::int8_t)); + return (val); + } - MDInstrumentDefinitionSpread29 & - tickRule(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 119, &val, sizeof(std::int8_t)); - return *this; - } + MDInstrumentDefinitionSpread29 &tickRule(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 119, &val, sizeof(std::int8_t)); + return *this; + } - SBE_NODISCARD static const char * - UnitOfMeasureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UnitOfMeasureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t unitOfMeasureId() SBE_NOEXCEPT { - return 996; - } + static SBE_CONSTEXPR std::uint16_t unitOfMeasureId() SBE_NOEXCEPT + { + return 996; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - unitOfMeasureSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t unitOfMeasureSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool unitOfMeasureInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool unitOfMeasureInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= unitOfMeasureSinceVersion(); + return m_actingVersion >= unitOfMeasureSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - unitOfMeasureEncodingOffset() SBE_NOEXCEPT { - return 120; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingOffset() SBE_NOEXCEPT + { + return 120; + } - static SBE_CONSTEXPR char unitOfMeasureNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char unitOfMeasureNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char unitOfMeasureMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char unitOfMeasureMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char unitOfMeasureMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char unitOfMeasureMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingLength() SBE_NOEXCEPT { - return 30; - } + static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingLength() SBE_NOEXCEPT + { + return 30; + } - static SBE_CONSTEXPR std::uint64_t unitOfMeasureLength() SBE_NOEXCEPT { - return 30; - } + static SBE_CONSTEXPR std::uint64_t unitOfMeasureLength() SBE_NOEXCEPT + { + return 30; + } - SBE_NODISCARD const char *unitOfMeasure() const SBE_NOEXCEPT { - return m_buffer + m_offset + 120; - } + SBE_NODISCARD const char *unitOfMeasure() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 120; + } - SBE_NODISCARD char *unitOfMeasure() SBE_NOEXCEPT { - return m_buffer + m_offset + 120; - } + SBE_NODISCARD char *unitOfMeasure() SBE_NOEXCEPT + { + return m_buffer + m_offset + 120; + } - SBE_NODISCARD char unitOfMeasure(const std::uint64_t index) const { - if (index >= 30) { - throw std::runtime_error( - "index out of range for unitOfMeasure [E104]"); - } + SBE_NODISCARD char unitOfMeasure(const std::uint64_t index) const + { + if (index >= 30) + { + throw std::runtime_error("index out of range for unitOfMeasure [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 120 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 120 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread29 & - unitOfMeasure(const std::uint64_t index, const char value) { - if (index >= 30) { - throw std::runtime_error( - "index out of range for unitOfMeasure [E105]"); - } + MDInstrumentDefinitionSpread29 &unitOfMeasure(const std::uint64_t index, const char value) + { + if (index >= 30) + { + throw std::runtime_error("index out of range for unitOfMeasure [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 120 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 120 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getUnitOfMeasure(char *const dst, const std::uint64_t length) const { - if (length > 30) { - throw std::runtime_error( - "length too large for getUnitOfMeasure [E106]"); - } + std::uint64_t getUnitOfMeasure(char *const dst, const std::uint64_t length) const + { + if (length > 30) + { + throw std::runtime_error("length too large for getUnitOfMeasure [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 120, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 120, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread29 & - putUnitOfMeasure(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 120, src, sizeof(char) * 30); - return *this; - } + MDInstrumentDefinitionSpread29 &putUnitOfMeasure(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 120, src, sizeof(char) * 30); + return *this; + } - std::string getUnitOfMeasureAsString() const { - const char *buffer = m_buffer + m_offset + 120; - size_t length = 0; + SBE_NODISCARD std::string getUnitOfMeasureAsString() const + { + const char *buffer = m_buffer + m_offset + 120; + size_t length = 0; - for (; length < 30 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getUnitOfMeasureAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getUnitOfMeasureAsString(); + std::string getUnitOfMeasureAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getUnitOfMeasureAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getUnitOfMeasureAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 120; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getUnitOfMeasureAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 120; + size_t length = 0; - for (; length < 30 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread29 & - putUnitOfMeasure(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 30) { - throw std::runtime_error( - "string too large for putUnitOfMeasure [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread29 &putUnitOfMeasure(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 30) + { + throw std::runtime_error("string too large for putUnitOfMeasure [E106]"); + } - std::memcpy(m_buffer + m_offset + 120, str.data(), srcLength); - for (size_t start = srcLength; start < 30; ++start) { - m_buffer[m_offset + 120 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 120, str.data(), srcLength); + for (size_t start = srcLength; start < 30; ++start) + { + m_buffer[m_offset + 120 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread29 &putUnitOfMeasure(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 30) { - throw std::runtime_error( - "string too large for putUnitOfMeasure [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread29 &putUnitOfMeasure(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 30) + { + throw std::runtime_error("string too large for putUnitOfMeasure [E106]"); + } - std::memcpy(m_buffer + m_offset + 120, str.c_str(), srcLength); - for (size_t start = srcLength; start < 30; ++start) { - m_buffer[m_offset + 120 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 120, str.c_str(), srcLength); + for (size_t start = srcLength; start < 30; ++start) + { + m_buffer[m_offset + 120 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char *TradingReferencePriceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TradingReferencePriceMetaAttribute(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 tradingReferencePriceId() SBE_NOEXCEPT { - return 1150; - } + static SBE_CONSTEXPR std::uint16_t tradingReferencePriceId() SBE_NOEXCEPT + { + return 1150; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradingReferencePriceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingReferencePriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool tradingReferencePriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tradingReferencePriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tradingReferencePriceSinceVersion(); + return m_actingVersion >= tradingReferencePriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradingReferencePriceEncodingOffset() SBE_NOEXCEPT { - return 150; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingReferencePriceEncodingOffset() SBE_NOEXCEPT + { + return 150; + } - private: - PRICENULL m_tradingReferencePrice; +private: + PRICENULL m_tradingReferencePrice; - public: - SBE_NODISCARD PRICENULL &tradingReferencePrice() { - m_tradingReferencePrice.wrap( - m_buffer, m_offset + 150, m_actingVersion, m_bufferLength); - return m_tradingReferencePrice; - } +public: + SBE_NODISCARD PRICENULL &tradingReferencePrice() + { + m_tradingReferencePrice.wrap(m_buffer, m_offset + 150, m_actingVersion, m_bufferLength); + return m_tradingReferencePrice; + } - SBE_NODISCARD static const char * - SettlPriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SettlPriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT { - return 731; - } + static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT + { + return 731; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - settlPriceTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t settlPriceTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= settlPriceTypeSinceVersion(); + return m_actingVersion >= settlPriceTypeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingOffset() SBE_NOEXCEPT { - return 158; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingOffset() SBE_NOEXCEPT + { + return 158; + } - private: - SettlPriceType m_settlPriceType; +private: + SettlPriceType m_settlPriceType; - public: - SBE_NODISCARD SettlPriceType &settlPriceType() { - m_settlPriceType.wrap( - m_buffer, m_offset + 158, m_actingVersion, m_bufferLength); - return m_settlPriceType; - } +public: + SBE_NODISCARD SettlPriceType &settlPriceType() + { + m_settlPriceType.wrap(m_buffer, m_offset + 158, m_actingVersion, m_bufferLength); + return m_settlPriceType; + } - static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD static const char *OpenInterestQtyMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *OpenInterestQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t openInterestQtyId() SBE_NOEXCEPT { - return 5792; - } + static SBE_CONSTEXPR std::uint16_t openInterestQtyId() SBE_NOEXCEPT + { + return 5792; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - openInterestQtySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t openInterestQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool openInterestQtyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool openInterestQtyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= openInterestQtySinceVersion(); + return m_actingVersion >= openInterestQtySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - openInterestQtyEncodingOffset() SBE_NOEXCEPT { - return 159; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t openInterestQtyEncodingOffset() SBE_NOEXCEPT + { + return 159; + } - static SBE_CONSTEXPR std::int32_t openInterestQtyNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t openInterestQtyMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t openInterestQtyMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t - openInterestQtyEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t openInterestQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t openInterestQty() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 159, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t openInterestQty() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 159, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionSpread29 & - openInterestQty(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 159, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionSpread29 &openInterestQty(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 159, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char * - ClearedVolumeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *ClearedVolumeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t clearedVolumeId() SBE_NOEXCEPT { - return 5791; - } + static SBE_CONSTEXPR std::uint16_t clearedVolumeId() SBE_NOEXCEPT + { + return 5791; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - clearedVolumeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearedVolumeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool clearedVolumeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool clearedVolumeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= clearedVolumeSinceVersion(); + return m_actingVersion >= clearedVolumeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - clearedVolumeEncodingOffset() SBE_NOEXCEPT { - return 163; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearedVolumeEncodingOffset() SBE_NOEXCEPT + { + return 163; + } - static SBE_CONSTEXPR std::int32_t clearedVolumeNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t clearedVolumeMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t clearedVolumeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t clearedVolumeEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t clearedVolumeEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t clearedVolume() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 163, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t clearedVolume() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 163, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionSpread29 & - clearedVolume(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 163, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionSpread29 &clearedVolume(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 163, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char * - HighLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *HighLimitPriceMetaAttribute(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 highLimitPriceId() SBE_NOEXCEPT { - return 1149; - } + static SBE_CONSTEXPR std::uint16_t highLimitPriceId() SBE_NOEXCEPT + { + return 1149; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - highLimitPriceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t highLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= highLimitPriceSinceVersion(); + return m_actingVersion >= highLimitPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - highLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 167; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t highLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 167; + } - private: - PRICENULL m_highLimitPrice; +private: + PRICENULL m_highLimitPrice; - public: - SBE_NODISCARD PRICENULL &highLimitPrice() { - m_highLimitPrice.wrap( - m_buffer, m_offset + 167, m_actingVersion, m_bufferLength); - return m_highLimitPrice; - } +public: + SBE_NODISCARD PRICENULL &highLimitPrice() + { + m_highLimitPrice.wrap(m_buffer, m_offset + 167, m_actingVersion, m_bufferLength); + return m_highLimitPrice; + } - SBE_NODISCARD static const char * - LowLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *LowLimitPriceMetaAttribute(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 lowLimitPriceId() SBE_NOEXCEPT { - return 1148; - } + static SBE_CONSTEXPR std::uint16_t lowLimitPriceId() SBE_NOEXCEPT + { + return 1148; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lowLimitPriceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lowLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lowLimitPriceSinceVersion(); + return m_actingVersion >= lowLimitPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lowLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 175; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lowLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 175; + } - private: - PRICENULL m_lowLimitPrice; +private: + PRICENULL m_lowLimitPrice; - public: - SBE_NODISCARD PRICENULL &lowLimitPrice() { - m_lowLimitPrice.wrap( - m_buffer, m_offset + 175, m_actingVersion, m_bufferLength); - return m_lowLimitPrice; - } +public: + SBE_NODISCARD PRICENULL &lowLimitPrice() + { + m_lowLimitPrice.wrap(m_buffer, m_offset + 175, m_actingVersion, m_bufferLength); + return m_lowLimitPrice; + } - SBE_NODISCARD static const char *MaxPriceVariationMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaxPriceVariationMetaAttribute(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 maxPriceVariationId() SBE_NOEXCEPT { - return 1143; - } + static SBE_CONSTEXPR std::uint16_t maxPriceVariationId() SBE_NOEXCEPT + { + return 1143; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maxPriceVariationSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxPriceVariationSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool maxPriceVariationInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maxPriceVariationInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maxPriceVariationSinceVersion(); + return m_actingVersion >= maxPriceVariationSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maxPriceVariationEncodingOffset() SBE_NOEXCEPT { - return 183; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxPriceVariationEncodingOffset() SBE_NOEXCEPT + { + return 183; + } - private: - PRICENULL m_maxPriceVariation; +private: + PRICENULL m_maxPriceVariation; - public: - SBE_NODISCARD PRICENULL &maxPriceVariation() { - m_maxPriceVariation.wrap( - m_buffer, m_offset + 183, m_actingVersion, m_bufferLength); - return m_maxPriceVariation; - } +public: + SBE_NODISCARD PRICENULL &maxPriceVariation() + { + m_maxPriceVariation.wrap(m_buffer, m_offset + 183, m_actingVersion, m_bufferLength); + return m_maxPriceVariation; + } - SBE_NODISCARD static const char * - MainFractionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MainFractionMetaAttribute(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 mainFractionId() SBE_NOEXCEPT { - return 37702; - } + static SBE_CONSTEXPR std::uint16_t mainFractionId() SBE_NOEXCEPT + { + return 37702; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mainFractionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mainFractionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool mainFractionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool mainFractionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mainFractionSinceVersion(); + return m_actingVersion >= mainFractionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mainFractionEncodingOffset() SBE_NOEXCEPT { - return 191; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mainFractionEncodingOffset() SBE_NOEXCEPT + { + return 191; + } - static SBE_CONSTEXPR std::uint8_t mainFractionNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t mainFractionNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t mainFractionMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t mainFractionMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t mainFractionMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t mainFractionMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t mainFractionEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t mainFractionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t mainFraction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 191, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t mainFraction() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 191, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionSpread29 & - mainFraction(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 191, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionSpread29 &mainFraction(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 191, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - SubFractionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SubFractionMetaAttribute(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 subFractionId() SBE_NOEXCEPT { - return 37703; - } + static SBE_CONSTEXPR std::uint16_t subFractionId() SBE_NOEXCEPT + { + return 37703; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - subFractionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t subFractionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool subFractionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool subFractionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= subFractionSinceVersion(); + return m_actingVersion >= subFractionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - subFractionEncodingOffset() SBE_NOEXCEPT { - return 192; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t subFractionEncodingOffset() SBE_NOEXCEPT + { + return 192; + } - static SBE_CONSTEXPR std::uint8_t subFractionNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t subFractionNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t subFractionMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t subFractionMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t subFractionMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t subFractionMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t subFractionEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t subFractionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t subFraction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 192, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t subFraction() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 192, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionSpread29 & - subFraction(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 192, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionSpread29 &subFraction(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 192, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "LocalMktDate"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute(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 tradingReferenceDateId() SBE_NOEXCEPT { - return 5796; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateId() SBE_NOEXCEPT + { + return 5796; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradingReferenceDateSinceVersion() SBE_NOEXCEPT { - return 6; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingReferenceDateSinceVersion() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tradingReferenceDateSinceVersion(); + return m_actingVersion >= tradingReferenceDateSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingOffset() SBE_NOEXCEPT { - return 193; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingOffset() SBE_NOEXCEPT + { + return 193; + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateNullValue() SBE_NOEXCEPT { - return (std::uint16_t)65535; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT { - if (m_actingVersion < 6) { - return (std::uint16_t)65535; - } + SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT + { + if (m_actingVersion < 6) + { + return static_cast(65535); + } - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MDInstrumentDefinitionSpread29 & - tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint16_t)); - return *this; - } + MDInstrumentDefinitionSpread29 &tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint16_t)); + return *this; + } - class NoEvents { + class NoEvents + { 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; + 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; - } + 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 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) { + 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(9)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 9; + 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 9; + } + + 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 NoEvents &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *EventTypeMetaAttribute(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 eventTypeId() SBE_NOEXCEPT + { + return 865; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t eventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool eventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= eventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD EventType::Value eventType() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); + return EventType::get((val)); + } + + NoEvents &eventType(const EventType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *EventTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t eventTimeId() SBE_NOEXCEPT + { + return 1145; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t eventTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool eventTimeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= eventTimeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTimeEncodingOffset() SBE_NOEXCEPT + { + return 1; + } + + static SBE_CONSTEXPR std::uint64_t eventTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t eventTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t eventTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t eventTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t eventTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoEvents &eventTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint64_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoEvents writer) + { + builder << '{'; + builder << R"("EventType": )"; + builder << '"' << writer.eventType() << '"'; + + builder << ", "; + builder << R"("EventTime": )"; + builder << +writer.eventTime(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)9); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 9; - 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; - } +private: + NoEvents m_noEvents; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 9; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoEventsId() SBE_NOEXCEPT + { + return 864; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoEvents &noEvents() + { + m_noEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noEvents; + } - 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; - } + NoEvents &noEventsCount(const std::uint8_t count) + { + m_noEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noEvents; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoEvents &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - EventTypeMetaAttribute(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 eventTypeId() SBE_NOEXCEPT { - return 865; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - eventTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool eventTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noEventsInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= eventTypeSinceVersion(); + return m_actingVersion >= noEventsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD EventType::Value eventType() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); - return EventType::get((val)); - } - - NoEvents &eventType(const EventType::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - EventTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t eventTimeId() SBE_NOEXCEPT { - return 1145; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - eventTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool eventTimeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= eventTimeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTimeEncodingOffset() SBE_NOEXCEPT { - return 1; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t eventTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t eventTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoEvents &eventTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint64_t)); - return *this; - } - - template - friend std::basic_ostream & - operator<<(std::basic_ostream &builder, NoEvents writer) { - builder << '{'; - builder << R"("EventType": )"; - builder << '"' << writer.eventType() << '"'; - - builder << ", "; - builder << R"("EventTime": )"; - builder << +writer.eventTime(); - - builder << '}'; - - return builder; - } - }; - - private: - NoEvents m_noEvents; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoEventsId() SBE_NOEXCEPT { - return 864; - } - - SBE_NODISCARD inline NoEvents &noEvents() { - m_noEvents.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noEvents; - } - - NoEvents &noEventsCount(const std::uint8_t count) { - m_noEvents.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noEvents; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noEventsSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noEventsInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noEventsSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoMDFeedTypes { + class NoMDFeedTypes + { 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; + 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; - } + 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 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((std::uint16_t)4); - dimensions.numInGroup((std::uint8_t)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 { return *m_positionPtr; } - - std::uint64_t sbeCheckPosition(const std::uint64_t position) { - if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) { - throw std::runtime_error("buffer too short [E100]"); - } - return position; - } - - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } - - SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT { - return m_count; - } - - SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT { - return m_index < m_count; - } - - inline NoMDFeedTypes &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - MDFeedTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDFeedTypeId() SBE_NOEXCEPT { - return 1022; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDFeedTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDFeedTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDFeedTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDFeedTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR char mDFeedTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char mDFeedTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char mDFeedTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingLength() SBE_NOEXCEPT { - return 3; - } - - static SBE_CONSTEXPR std::uint64_t mDFeedTypeLength() SBE_NOEXCEPT { - return 3; - } - - SBE_NODISCARD const char *mDFeedType() const SBE_NOEXCEPT { - return m_buffer + m_offset + 0; - } - - SBE_NODISCARD char *mDFeedType() SBE_NOEXCEPT { - return m_buffer + m_offset + 0; - } - - SBE_NODISCARD char mDFeedType(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error( - "index out of range for mDFeedType [E104]"); - } - - char val; - std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); - return (val); - } - - NoMDFeedTypes &mDFeedType(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error( - "index out of range for mDFeedType [E105]"); - } - - char val = (value); - std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); - return *this; - } - - std::uint64_t - getMDFeedType(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error( - "length too large for getMDFeedType [E106]"); - } - - std::memcpy( - dst, m_buffer + m_offset + 0, - sizeof(char) * static_cast(length)); - return length; - } - - NoMDFeedTypes &putMDFeedType(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 3); - return *this; - } - - NoMDFeedTypes & - putMDFeedType(const char value0, const char value1, const char value2) - SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 0, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 1, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 2, &val2, sizeof(char)); - - return *this; - } - - std::string getMDFeedTypeAsString() const { - const char *buffer = m_buffer + m_offset + 0; - size_t length = 0; - - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); - - return result; - } - - std::string getMDFeedTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getMDFeedTypeAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } + 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]"); } - } - - return oss.str(); - } - -#if __cplusplus >= 201703L - std::string_view getMDFeedTypeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 0; - size_t length = 0; - - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); - - return result; - } -#endif - -#if __cplusplus >= 201703L - NoMDFeedTypes &putMDFeedType(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putMDFeedType [E106]"); - } - - std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 0 + start] = 0; - } - - return *this; - } -#else - NoMDFeedTypes &putMDFeedType(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putMDFeedType [E106]"); - } - - std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 0 + start] = 0; - } - - return *this; - } -#endif - - SBE_NODISCARD static const char * - MarketDepthMetaAttribute(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 marketDepthId() SBE_NOEXCEPT { - return 264; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - marketDepthSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool marketDepthInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= marketDepthSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - marketDepthEncodingOffset() SBE_NOEXCEPT { - return 3; - } - - static SBE_CONSTEXPR std::int8_t marketDepthNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t marketDepthMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t marketDepthMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t - marketDepthEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::int8_t marketDepth() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 3, sizeof(std::int8_t)); - return (val); - } - - NoMDFeedTypes &marketDepth(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 3, &val, sizeof(std::int8_t)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDFeedTypes writer) { - builder << '{'; - builder << R"("MDFeedType": )"; - builder << '"' << writer.getMDFeedTypeAsJsonEscapedString().c_str() - << '"'; - - builder << ", "; - builder << R"("MarketDepth": )"; - builder << +writer.marketDepth(); - - builder << '}'; - - return builder; - } - }; - - private: - NoMDFeedTypes m_noMDFeedTypes; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDFeedTypesId() SBE_NOEXCEPT { - return 1141; - } - - SBE_NODISCARD inline NoMDFeedTypes &noMDFeedTypes() { - m_noMDFeedTypes.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDFeedTypes; - } - - NoMDFeedTypes &noMDFeedTypesCount(const std::uint8_t count) { - m_noMDFeedTypes.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDFeedTypes; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDFeedTypesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDFeedTypesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDFeedTypesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoInstAttrib { - 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((std::uint16_t)4); - dimensions.numInGroup((std::uint8_t)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 { return *m_positionPtr; } - - std::uint64_t sbeCheckPosition(const std::uint64_t position) { - if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) { - throw std::runtime_error("buffer too short [E100]"); - } - return position; - } - - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } - - SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT { - return m_count; - } - - SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT { - return m_index < m_count; - } - - inline NoInstAttrib &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char *InstAttribTypeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t instAttribTypeId() SBE_NOEXCEPT { - return 871; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - instAttribTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool instAttribTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= instAttribTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - instAttribTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t - instAttribTypeEncodingLength() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::int8_t - instAttribType() SBE_NOEXCEPT { - return (std::int8_t)24; - } - - SBE_NODISCARD static const char *InstAttribValueMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t instAttribValueId() SBE_NOEXCEPT { - return 872; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - instAttribValueSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool instAttribValueInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= instAttribValueSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - instAttribValueEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - private: - InstAttribValue m_instAttribValue; - - public: - SBE_NODISCARD InstAttribValue &instAttribValue() { - m_instAttribValue.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_instAttribValue; - } - - static SBE_CONSTEXPR std::size_t - instAttribValueEncodingLength() SBE_NOEXCEPT { - return 4; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoInstAttrib writer) { - builder << '{'; - builder << R"("InstAttribValue": )"; - builder << writer.instAttribValue(); - - builder << '}'; - - return builder; - } - }; - - private: - NoInstAttrib m_noInstAttrib; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoInstAttribId() SBE_NOEXCEPT { - return 870; - } - - SBE_NODISCARD inline NoInstAttrib &noInstAttrib() { - m_noInstAttrib.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noInstAttrib; - } - - NoInstAttrib &noInstAttribCount(const std::uint8_t count) { - m_noInstAttrib.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noInstAttrib; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noInstAttribSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noInstAttribInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noInstAttribSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoLotTypeRules { - 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((std::uint16_t)5); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 5; - 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 5; - } - - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } - - std::uint64_t sbeCheckPosition(const std::uint64_t position) { - if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) { - throw std::runtime_error("buffer too short [E100]"); - } - return position; - } - - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } - - SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT { - return m_count; - } - - SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT { - return m_index < m_count; - } - - inline NoLotTypeRules &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - LotTypeMetaAttribute(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 lotTypeId() SBE_NOEXCEPT { - return 1093; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lotTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool lotTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= lotTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lotTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int8_t lotTypeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t lotTypeMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t lotTypeMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t lotTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::int8_t lotType() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int8_t)); - return (val); - } - - NoLotTypeRules &lotType(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int8_t)); - return *this; - } - - SBE_NODISCARD static const char * - MinLotSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t minLotSizeId() SBE_NOEXCEPT { - return 1231; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minLotSizeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool minLotSizeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= minLotSizeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minLotSizeEncodingOffset() SBE_NOEXCEPT { - return 1; - } - - private: - DecimalQty m_minLotSize; - - public: - SBE_NODISCARD DecimalQty &minLotSize() { - m_minLotSize.wrap( - m_buffer, m_offset + 1, m_actingVersion, m_bufferLength); - return m_minLotSize; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoLotTypeRules writer) { - builder << '{'; - builder << R"("LotType": )"; - builder << +writer.lotType(); - - builder << ", "; - builder << R"("MinLotSize": )"; - builder << writer.minLotSize(); - - builder << '}'; - - return builder; - } - }; - - private: - NoLotTypeRules m_noLotTypeRules; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoLotTypeRulesId() SBE_NOEXCEPT { - return 1234; - } - - SBE_NODISCARD inline NoLotTypeRules &noLotTypeRules() { - m_noLotTypeRules.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noLotTypeRules; - } - - NoLotTypeRules &noLotTypeRulesCount(const std::uint8_t count) { - m_noLotTypeRules.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noLotTypeRules; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noLotTypeRulesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noLotTypeRulesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noLotTypeRulesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoLegs { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_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((std::uint16_t)18); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 18; - 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 18; - } - - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } - - std::uint64_t sbeCheckPosition(const std::uint64_t position) { - if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) { - throw std::runtime_error("buffer too short [E100]"); - } - return position; - } - - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } - - SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT { - return m_count; - } - - SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT { - return m_index < m_count; - } - - inline NoLegs &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char *LegSecurityIDMetaAttribute( - 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 legSecurityIDId() SBE_NOEXCEPT { - return 602; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - legSecurityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool legSecurityIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= legSecurityIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - legSecurityIDEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int32_t legSecurityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t legSecurityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t legSecurityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - legSecurityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t legSecurityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoLegs &legSecurityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char *LegSecurityIDSourceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t legSecurityIDSourceId() SBE_NOEXCEPT { - return 603; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - legSecurityIDSourceSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool legSecurityIDSourceInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= legSecurityIDSourceSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - legSecurityIDSourceEncodingOffset() SBE_NOEXCEPT { - return 4; - } - - static SBE_CONSTEXPR char legSecurityIDSourceNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char legSecurityIDSourceMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char legSecurityIDSourceMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t - legSecurityIDSourceEncodingLength() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t - legSecurityIDSourceLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD const char *legSecurityIDSource() const { - static const std::uint8_t legSecurityIDSourceValues[] = {56}; - - return (const char *)legSecurityIDSourceValues; - } - - SBE_NODISCARD char legSecurityIDSource(const std::uint64_t index) const { - static const std::uint8_t legSecurityIDSourceValues[] = {56}; - - return (char)legSecurityIDSourceValues[index]; - } - - std::uint64_t - getLegSecurityIDSource(char *dst, const std::uint64_t length) const { - static std::uint8_t legSecurityIDSourceValues[] = {56}; - std::uint64_t bytesToCopy = length < sizeof(legSecurityIDSourceValues) - ? length - : sizeof(legSecurityIDSourceValues); - - std::memcpy( - dst, legSecurityIDSourceValues, static_cast(bytesToCopy)); - return bytesToCopy; - } - - std::string getLegSecurityIDSourceAsString() const { - static const std::uint8_t LegSecurityIDSourceValues[] = {56}; - - return std::string((const char *)LegSecurityIDSourceValues, 1); - } - - std::string getLegSecurityIDSourceAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getLegSecurityIDSourceAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } + #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; + } - return oss.str(); - } + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - SBE_NODISCARD static const char * - LegSideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - static SBE_CONSTEXPR std::uint16_t legSideId() SBE_NOEXCEPT { - return 624; - } + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - legSideSinceVersion() SBE_NOEXCEPT { - return 0; - } + inline NoMDFeedTypes &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; - SBE_NODISCARD bool legSideInActingVersion() SBE_NOEXCEPT { + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *MDFeedTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDFeedTypeId() SBE_NOEXCEPT + { + return 1022; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDFeedTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDFeedTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDFeedTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char mDFeedTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char mDFeedTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char mDFeedTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingLength() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t mDFeedTypeLength() SBE_NOEXCEPT + { + return 3; + } + + SBE_NODISCARD const char *mDFeedType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *mDFeedType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char mDFeedType(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for mDFeedType [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoMDFeedTypes &mDFeedType(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for mDFeedType [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getMDFeedType(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getMDFeedType [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoMDFeedTypes &putMDFeedType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 3); + return *this; + } + + NoMDFeedTypes &putMDFeedType( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 0, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 1, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 2, &val2, sizeof(char)); + + return *this; + } + + SBE_NODISCARD std::string getMDFeedTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getMDFeedTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMDFeedTypeAsString(); + + 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 getMDFeedTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoMDFeedTypes &putMDFeedType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putMDFeedType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoMDFeedTypes &putMDFeedType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putMDFeedType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *MarketDepthMetaAttribute(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 marketDepthId() SBE_NOEXCEPT + { + return 264; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketDepthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool marketDepthInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= marketDepthSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketDepthEncodingOffset() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::int8_t marketDepthNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t marketDepthMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t marketDepthMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t marketDepthEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t marketDepth() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 3, sizeof(std::int8_t)); + return (val); + } + + NoMDFeedTypes &marketDepth(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 3, &val, sizeof(std::int8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDFeedTypes writer) + { + builder << '{'; + builder << R"("MDFeedType": )"; + builder << '"' << + writer.getMDFeedTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("MarketDepth": )"; + builder << +writer.marketDepth(); + + 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: + NoMDFeedTypes m_noMDFeedTypes; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDFeedTypesId() SBE_NOEXCEPT + { + return 1141; + } + + SBE_NODISCARD inline NoMDFeedTypes &noMDFeedTypes() + { + m_noMDFeedTypes.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDFeedTypes; + } + + NoMDFeedTypes &noMDFeedTypesCount(const std::uint8_t count) + { + m_noMDFeedTypes.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDFeedTypes; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDFeedTypesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noMDFeedTypesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= legSideSinceVersion(); + return m_actingVersion >= noMDFeedTypesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - legSideEncodingOffset() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - legSideEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD LegSide::Value legSide() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint8_t)); - return LegSide::get((val)); - } - - NoLegs &legSide(const LegSide::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - LegRatioQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t legRatioQtyId() SBE_NOEXCEPT { - return 623; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - legRatioQtySinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool legRatioQtyInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= legRatioQtySinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - legRatioQtyEncodingOffset() SBE_NOEXCEPT { - return 5; - } - - static SBE_CONSTEXPR std::int8_t legRatioQtyNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t legRatioQtyMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t legRatioQtyMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t - legRatioQtyEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::int8_t legRatioQty() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 5, sizeof(std::int8_t)); - return (val); - } - - NoLegs &legRatioQty(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 5, &val, sizeof(std::int8_t)); - return *this; - } - - SBE_NODISCARD static const char * - LegPriceMetaAttribute(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 legPriceId() SBE_NOEXCEPT { - return 566; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - legPriceSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool legPriceInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= legPriceSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - legPriceEncodingOffset() SBE_NOEXCEPT { - return 6; - } + } + class NoInstAttrib + { private: - PRICENULL m_legPrice; + 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: - SBE_NODISCARD PRICENULL &legPrice() { - m_legPrice.wrap( - m_buffer, m_offset + 6, m_actingVersion, m_bufferLength); - return m_legPrice; - } + 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; + } - SBE_NODISCARD static const char *LegOptionDeltaMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + 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::uint16_t legOptionDeltaId() SBE_NOEXCEPT { - return 1017; - } + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - legOptionDeltaSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD bool legOptionDeltaInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= legOptionDeltaSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - legOptionDeltaEncodingOffset() SBE_NOEXCEPT { - return 14; - } + // 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 NoInstAttrib &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *InstAttribTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t instAttribTypeId() SBE_NOEXCEPT + { + return 871; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t instAttribTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool instAttribTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= instAttribTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t instAttribTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t instAttribTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t instAttribType() SBE_NOEXCEPT + { + return static_cast(24); + } + + SBE_NODISCARD static const char *InstAttribValueMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t instAttribValueId() SBE_NOEXCEPT + { + return 872; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t instAttribValueSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool instAttribValueInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= instAttribValueSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t instAttribValueEncodingOffset() SBE_NOEXCEPT + { + return 0; + } private: - DecimalQty m_legOptionDelta; + InstAttribValue m_instAttribValue; public: - SBE_NODISCARD DecimalQty &legOptionDelta() { - m_legOptionDelta.wrap( - m_buffer, m_offset + 14, m_actingVersion, m_bufferLength); - return m_legOptionDelta; - } + SBE_NODISCARD InstAttribValue &instAttribValue() + { + m_instAttribValue.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_instAttribValue; + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &builder, NoLegs writer) { - builder << '{'; - builder << R"("LegSecurityID": )"; - builder << +writer.legSecurityID(); + static SBE_CONSTEXPR std::size_t instAttribValueEncodingLength() SBE_NOEXCEPT + { + return 4; + } - builder << ", "; - builder << R"("LegSide": )"; - builder << '"' << writer.legSide() << '"'; + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoInstAttrib writer) + { + builder << '{'; + builder << R"("InstAttribValue": )"; + builder << writer.instAttribValue(); - builder << ", "; - builder << R"("LegRatioQty": )"; - builder << +writer.legRatioQty(); + builder << '}'; - builder << ", "; - builder << R"("LegPrice": )"; - builder << writer.legPrice(); + return builder; + } - builder << ", "; - builder << R"("LegOptionDelta": )"; - builder << writer.legOptionDelta(); + void skip() + { + } - builder << '}'; + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } - return builder; - } - }; + 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(); - private: - NoLegs m_noLegs; + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLegsId() SBE_NOEXCEPT { - return 555; - } +private: + NoInstAttrib m_noInstAttrib; - SBE_NODISCARD inline NoLegs &noLegs() { - m_noLegs.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noLegs; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoInstAttribId() SBE_NOEXCEPT + { + return 870; + } - NoLegs &noLegsCount(const std::uint8_t count) { - m_noLegs.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noLegs; - } + SBE_NODISCARD inline NoInstAttrib &noInstAttrib() + { + m_noInstAttrib.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noInstAttrib; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noLegsSinceVersion() SBE_NOEXCEPT { - return 0; - } + NoInstAttrib &noInstAttribCount(const std::uint8_t count) + { + m_noInstAttrib.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noInstAttrib; + } - SBE_NODISCARD bool noLegsInActingVersion() const SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noInstAttribSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noInstAttribInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= noLegsSinceVersion(); + return m_actingVersion >= noInstAttribSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDInstrumentDefinitionSpread29 _writer) { - MDInstrumentDefinitionSpread29 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDInstrumentDefinitionSpread29", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; + class NoLotTypeRules + { + 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; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } - builder << ", "; - builder << R"("TotNumReports": )"; - builder << +writer.totNumReports(); + 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; + } - builder << ", "; - builder << R"("SecurityUpdateAction": )"; - builder << '"' << writer.securityUpdateAction() << '"'; + 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(5)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 5; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } - builder << ", "; - builder << R"("LastUpdateTime": )"; - builder << +writer.lastUpdateTime(); + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } - builder << ", "; - builder << R"("MDSecurityTradingStatus": )"; - builder << '"' << writer.mDSecurityTradingStatus() << '"'; + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 5; + } - builder << ", "; - builder << R"("ApplID": )"; - builder << +writer.applID(); + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - builder << ", "; - builder << R"("MarketSegmentID": )"; - builder << +writer.marketSegmentID(); + // 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; + } - builder << ", "; - builder << R"("UnderlyingProduct": )"; - builder << +writer.underlyingProduct(); + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - builder << ", "; - builder << R"("SecurityExchange": )"; - builder << '"' << writer.getSecurityExchangeAsJsonEscapedString().c_str() - << '"'; + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - builder << ", "; - builder << R"("SecurityGroup": )"; - builder << '"' << writer.getSecurityGroupAsJsonEscapedString().c_str() - << '"'; + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } - builder << ", "; - builder << R"("Asset": )"; - builder << '"' << writer.getAssetAsJsonEscapedString().c_str() << '"'; + inline NoLotTypeRules &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; - builder << ", "; - builder << R"("Symbol": )"; - builder << '"' << writer.getSymbolAsJsonEscapedString().c_str() << '"'; + return *this; + } - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } - builder << ", "; - builder << R"("SecurityType": )"; - builder << '"' << writer.getSecurityTypeAsJsonEscapedString().c_str() - << '"'; + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - builder << ", "; - builder << R"("CFICode": )"; - builder << '"' << writer.getCFICodeAsJsonEscapedString().c_str() << '"'; + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - builder << ", "; - builder << R"("MaturityMonthYear": )"; - builder << writer.maturityMonthYear(); + #endif - builder << ", "; - builder << R"("Currency": )"; - builder << '"' << writer.getCurrencyAsJsonEscapedString().c_str() << '"'; + SBE_NODISCARD static const char *LotTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - builder << ", "; - builder << R"("SecuritySubType": )"; - builder << '"' << writer.getSecuritySubTypeAsJsonEscapedString().c_str() - << '"'; + static SBE_CONSTEXPR std::uint16_t lotTypeId() SBE_NOEXCEPT + { + return 1093; + } - builder << ", "; - builder << R"("UserDefinedInstrument": )"; - if (std::isprint(writer.userDefinedInstrument())) { - builder << '"' << (char)writer.userDefinedInstrument() << '"'; - } else { - builder << (int)writer.userDefinedInstrument(); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lotTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - builder << ", "; - builder << R"("MatchAlgorithm": )"; - if (std::isprint(writer.matchAlgorithm())) { - builder << '"' << (char)writer.matchAlgorithm() << '"'; - } else { - builder << (int)writer.matchAlgorithm(); - } + SBE_NODISCARD bool lotTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= lotTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } - builder << ", "; - builder << R"("MinTradeVol": )"; - builder << +writer.minTradeVol(); + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lotTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - builder << ", "; - builder << R"("MaxTradeVol": )"; - builder << +writer.maxTradeVol(); + static SBE_CONSTEXPR std::int8_t lotTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } - builder << ", "; - builder << R"("MinPriceIncrement": )"; - builder << writer.minPriceIncrement(); + static SBE_CONSTEXPR std::int8_t lotTypeMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - builder << ", "; - builder << R"("DisplayFactor": )"; - builder << writer.displayFactor(); + static SBE_CONSTEXPR std::int8_t lotTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - builder << ", "; - builder << R"("PriceDisplayFormat": )"; - builder << +writer.priceDisplayFormat(); + static SBE_CONSTEXPR std::size_t lotTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } - builder << ", "; - builder << R"("PriceRatio": )"; - builder << writer.priceRatio(); + SBE_NODISCARD std::int8_t lotType() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int8_t)); + return (val); + } - builder << ", "; - builder << R"("TickRule": )"; - builder << +writer.tickRule(); + NoLotTypeRules &lotType(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int8_t)); + return *this; + } - builder << ", "; - builder << R"("UnitOfMeasure": )"; - builder << '"' << writer.getUnitOfMeasureAsJsonEscapedString().c_str() - << '"'; + SBE_NODISCARD static const char *MinLotSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - builder << ", "; - builder << R"("TradingReferencePrice": )"; - builder << writer.tradingReferencePrice(); + static SBE_CONSTEXPR std::uint16_t minLotSizeId() SBE_NOEXCEPT + { + return 1231; + } - builder << ", "; - builder << R"("SettlPriceType": )"; - builder << writer.settlPriceType(); + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minLotSizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - builder << ", "; - builder << R"("OpenInterestQty": )"; - builder << +writer.openInterestQty(); + SBE_NODISCARD bool minLotSizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= minLotSizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } - builder << ", "; - builder << R"("ClearedVolume": )"; - builder << +writer.clearedVolume(); + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minLotSizeEncodingOffset() SBE_NOEXCEPT + { + return 1; + } - builder << ", "; - builder << R"("HighLimitPrice": )"; - builder << writer.highLimitPrice(); +private: + DecimalQty m_minLotSize; - builder << ", "; - builder << R"("LowLimitPrice": )"; - builder << writer.lowLimitPrice(); +public: + SBE_NODISCARD DecimalQty &minLotSize() + { + m_minLotSize.wrap(m_buffer, m_offset + 1, m_actingVersion, m_bufferLength); + return m_minLotSize; + } - builder << ", "; - builder << R"("MaxPriceVariation": )"; - builder << writer.maxPriceVariation(); + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoLotTypeRules writer) + { + builder << '{'; + builder << R"("LotType": )"; + builder << +writer.lotType(); - builder << ", "; - builder << R"("MainFraction": )"; - builder << +writer.mainFraction(); + builder << ", "; + builder << R"("MinLotSize": )"; + builder << writer.minLotSize(); - builder << ", "; - builder << R"("SubFraction": )"; - builder << +writer.subFraction(); + builder << '}'; - builder << ", "; - builder << R"("TradingReferenceDate": )"; - builder << +writer.tradingReferenceDate(); + return builder; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoEvents": [)"; - writer.noEvents().forEach([&](NoEvents &noEvents) { - if (atLeastOne) { - 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: + NoLotTypeRules m_noLotTypeRules; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLotTypeRulesId() SBE_NOEXCEPT + { + return 1234; + } + + SBE_NODISCARD inline NoLotTypeRules &noLotTypeRules() + { + m_noLotTypeRules.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLotTypeRules; + } + + NoLotTypeRules &noLotTypeRulesCount(const std::uint8_t count) + { + m_noLotTypeRules.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLotTypeRules; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noLotTypeRulesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noLotTypeRulesInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noLotTypeRulesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoLegs + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_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(18)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 18; + 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 18; + } + + 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 NoLegs &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *LegSecurityIDMetaAttribute(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 legSecurityIDId() SBE_NOEXCEPT + { + return 602; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSecurityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSecurityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSecurityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSecurityIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t legSecurityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t legSecurityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legSecurityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *LegSecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legSecurityIDSourceId() SBE_NOEXCEPT + { + return 603; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSecurityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSecurityIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSecurityIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSecurityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR char legSecurityIDSourceNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char legSecurityIDSourceMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char legSecurityIDSourceMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t legSecurityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t legSecurityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *legSecurityIDSource() const + { + static const std::uint8_t legSecurityIDSourceValues[] = { 56 }; + + return (const char *)legSecurityIDSourceValues; + } + + SBE_NODISCARD char legSecurityIDSource(const std::uint64_t index) const + { + static const std::uint8_t legSecurityIDSourceValues[] = { 56 }; + + return (char)legSecurityIDSourceValues[index]; + } + + std::uint64_t getLegSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t legSecurityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(legSecurityIDSourceValues) ? length : sizeof(legSecurityIDSourceValues); + + std::memcpy(dst, legSecurityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getLegSecurityIDSourceAsString() const + { + static const std::uint8_t LegSecurityIDSourceValues[] = { 56 }; + + return std::string((const char *)LegSecurityIDSourceValues, 1); + } + + std::string getLegSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLegSecurityIDSourceAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char *LegSideMetaAttribute(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 legSideId() SBE_NOEXCEPT + { + return 624; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD LegSide::Value legSide() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint8_t)); + return LegSide::get((val)); + } + + NoLegs &legSide(const LegSide::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *LegRatioQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legRatioQtyId() SBE_NOEXCEPT + { + return 623; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legRatioQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legRatioQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legRatioQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legRatioQtyEncodingOffset() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::int8_t legRatioQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t legRatioQtyMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t legRatioQtyMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t legRatioQtyEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t legRatioQty() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 5, sizeof(std::int8_t)); + return (val); + } + + NoLegs &legRatioQty(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 5, &val, sizeof(std::int8_t)); + return *this; + } + + SBE_NODISCARD static const char *LegPriceMetaAttribute(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 legPriceId() SBE_NOEXCEPT + { + return 566; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legPriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legPriceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legPriceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legPriceEncodingOffset() SBE_NOEXCEPT + { + return 6; + } + +private: + PRICENULL m_legPrice; + +public: + SBE_NODISCARD PRICENULL &legPrice() + { + m_legPrice.wrap(m_buffer, m_offset + 6, m_actingVersion, m_bufferLength); + return m_legPrice; + } + + SBE_NODISCARD static const char *LegOptionDeltaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legOptionDeltaId() SBE_NOEXCEPT + { + return 1017; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legOptionDeltaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legOptionDeltaInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legOptionDeltaSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legOptionDeltaEncodingOffset() SBE_NOEXCEPT + { + return 14; + } + +private: + DecimalQty m_legOptionDelta; + +public: + SBE_NODISCARD DecimalQty &legOptionDelta() + { + m_legOptionDelta.wrap(m_buffer, m_offset + 14, m_actingVersion, m_bufferLength); + return m_legOptionDelta; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoLegs writer) + { + builder << '{'; + builder << R"("LegSecurityID": )"; + builder << +writer.legSecurityID(); + + builder << ", "; + builder << R"("LegSide": )"; + builder << '"' << writer.legSide() << '"'; + + builder << ", "; + builder << R"("LegRatioQty": )"; + builder << +writer.legRatioQty(); + + builder << ", "; + builder << R"("LegPrice": )"; + builder << writer.legPrice(); + + builder << ", "; + builder << R"("LegOptionDelta": )"; + builder << writer.legOptionDelta(); + + 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: + NoLegs m_noLegs; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLegsId() SBE_NOEXCEPT + { + return 555; + } + + SBE_NODISCARD inline NoLegs &noLegs() + { + m_noLegs.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + NoLegs &noLegsCount(const std::uint8_t count) + { + m_noLegs.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noLegsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noLegsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noLegsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDInstrumentDefinitionSpread29 _writer) +{ + MDInstrumentDefinitionSpread29 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDInstrumentDefinitionSpread29", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); + + builder << ", "; + builder << R"("TotNumReports": )"; + builder << +writer.totNumReports(); + + builder << ", "; + builder << R"("SecurityUpdateAction": )"; + builder << '"' << writer.securityUpdateAction() << '"'; + + builder << ", "; + builder << R"("LastUpdateTime": )"; + builder << +writer.lastUpdateTime(); + + builder << ", "; + builder << R"("MDSecurityTradingStatus": )"; + builder << '"' << writer.mDSecurityTradingStatus() << '"'; + + builder << ", "; + builder << R"("ApplID": )"; + builder << +writer.applID(); + + builder << ", "; + builder << R"("MarketSegmentID": )"; + builder << +writer.marketSegmentID(); + + builder << ", "; + builder << R"("UnderlyingProduct": )"; + builder << +writer.underlyingProduct(); + + builder << ", "; + builder << R"("SecurityExchange": )"; + builder << '"' << + writer.getSecurityExchangeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Asset": )"; + builder << '"' << + writer.getAssetAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Symbol": )"; + builder << '"' << + writer.getSymbolAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("SecurityType": )"; + builder << '"' << + writer.getSecurityTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("CFICode": )"; + builder << '"' << + writer.getCFICodeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("MaturityMonthYear": )"; + builder << writer.maturityMonthYear(); + + builder << ", "; + builder << R"("Currency": )"; + builder << '"' << + writer.getCurrencyAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecuritySubType": )"; + builder << '"' << + writer.getSecuritySubTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("UserDefinedInstrument": )"; + if (std::isprint(writer.userDefinedInstrument())) + { + builder << '"' << (char)writer.userDefinedInstrument() << '"'; + } + else + { + builder << (int)writer.userDefinedInstrument(); + } + + builder << ", "; + builder << R"("MatchAlgorithm": )"; + if (std::isprint(writer.matchAlgorithm())) + { + builder << '"' << (char)writer.matchAlgorithm() << '"'; + } + else + { + builder << (int)writer.matchAlgorithm(); + } + + builder << ", "; + builder << R"("MinTradeVol": )"; + builder << +writer.minTradeVol(); + + builder << ", "; + builder << R"("MaxTradeVol": )"; + builder << +writer.maxTradeVol(); + + builder << ", "; + builder << R"("MinPriceIncrement": )"; + builder << writer.minPriceIncrement(); + + builder << ", "; + builder << R"("DisplayFactor": )"; + builder << writer.displayFactor(); + + builder << ", "; + builder << R"("PriceDisplayFormat": )"; + builder << +writer.priceDisplayFormat(); + + builder << ", "; + builder << R"("PriceRatio": )"; + builder << writer.priceRatio(); + + builder << ", "; + builder << R"("TickRule": )"; + builder << +writer.tickRule(); + + builder << ", "; + builder << R"("UnitOfMeasure": )"; + builder << '"' << + writer.getUnitOfMeasureAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("TradingReferencePrice": )"; + builder << writer.tradingReferencePrice(); + + builder << ", "; + builder << R"("SettlPriceType": )"; + builder << writer.settlPriceType(); + + builder << ", "; + builder << R"("OpenInterestQty": )"; + builder << +writer.openInterestQty(); + + builder << ", "; + builder << R"("ClearedVolume": )"; + builder << +writer.clearedVolume(); + + builder << ", "; + builder << R"("HighLimitPrice": )"; + builder << writer.highLimitPrice(); + + builder << ", "; + builder << R"("LowLimitPrice": )"; + builder << writer.lowLimitPrice(); + + builder << ", "; + builder << R"("MaxPriceVariation": )"; + builder << writer.maxPriceVariation(); + + builder << ", "; + builder << R"("MainFraction": )"; + builder << +writer.mainFraction(); + + builder << ", "; + builder << R"("SubFraction": )"; + builder << +writer.subFraction(); + + builder << ", "; + builder << R"("TradingReferenceDate": )"; + builder << +writer.tradingReferenceDate(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoEvents": [)"; + writer.noEvents().forEach([&](NoEvents& noEvents) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noEvents; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDFeedTypes": [)"; - writer.noMDFeedTypes().forEach([&](NoMDFeedTypes &noMDFeedTypes) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDFeedTypes": [)"; + writer.noMDFeedTypes().forEach([&](NoMDFeedTypes& noMDFeedTypes) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDFeedTypes; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoInstAttrib": [)"; - writer.noInstAttrib().forEach([&](NoInstAttrib &noInstAttrib) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoInstAttrib": [)"; + writer.noInstAttrib().forEach([&](NoInstAttrib& noInstAttrib) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noInstAttrib; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoLotTypeRules": [)"; - writer.noLotTypeRules().forEach([&](NoLotTypeRules &noLotTypeRules) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoLotTypeRules": [)"; + writer.noLotTypeRules().forEach([&](NoLotTypeRules& noLotTypeRules) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noLotTypeRules; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoLegs": [)"; - writer.noLegs().forEach([&](NoLegs &noLegs) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoLegs": [)"; + writer.noLegs().forEach([&](NoLegs& noLegs) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noLegs; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noEvents().forEach([](NoEvents e) + { + e.skip(); + }); + noMDFeedTypes().forEach([](NoMDFeedTypes e) + { + e.skip(); + }); + noInstAttrib().forEach([](NoInstAttrib e) + { + e.skip(); + }); + noLotTypeRules().forEach([](NoLotTypeRules e) + { + e.skip(); + }); + noLegs().forEach([](NoLegs e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength( + std::size_t noEventsLength = 0, + std::size_t noMDFeedTypesLength = 0, + std::size_t noInstAttribLength = 0, + std::size_t noLotTypeRulesLength = 0, + std::size_t noLegsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoEvents::sbeHeaderSize(); + if (noEventsLength > 254LL) + { + throw std::runtime_error("noEventsLength outside of allowed range [E110]"); + } + length += noEventsLength *NoEvents::sbeBlockLength(); + + length += NoMDFeedTypes::sbeHeaderSize(); + if (noMDFeedTypesLength > 254LL) + { + throw std::runtime_error("noMDFeedTypesLength outside of allowed range [E110]"); + } + length += noMDFeedTypesLength *NoMDFeedTypes::sbeBlockLength(); + + length += NoInstAttrib::sbeHeaderSize(); + if (noInstAttribLength > 254LL) + { + throw std::runtime_error("noInstAttribLength outside of allowed range [E110]"); + } + length += noInstAttribLength *NoInstAttrib::sbeBlockLength(); + + length += NoLotTypeRules::sbeHeaderSize(); + if (noLotTypeRulesLength > 254LL) + { + throw std::runtime_error("noLotTypeRulesLength outside of allowed range [E110]"); + } + length += noLotTypeRulesLength *NoLotTypeRules::sbeBlockLength(); + + length += NoLegs::sbeHeaderSize(); + if (noLegsLength > 254LL) + { + throw std::runtime_error("noLegsLength outside of allowed range [E110]"); + } + length += noLegsLength *NoLegs::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionSpread56.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionSpread56.h index ec6295b72..b6f679c67 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionSpread56.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDInstrumentDefinitionSpread56.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,6079 +86,6645 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class MDInstrumentDefinitionSpread56 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class MDInstrumentDefinitionSpread56 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(195); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(56); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - MDInstrumentDefinitionSpread56() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MDInstrumentDefinitionSpread56( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - MDInstrumentDefinitionSpread56( - char *buffer, const std::uint64_t bufferLength) - : MDInstrumentDefinitionSpread56( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + MDInstrumentDefinitionSpread56() = default; - MDInstrumentDefinitionSpread56( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : MDInstrumentDefinitionSpread56( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + MDInstrumentDefinitionSpread56( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)195; - } + MDInstrumentDefinitionSpread56(char *buffer, const std::uint64_t bufferLength) : + MDInstrumentDefinitionSpread56(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)56; - } + MDInstrumentDefinitionSpread56( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + MDInstrumentDefinitionSpread56(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(195); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "d"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(56); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - MDInstrumentDefinitionSpread56 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = MDInstrumentDefinitionSpread56( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MDInstrumentDefinitionSpread56 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "d"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = MDInstrumentDefinitionSpread56( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + MDInstrumentDefinitionSpread56 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = MDInstrumentDefinitionSpread56(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - MDInstrumentDefinitionSpread56 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MDInstrumentDefinitionSpread56( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + MDInstrumentDefinitionSpread56 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = MDInstrumentDefinitionSpread56( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + MDInstrumentDefinitionSpread56 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MDInstrumentDefinitionSpread56(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + MDInstrumentDefinitionSpread56 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD static const char * - TotNumReportsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TotNumReportsMetaAttribute(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 totNumReportsId() SBE_NOEXCEPT { - return 911; - } + static SBE_CONSTEXPR std::uint16_t totNumReportsId() SBE_NOEXCEPT + { + return 911; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - totNumReportsSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNumReportsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= totNumReportsSinceVersion(); + return m_actingVersion >= totNumReportsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - totNumReportsEncodingOffset() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNumReportsEncodingOffset() SBE_NOEXCEPT + { + return 1; + } - static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT { - return 4294967295; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT + { + return UINT32_C(0xffffffff); + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionSpread56 & - totNumReports(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionSpread56 &totNumReports(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityUpdateActionMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityUpdateActionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityUpdateActionId() SBE_NOEXCEPT { - return 980; - } + static SBE_CONSTEXPR std::uint16_t securityUpdateActionId() SBE_NOEXCEPT + { + return 980; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityUpdateActionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityUpdateActionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityUpdateActionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityUpdateActionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityUpdateActionSinceVersion(); + return m_actingVersion >= securityUpdateActionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityUpdateActionEncodingOffset() SBE_NOEXCEPT { - return 5; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityUpdateActionEncodingOffset() SBE_NOEXCEPT + { + return 5; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityUpdateActionEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityUpdateActionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD SecurityUpdateAction::Value - securityUpdateAction() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 5, sizeof(char)); - return SecurityUpdateAction::get((val)); - } + SBE_NODISCARD SecurityUpdateAction::Value securityUpdateAction() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 5, sizeof(char)); + return SecurityUpdateAction::get((val)); + } - MDInstrumentDefinitionSpread56 & - securityUpdateAction(const SecurityUpdateAction::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 5, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionSpread56 &securityUpdateAction(const SecurityUpdateAction::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 5, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char * - LastUpdateTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *LastUpdateTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t lastUpdateTimeId() SBE_NOEXCEPT { - return 779; - } + static SBE_CONSTEXPR std::uint16_t lastUpdateTimeId() SBE_NOEXCEPT + { + return 779; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lastUpdateTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastUpdateTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool lastUpdateTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool lastUpdateTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lastUpdateTimeSinceVersion(); + return m_actingVersion >= lastUpdateTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lastUpdateTimeEncodingOffset() SBE_NOEXCEPT { - return 6; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastUpdateTimeEncodingOffset() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t - lastUpdateTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t lastUpdateTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t lastUpdateTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 6, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t lastUpdateTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 6, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - MDInstrumentDefinitionSpread56 & - lastUpdateTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 6, &val, sizeof(std::uint64_t)); - return *this; - } + MDInstrumentDefinitionSpread56 &lastUpdateTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 6, &val, sizeof(std::uint64_t)); + return *this; + } - SBE_NODISCARD static const char *MDSecurityTradingStatusMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MDSecurityTradingStatusMetaAttribute(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 mDSecurityTradingStatusId() SBE_NOEXCEPT { - return 1682; - } + static SBE_CONSTEXPR std::uint16_t mDSecurityTradingStatusId() SBE_NOEXCEPT + { + return 1682; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDSecurityTradingStatusSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDSecurityTradingStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool mDSecurityTradingStatusInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool mDSecurityTradingStatusInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDSecurityTradingStatusSinceVersion(); + return m_actingVersion >= mDSecurityTradingStatusSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDSecurityTradingStatusEncodingOffset() SBE_NOEXCEPT { - return 14; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDSecurityTradingStatusEncodingOffset() SBE_NOEXCEPT + { + return 14; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDSecurityTradingStatusEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDSecurityTradingStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD SecurityTradingStatus::Value - mDSecurityTradingStatus() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); - return SecurityTradingStatus::get((val)); - } + SBE_NODISCARD SecurityTradingStatus::Value mDSecurityTradingStatus() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 14, sizeof(std::uint8_t)); + return SecurityTradingStatus::get((val)); + } - MDInstrumentDefinitionSpread56 &mDSecurityTradingStatus( - const SecurityTradingStatus::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionSpread56 &mDSecurityTradingStatus(const SecurityTradingStatus::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 14, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - ApplIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *ApplIDMetaAttribute(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 applIDId() SBE_NOEXCEPT { return 1180; } + static SBE_CONSTEXPR std::uint16_t applIDId() SBE_NOEXCEPT + { + return 1180; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - applIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t applIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool applIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool applIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= applIDSinceVersion(); + return m_actingVersion >= applIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - applIDEncodingOffset() SBE_NOEXCEPT { - return 15; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t applIDEncodingOffset() SBE_NOEXCEPT + { + return 15; + } - static SBE_CONSTEXPR std::int16_t applIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT16; - } + static SBE_CONSTEXPR std::int16_t applIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT16; + } - static SBE_CONSTEXPR std::int16_t applIDMinValue() SBE_NOEXCEPT { - return (std::int16_t)-32767; - } + static SBE_CONSTEXPR std::int16_t applIDMinValue() SBE_NOEXCEPT + { + return static_cast(-32767); + } - static SBE_CONSTEXPR std::int16_t applIDMaxValue() SBE_NOEXCEPT { - return (std::int16_t)32767; - } + static SBE_CONSTEXPR std::int16_t applIDMaxValue() SBE_NOEXCEPT + { + return static_cast(32767); + } - static SBE_CONSTEXPR std::size_t applIDEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t applIDEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::int16_t applID() const SBE_NOEXCEPT { - std::int16_t val; - std::memcpy(&val, m_buffer + m_offset + 15, sizeof(std::int16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::int16_t applID() const SBE_NOEXCEPT + { + std::int16_t val; + std::memcpy(&val, m_buffer + m_offset + 15, sizeof(std::int16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MDInstrumentDefinitionSpread56 & - applID(const std::int16_t value) SBE_NOEXCEPT { - std::int16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 15, &val, sizeof(std::int16_t)); - return *this; - } + MDInstrumentDefinitionSpread56 &applID(const std::int16_t value) SBE_NOEXCEPT + { + std::int16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 15, &val, sizeof(std::int16_t)); + return *this; + } - SBE_NODISCARD static const char *MarketSegmentIDMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MarketSegmentIDMetaAttribute(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 marketSegmentIDId() SBE_NOEXCEPT { - return 1300; - } + static SBE_CONSTEXPR std::uint16_t marketSegmentIDId() SBE_NOEXCEPT + { + return 1300; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - marketSegmentIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketSegmentIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool marketSegmentIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= marketSegmentIDSinceVersion(); + return m_actingVersion >= marketSegmentIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - marketSegmentIDEncodingOffset() SBE_NOEXCEPT { - return 17; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingOffset() SBE_NOEXCEPT + { + return 17; + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT8; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT8; + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t marketSegmentIDMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - marketSegmentIDEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t marketSegmentIDEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t marketSegmentID() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionSpread56 & - marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionSpread56 &marketSegmentID(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *UnderlyingProductMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UnderlyingProductMetaAttribute(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 underlyingProductId() SBE_NOEXCEPT { - return 462; - } + static SBE_CONSTEXPR std::uint16_t underlyingProductId() SBE_NOEXCEPT + { + return 462; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - underlyingProductSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t underlyingProductSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool underlyingProductInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool underlyingProductInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= underlyingProductSinceVersion(); + return m_actingVersion >= underlyingProductSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - underlyingProductEncodingOffset() SBE_NOEXCEPT { - return 18; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t underlyingProductEncodingOffset() SBE_NOEXCEPT + { + return 18; + } - static SBE_CONSTEXPR std::uint8_t underlyingProductNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t underlyingProductMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t underlyingProductMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t underlyingProductMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - underlyingProductEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t underlyingProductEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t underlyingProduct() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t underlyingProduct() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 18, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionSpread56 & - underlyingProduct(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionSpread56 &underlyingProduct(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 18, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityExchangeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Exchange"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityExchangeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Exchange"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityExchangeId() SBE_NOEXCEPT { - return 207; - } + static SBE_CONSTEXPR std::uint16_t securityExchangeId() SBE_NOEXCEPT + { + return 207; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityExchangeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityExchangeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityExchangeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityExchangeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityExchangeSinceVersion(); + return m_actingVersion >= securityExchangeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityExchangeEncodingOffset() SBE_NOEXCEPT { - return 19; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityExchangeEncodingOffset() SBE_NOEXCEPT + { + return 19; + } - static SBE_CONSTEXPR char securityExchangeNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityExchangeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityExchangeMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityExchangeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityExchangeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityExchangeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - securityExchangeEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t securityExchangeEncodingLength() SBE_NOEXCEPT + { + return 4; + } - static SBE_CONSTEXPR std::uint64_t securityExchangeLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::uint64_t securityExchangeLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD const char *securityExchange() const SBE_NOEXCEPT { - return m_buffer + m_offset + 19; - } + SBE_NODISCARD const char *securityExchange() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 19; + } - SBE_NODISCARD char *securityExchange() SBE_NOEXCEPT { - return m_buffer + m_offset + 19; - } + SBE_NODISCARD char *securityExchange() SBE_NOEXCEPT + { + return m_buffer + m_offset + 19; + } - SBE_NODISCARD char securityExchange(const std::uint64_t index) const { - if (index >= 4) { - throw std::runtime_error( - "index out of range for securityExchange [E104]"); - } + SBE_NODISCARD char securityExchange(const std::uint64_t index) const + { + if (index >= 4) + { + throw std::runtime_error("index out of range for securityExchange [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 19 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 19 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread56 & - securityExchange(const std::uint64_t index, const char value) { - if (index >= 4) { - throw std::runtime_error( - "index out of range for securityExchange [E105]"); - } + MDInstrumentDefinitionSpread56 &securityExchange(const std::uint64_t index, const char value) + { + if (index >= 4) + { + throw std::runtime_error("index out of range for securityExchange [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 19 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 19 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityExchange(char *const dst, const std::uint64_t length) const { - if (length > 4) { - throw std::runtime_error( - "length too large for getSecurityExchange [E106]"); - } + std::uint64_t getSecurityExchange(char *const dst, const std::uint64_t length) const + { + if (length > 4) + { + throw std::runtime_error("length too large for getSecurityExchange [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 19, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 19, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread56 & - putSecurityExchange(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 19, src, sizeof(char) * 4); - return *this; - } + MDInstrumentDefinitionSpread56 &putSecurityExchange(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 19, src, sizeof(char) * 4); + return *this; + } - MDInstrumentDefinitionSpread56 &putSecurityExchange( - const char value0, - const char value1, - const char value2, - const char value3) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 19, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 20, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 21, &val2, sizeof(char)); - char val3 = (value3); - std::memcpy(m_buffer + m_offset + 22, &val3, sizeof(char)); + MDInstrumentDefinitionSpread56 &putSecurityExchange( + const char value0, + const char value1, + const char value2, + const char value3) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 19, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 20, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 21, &val2, sizeof(char)); + char val3 = (value3); + std::memcpy(m_buffer + m_offset + 22, &val3, sizeof(char)); - return *this; - } + return *this; + } - std::string getSecurityExchangeAsString() const { - const char *buffer = m_buffer + m_offset + 19; - size_t length = 0; + SBE_NODISCARD std::string getSecurityExchangeAsString() const + { + const char *buffer = m_buffer + m_offset + 19; + size_t length = 0; - for (; length < 4 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 4 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityExchangeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityExchangeAsString(); + std::string getSecurityExchangeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityExchangeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityExchangeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 19; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityExchangeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 19; + size_t length = 0; - for (; length < 4 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 4 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread56 & - putSecurityExchange(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 4) { - throw std::runtime_error( - "string too large for putSecurityExchange [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread56 &putSecurityExchange(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 4) + { + throw std::runtime_error("string too large for putSecurityExchange [E106]"); + } - std::memcpy(m_buffer + m_offset + 19, str.data(), srcLength); - for (size_t start = srcLength; start < 4; ++start) { - m_buffer[m_offset + 19 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 19, str.data(), srcLength); + for (size_t start = srcLength; start < 4; ++start) + { + m_buffer[m_offset + 19 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread56 &putSecurityExchange(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 4) { - throw std::runtime_error( - "string too large for putSecurityExchange [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread56 &putSecurityExchange(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 4) + { + throw std::runtime_error("string too large for putSecurityExchange [E106]"); + } - std::memcpy(m_buffer + m_offset + 19, str.c_str(), srcLength); - for (size_t start = srcLength; start < 4; ++start) { - m_buffer[m_offset + 19 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 19, str.c_str(), srcLength); + for (size_t start = srcLength; start < 4; ++start) + { + m_buffer[m_offset + 19 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT { - return 1151; - } + static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT + { + return 1151; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityGroupSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityGroupSinceVersion(); + return m_actingVersion >= securityGroupSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityGroupEncodingOffset() SBE_NOEXCEPT { - return 23; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityGroupEncodingOffset() SBE_NOEXCEPT + { + return 23; + } - static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT { - return m_buffer + m_offset + 23; - } + SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 23; + } - SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT { - return m_buffer + m_offset + 23; - } + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 23; + } - SBE_NODISCARD char securityGroup(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error( - "index out of range for securityGroup [E104]"); - } + SBE_NODISCARD char securityGroup(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 23 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 23 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread56 & - securityGroup(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error( - "index out of range for securityGroup [E105]"); - } + MDInstrumentDefinitionSpread56 &securityGroup(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 23 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 23 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityGroup(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error( - "length too large for getSecurityGroup [E106]"); - } + std::uint64_t getSecurityGroup(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityGroup [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 23, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 23, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread56 & - putSecurityGroup(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 23, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionSpread56 &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 23, src, sizeof(char) * 6); + return *this; + } - std::string getSecurityGroupAsString() const { - const char *buffer = m_buffer + m_offset + 23; - size_t length = 0; + SBE_NODISCARD std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 23; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityGroupAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityGroupAsString(); + std::string getSecurityGroupAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityGroupAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 23; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 23; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread56 & - putSecurityGroup(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityGroup [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread56 &putSecurityGroup(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } - std::memcpy(m_buffer + m_offset + 23, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 23 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 23, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 23 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread56 &putSecurityGroup(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityGroup [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread56 &putSecurityGroup(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } - std::memcpy(m_buffer + m_offset + 23, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 23 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 23, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 23 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - AssetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *AssetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t assetId() SBE_NOEXCEPT { return 6937; } + static SBE_CONSTEXPR std::uint16_t assetId() SBE_NOEXCEPT + { + return 6937; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - assetSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t assetSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool assetInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool assetInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= assetSinceVersion(); + return m_actingVersion >= assetSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - assetEncodingOffset() SBE_NOEXCEPT { - return 29; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t assetEncodingOffset() SBE_NOEXCEPT + { + return 29; + } - static SBE_CONSTEXPR char assetNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char assetNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char assetMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char assetMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char assetMaxValue() SBE_NOEXCEPT { return (char)126; } + static SBE_CONSTEXPR char assetMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t assetEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t assetEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t assetLength() SBE_NOEXCEPT { return 6; } + static SBE_CONSTEXPR std::uint64_t assetLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *asset() const SBE_NOEXCEPT { - return m_buffer + m_offset + 29; - } + SBE_NODISCARD const char *asset() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 29; + } - SBE_NODISCARD char *asset() SBE_NOEXCEPT { return m_buffer + m_offset + 29; } + SBE_NODISCARD char *asset() SBE_NOEXCEPT + { + return m_buffer + m_offset + 29; + } - SBE_NODISCARD char asset(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for asset [E104]"); - } + SBE_NODISCARD char asset(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for asset [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 29 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 29 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread56 & - asset(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for asset [E105]"); - } + MDInstrumentDefinitionSpread56 &asset(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for asset [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 29 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 29 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getAsset(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error("length too large for getAsset [E106]"); - } + std::uint64_t getAsset(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getAsset [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 29, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 29, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread56 & - putAsset(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 29, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionSpread56 &putAsset(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 29, src, sizeof(char) * 6); + return *this; + } - std::string getAssetAsString() const { - const char *buffer = m_buffer + m_offset + 29; - size_t length = 0; + SBE_NODISCARD std::string getAssetAsString() const + { + const char *buffer = m_buffer + m_offset + 29; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getAssetAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getAssetAsString(); + std::string getAssetAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getAssetAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getAssetAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 29; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getAssetAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 29; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread56 &putAsset(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putAsset [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread56 &putAsset(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putAsset [E106]"); + } - std::memcpy(m_buffer + m_offset + 29, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 29 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 29, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 29 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread56 &putAsset(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putAsset [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread56 &putAsset(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putAsset [E106]"); + } - std::memcpy(m_buffer + m_offset + 29, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 29 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 29, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 29 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t symbolId() SBE_NOEXCEPT { return 55; } + static SBE_CONSTEXPR std::uint16_t symbolId() SBE_NOEXCEPT + { + return 55; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - symbolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t symbolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool symbolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool symbolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= symbolSinceVersion(); + return m_actingVersion >= symbolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - symbolEncodingOffset() SBE_NOEXCEPT { - return 35; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t symbolEncodingOffset() SBE_NOEXCEPT + { + return 35; + } - static SBE_CONSTEXPR char symbolNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char symbolNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char symbolMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char symbolMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char symbolMaxValue() SBE_NOEXCEPT { return (char)126; } + static SBE_CONSTEXPR char symbolMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t symbolEncodingLength() SBE_NOEXCEPT { - return 20; - } + static SBE_CONSTEXPR std::size_t symbolEncodingLength() SBE_NOEXCEPT + { + return 20; + } - static SBE_CONSTEXPR std::uint64_t symbolLength() SBE_NOEXCEPT { return 20; } + static SBE_CONSTEXPR std::uint64_t symbolLength() SBE_NOEXCEPT + { + return 20; + } - SBE_NODISCARD const char *symbol() const SBE_NOEXCEPT { - return m_buffer + m_offset + 35; - } + SBE_NODISCARD const char *symbol() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 35; + } - SBE_NODISCARD char *symbol() SBE_NOEXCEPT { - return m_buffer + m_offset + 35; - } + SBE_NODISCARD char *symbol() SBE_NOEXCEPT + { + return m_buffer + m_offset + 35; + } - SBE_NODISCARD char symbol(const std::uint64_t index) const { - if (index >= 20) { - throw std::runtime_error("index out of range for symbol [E104]"); - } + SBE_NODISCARD char symbol(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 35 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 35 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread56 & - symbol(const std::uint64_t index, const char value) { - if (index >= 20) { - throw std::runtime_error("index out of range for symbol [E105]"); - } + MDInstrumentDefinitionSpread56 &symbol(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 35 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 35 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getSymbol(char *const dst, const std::uint64_t length) const { - if (length > 20) { - throw std::runtime_error("length too large for getSymbol [E106]"); - } + std::uint64_t getSymbol(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSymbol [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 35, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 35, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread56 & - putSymbol(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 35, src, sizeof(char) * 20); - return *this; - } + MDInstrumentDefinitionSpread56 &putSymbol(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 35, src, sizeof(char) * 20); + return *this; + } - std::string getSymbolAsString() const { - const char *buffer = m_buffer + m_offset + 35; - size_t length = 0; + SBE_NODISCARD std::string getSymbolAsString() const + { + const char *buffer = m_buffer + m_offset + 35; + size_t length = 0; - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSymbolAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSymbolAsString(); + std::string getSymbolAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSymbolAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSymbolAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 35; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSymbolAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 35; + size_t length = 0; - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread56 &putSymbol(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error("string too large for putSymbol [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread56 &putSymbol(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } - std::memcpy(m_buffer + m_offset + 35, str.data(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 35 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 35, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 35 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread56 &putSymbol(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error("string too large for putSymbol [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread56 &putSymbol(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } - std::memcpy(m_buffer + m_offset + 35, str.c_str(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 35 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 35, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 35 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { return 48; } + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityIDSinceVersion(); + return m_actingVersion >= securityIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 55; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 55; + } - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 55, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 55, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionSpread56 & - securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 55, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionSpread56 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 55, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityIDSourceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityIDSourceId() SBE_NOEXCEPT { - return 22; - } + static SBE_CONSTEXPR std::uint16_t securityIDSourceId() SBE_NOEXCEPT + { + return 22; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSourceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityIDSourceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityIDSourceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityIDSourceSinceVersion(); + return m_actingVersion >= securityIDSourceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDSourceEncodingOffset() SBE_NOEXCEPT { - return 59; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 59; + } - static SBE_CONSTEXPR char securityIDSourceNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityIDSourceNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityIDSourceMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityIDSourceMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityIDSourceMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityIDSourceMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - securityIDSourceEncodingLength() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::size_t securityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t securityIDSourceLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::uint64_t securityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD const char *securityIDSource() const { - static const std::uint8_t securityIDSourceValues[] = {56}; + SBE_NODISCARD const char *securityIDSource() const + { + static const std::uint8_t securityIDSourceValues[] = { 56 }; - return (const char *)securityIDSourceValues; - } + return (const char *)securityIDSourceValues; + } - SBE_NODISCARD char securityIDSource(const std::uint64_t index) const { - static const std::uint8_t securityIDSourceValues[] = {56}; + SBE_NODISCARD char securityIDSource(const std::uint64_t index) const + { + static const std::uint8_t securityIDSourceValues[] = { 56 }; - return (char)securityIDSourceValues[index]; - } + return (char)securityIDSourceValues[index]; + } - std::uint64_t - getSecurityIDSource(char *dst, const std::uint64_t length) const { - static std::uint8_t securityIDSourceValues[] = {56}; - std::uint64_t bytesToCopy = length < sizeof(securityIDSourceValues) - ? length - : sizeof(securityIDSourceValues); + std::uint64_t getSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t securityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(securityIDSourceValues) ? length : sizeof(securityIDSourceValues); - std::memcpy( - dst, securityIDSourceValues, static_cast(bytesToCopy)); - return bytesToCopy; - } + std::memcpy(dst, securityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } - std::string getSecurityIDSourceAsString() const { - static const std::uint8_t SecurityIDSourceValues[] = {56}; + std::string getSecurityIDSourceAsString() const + { + static const std::uint8_t SecurityIDSourceValues[] = { 56 }; - return std::string((const char *)SecurityIDSourceValues, 1); - } + return std::string((const char *)SecurityIDSourceValues, 1); + } - std::string getSecurityIDSourceAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityIDSourceAsString(); + std::string getSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityIDSourceAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } - SBE_NODISCARD static const char * - SecurityTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityTypeId() SBE_NOEXCEPT { - return 167; - } + static SBE_CONSTEXPR std::uint16_t securityTypeId() SBE_NOEXCEPT + { + return 167; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityTypeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityTypeSinceVersion(); + return m_actingVersion >= securityTypeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityTypeEncodingOffset() SBE_NOEXCEPT { - return 59; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityTypeEncodingOffset() SBE_NOEXCEPT + { + return 59; + } - static SBE_CONSTEXPR char securityTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t securityTypeEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t securityTypeEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t securityTypeLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::uint64_t securityTypeLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *securityType() const SBE_NOEXCEPT { - return m_buffer + m_offset + 59; - } + SBE_NODISCARD const char *securityType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 59; + } - SBE_NODISCARD char *securityType() SBE_NOEXCEPT { - return m_buffer + m_offset + 59; - } + SBE_NODISCARD char *securityType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 59; + } - SBE_NODISCARD char securityType(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for securityType [E104]"); - } + SBE_NODISCARD char securityType(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityType [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 59 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 59 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread56 & - securityType(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for securityType [E105]"); - } + MDInstrumentDefinitionSpread56 &securityType(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityType [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 59 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 59 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityType(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error( - "length too large for getSecurityType [E106]"); - } + std::uint64_t getSecurityType(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityType [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 59, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 59, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread56 & - putSecurityType(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 59, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionSpread56 &putSecurityType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 59, src, sizeof(char) * 6); + return *this; + } - std::string getSecurityTypeAsString() const { - const char *buffer = m_buffer + m_offset + 59; - size_t length = 0; + SBE_NODISCARD std::string getSecurityTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 59; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityTypeAsString(); + std::string getSecurityTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityTypeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityTypeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 59; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 59; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread56 &putSecurityType(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityType [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread56 &putSecurityType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityType [E106]"); + } - std::memcpy(m_buffer + m_offset + 59, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 59 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 59, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 59 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread56 &putSecurityType(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityType [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread56 &putSecurityType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityType [E106]"); + } - std::memcpy(m_buffer + m_offset + 59, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 59 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 59, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 59 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - CFICodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *CFICodeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t cFICodeId() SBE_NOEXCEPT { return 461; } + static SBE_CONSTEXPR std::uint16_t cFICodeId() SBE_NOEXCEPT + { + return 461; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - cFICodeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t cFICodeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool cFICodeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool cFICodeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= cFICodeSinceVersion(); + return m_actingVersion >= cFICodeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - cFICodeEncodingOffset() SBE_NOEXCEPT { - return 65; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t cFICodeEncodingOffset() SBE_NOEXCEPT + { + return 65; + } - static SBE_CONSTEXPR char cFICodeNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char cFICodeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char cFICodeMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char cFICodeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char cFICodeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char cFICodeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t cFICodeEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t cFICodeEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t cFICodeLength() SBE_NOEXCEPT { return 6; } + static SBE_CONSTEXPR std::uint64_t cFICodeLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *cFICode() const SBE_NOEXCEPT { - return m_buffer + m_offset + 65; - } + SBE_NODISCARD const char *cFICode() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 65; + } - SBE_NODISCARD char *cFICode() SBE_NOEXCEPT { - return m_buffer + m_offset + 65; - } + SBE_NODISCARD char *cFICode() SBE_NOEXCEPT + { + return m_buffer + m_offset + 65; + } - SBE_NODISCARD char cFICode(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for cFICode [E104]"); - } + SBE_NODISCARD char cFICode(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cFICode [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 65 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 65 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread56 & - cFICode(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for cFICode [E105]"); - } + MDInstrumentDefinitionSpread56 &cFICode(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for cFICode [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 65 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 65 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getCFICode(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error("length too large for getCFICode [E106]"); - } + std::uint64_t getCFICode(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getCFICode [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 65, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 65, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread56 & - putCFICode(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 65, src, sizeof(char) * 6); - return *this; - } + MDInstrumentDefinitionSpread56 &putCFICode(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 65, src, sizeof(char) * 6); + return *this; + } - std::string getCFICodeAsString() const { - const char *buffer = m_buffer + m_offset + 65; - size_t length = 0; + SBE_NODISCARD std::string getCFICodeAsString() const + { + const char *buffer = m_buffer + m_offset + 65; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getCFICodeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getCFICodeAsString(); + std::string getCFICodeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCFICodeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getCFICodeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 65; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCFICodeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 65; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread56 &putCFICode(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putCFICode [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread56 &putCFICode(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCFICode [E106]"); + } - std::memcpy(m_buffer + m_offset + 65, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 65 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 65, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 65 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread56 &putCFICode(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putCFICode [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread56 &putCFICode(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putCFICode [E106]"); + } - std::memcpy(m_buffer + m_offset + 65, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 65 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 65, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 65 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char *MaturityMonthYearMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MonthYear"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaturityMonthYearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MonthYear"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t maturityMonthYearId() SBE_NOEXCEPT { - return 200; - } + static SBE_CONSTEXPR std::uint16_t maturityMonthYearId() SBE_NOEXCEPT + { + return 200; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maturityMonthYearSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maturityMonthYearSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool maturityMonthYearInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maturityMonthYearInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maturityMonthYearSinceVersion(); + return m_actingVersion >= maturityMonthYearSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maturityMonthYearEncodingOffset() SBE_NOEXCEPT { - return 71; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maturityMonthYearEncodingOffset() SBE_NOEXCEPT + { + return 71; + } - private: - MaturityMonthYear m_maturityMonthYear; +private: + MaturityMonthYear m_maturityMonthYear; - public: - SBE_NODISCARD MaturityMonthYear &maturityMonthYear() { - m_maturityMonthYear.wrap( - m_buffer, m_offset + 71, m_actingVersion, m_bufferLength); - return m_maturityMonthYear; - } +public: + SBE_NODISCARD MaturityMonthYear &maturityMonthYear() + { + m_maturityMonthYear.wrap(m_buffer, m_offset + 71, m_actingVersion, m_bufferLength); + return m_maturityMonthYear; + } - SBE_NODISCARD static const char * - CurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Currency"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *CurrencyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Currency"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t currencyId() SBE_NOEXCEPT { return 15; } + static SBE_CONSTEXPR std::uint16_t currencyId() SBE_NOEXCEPT + { + return 15; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - currencySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t currencySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool currencyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool currencyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= currencySinceVersion(); + return m_actingVersion >= currencySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - currencyEncodingOffset() SBE_NOEXCEPT { - return 76; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t currencyEncodingOffset() SBE_NOEXCEPT + { + return 76; + } - static SBE_CONSTEXPR char currencyNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char currencyNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char currencyMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char currencyMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char currencyMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char currencyMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t currencyEncodingLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::size_t currencyEncodingLength() SBE_NOEXCEPT + { + return 3; + } - static SBE_CONSTEXPR std::uint64_t currencyLength() SBE_NOEXCEPT { - return 3; - } + static SBE_CONSTEXPR std::uint64_t currencyLength() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD const char *currency() const SBE_NOEXCEPT { - return m_buffer + m_offset + 76; - } + SBE_NODISCARD const char *currency() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 76; + } - SBE_NODISCARD char *currency() SBE_NOEXCEPT { - return m_buffer + m_offset + 76; - } + SBE_NODISCARD char *currency() SBE_NOEXCEPT + { + return m_buffer + m_offset + 76; + } - SBE_NODISCARD char currency(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error("index out of range for currency [E104]"); - } + SBE_NODISCARD char currency(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for currency [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 76 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 76 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread56 & - currency(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error("index out of range for currency [E105]"); - } + MDInstrumentDefinitionSpread56 ¤cy(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for currency [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 76 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 76 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getCurrency(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error("length too large for getCurrency [E106]"); - } + std::uint64_t getCurrency(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getCurrency [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 76, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 76, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread56 & - putCurrency(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 76, src, sizeof(char) * 3); - return *this; - } + MDInstrumentDefinitionSpread56 &putCurrency(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 76, src, sizeof(char) * 3); + return *this; + } - MDInstrumentDefinitionSpread56 &putCurrency( - const char value0, const char value1, const char value2) SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 76, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 77, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 78, &val2, sizeof(char)); + MDInstrumentDefinitionSpread56 &putCurrency( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 76, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 77, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 78, &val2, sizeof(char)); - return *this; - } + return *this; + } - std::string getCurrencyAsString() const { - const char *buffer = m_buffer + m_offset + 76; - size_t length = 0; + SBE_NODISCARD std::string getCurrencyAsString() const + { + const char *buffer = m_buffer + m_offset + 76; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getCurrencyAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getCurrencyAsString(); + std::string getCurrencyAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getCurrencyAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getCurrencyAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 76; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getCurrencyAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 76; + size_t length = 0; - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread56 &putCurrency(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error("string too large for putCurrency [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread56 &putCurrency(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 76, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 76 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 76, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 76 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread56 &putCurrency(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error("string too large for putCurrency [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread56 &putCurrency(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putCurrency [E106]"); + } - std::memcpy(m_buffer + m_offset + 76, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 76 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 76, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 76 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char *SecuritySubTypeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecuritySubTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securitySubTypeId() SBE_NOEXCEPT { - return 762; - } + static SBE_CONSTEXPR std::uint16_t securitySubTypeId() SBE_NOEXCEPT + { + return 762; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securitySubTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securitySubTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securitySubTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securitySubTypeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securitySubTypeSinceVersion(); + return m_actingVersion >= securitySubTypeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securitySubTypeEncodingOffset() SBE_NOEXCEPT { - return 79; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securitySubTypeEncodingOffset() SBE_NOEXCEPT + { + return 79; + } - static SBE_CONSTEXPR char securitySubTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securitySubTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securitySubTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securitySubTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securitySubTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securitySubTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - securitySubTypeEncodingLength() SBE_NOEXCEPT { - return 5; - } + static SBE_CONSTEXPR std::size_t securitySubTypeEncodingLength() SBE_NOEXCEPT + { + return 5; + } - static SBE_CONSTEXPR std::uint64_t securitySubTypeLength() SBE_NOEXCEPT { - return 5; - } + static SBE_CONSTEXPR std::uint64_t securitySubTypeLength() SBE_NOEXCEPT + { + return 5; + } - SBE_NODISCARD const char *securitySubType() const SBE_NOEXCEPT { - return m_buffer + m_offset + 79; - } + SBE_NODISCARD const char *securitySubType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 79; + } - SBE_NODISCARD char *securitySubType() SBE_NOEXCEPT { - return m_buffer + m_offset + 79; - } + SBE_NODISCARD char *securitySubType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 79; + } - SBE_NODISCARD char securitySubType(const std::uint64_t index) const { - if (index >= 5) { - throw std::runtime_error( - "index out of range for securitySubType [E104]"); - } + SBE_NODISCARD char securitySubType(const std::uint64_t index) const + { + if (index >= 5) + { + throw std::runtime_error("index out of range for securitySubType [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 79 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 79 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread56 & - securitySubType(const std::uint64_t index, const char value) { - if (index >= 5) { - throw std::runtime_error( - "index out of range for securitySubType [E105]"); - } + MDInstrumentDefinitionSpread56 &securitySubType(const std::uint64_t index, const char value) + { + if (index >= 5) + { + throw std::runtime_error("index out of range for securitySubType [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 79 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 79 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecuritySubType(char *const dst, const std::uint64_t length) const { - if (length > 5) { - throw std::runtime_error( - "length too large for getSecuritySubType [E106]"); - } + std::uint64_t getSecuritySubType(char *const dst, const std::uint64_t length) const + { + if (length > 5) + { + throw std::runtime_error("length too large for getSecuritySubType [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 79, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 79, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread56 & - putSecuritySubType(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 79, src, sizeof(char) * 5); - return *this; - } + MDInstrumentDefinitionSpread56 &putSecuritySubType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 79, src, sizeof(char) * 5); + return *this; + } - std::string getSecuritySubTypeAsString() const { - const char *buffer = m_buffer + m_offset + 79; - size_t length = 0; + SBE_NODISCARD std::string getSecuritySubTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 79; + size_t length = 0; - for (; length < 5 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecuritySubTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecuritySubTypeAsString(); + std::string getSecuritySubTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecuritySubTypeAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecuritySubTypeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 79; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecuritySubTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 79; + size_t length = 0; - for (; length < 5 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 5 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread56 & - putSecuritySubType(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 5) { - throw std::runtime_error( - "string too large for putSecuritySubType [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread56 &putSecuritySubType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putSecuritySubType [E106]"); + } - std::memcpy(m_buffer + m_offset + 79, str.data(), srcLength); - for (size_t start = srcLength; start < 5; ++start) { - m_buffer[m_offset + 79 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 79, str.data(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 79 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread56 &putSecuritySubType(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 5) { - throw std::runtime_error( - "string too large for putSecuritySubType [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread56 &putSecuritySubType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 5) + { + throw std::runtime_error("string too large for putSecuritySubType [E106]"); + } - std::memcpy(m_buffer + m_offset + 79, str.c_str(), srcLength); - for (size_t start = srcLength; start < 5; ++start) { - m_buffer[m_offset + 79 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 79, str.c_str(), srcLength); + for (size_t start = srcLength; start < 5; ++start) + { + m_buffer[m_offset + 79 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char *UserDefinedInstrumentMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UserDefinedInstrumentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t userDefinedInstrumentId() SBE_NOEXCEPT { - return 9779; - } + static SBE_CONSTEXPR std::uint16_t userDefinedInstrumentId() SBE_NOEXCEPT + { + return 9779; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - userDefinedInstrumentSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t userDefinedInstrumentSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool userDefinedInstrumentInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool userDefinedInstrumentInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= userDefinedInstrumentSinceVersion(); + return m_actingVersion >= userDefinedInstrumentSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - userDefinedInstrumentEncodingOffset() SBE_NOEXCEPT { - return 84; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t userDefinedInstrumentEncodingOffset() SBE_NOEXCEPT + { + return 84; + } - static SBE_CONSTEXPR char userDefinedInstrumentNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char userDefinedInstrumentNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char userDefinedInstrumentMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char userDefinedInstrumentMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char userDefinedInstrumentMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char userDefinedInstrumentMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - userDefinedInstrumentEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t userDefinedInstrumentEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD char userDefinedInstrument() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 84, sizeof(char)); - return (val); - } + SBE_NODISCARD char userDefinedInstrument() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 84, sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread56 & - userDefinedInstrument(const char value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 84, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionSpread56 &userDefinedInstrument(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 84, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char * - MatchAlgorithmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchAlgorithmMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchAlgorithmId() SBE_NOEXCEPT { - return 1142; - } + static SBE_CONSTEXPR std::uint16_t matchAlgorithmId() SBE_NOEXCEPT + { + return 1142; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchAlgorithmSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchAlgorithmSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchAlgorithmInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchAlgorithmInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchAlgorithmSinceVersion(); + return m_actingVersion >= matchAlgorithmSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchAlgorithmEncodingOffset() SBE_NOEXCEPT { - return 85; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchAlgorithmEncodingOffset() SBE_NOEXCEPT + { + return 85; + } - static SBE_CONSTEXPR char matchAlgorithmNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char matchAlgorithmNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char matchAlgorithmMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char matchAlgorithmMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char matchAlgorithmMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char matchAlgorithmMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t - matchAlgorithmEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchAlgorithmEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD char matchAlgorithm() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 85, sizeof(char)); - return (val); - } + SBE_NODISCARD char matchAlgorithm() const SBE_NOEXCEPT + { + char val; + std::memcpy(&val, m_buffer + m_offset + 85, sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread56 & - matchAlgorithm(const char value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 85, &val, sizeof(char)); - return *this; - } + MDInstrumentDefinitionSpread56 &matchAlgorithm(const char value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 85, &val, sizeof(char)); + return *this; + } - SBE_NODISCARD static const char * - MinTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t minTradeVolId() SBE_NOEXCEPT { - return 562; - } + static SBE_CONSTEXPR std::uint16_t minTradeVolId() SBE_NOEXCEPT + { + return 562; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minTradeVolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minTradeVolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool minTradeVolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minTradeVolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minTradeVolSinceVersion(); + return m_actingVersion >= minTradeVolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minTradeVolEncodingOffset() SBE_NOEXCEPT { - return 86; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minTradeVolEncodingOffset() SBE_NOEXCEPT + { + return 86; + } - static SBE_CONSTEXPR std::uint32_t minTradeVolNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t minTradeVolMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t minTradeVolMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t minTradeVolMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t minTradeVolEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t minTradeVolEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t minTradeVol() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 86, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t minTradeVol() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 86, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionSpread56 & - minTradeVol(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 86, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionSpread56 &minTradeVol(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 86, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - MaxTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaxTradeVolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t maxTradeVolId() SBE_NOEXCEPT { - return 1140; - } + static SBE_CONSTEXPR std::uint16_t maxTradeVolId() SBE_NOEXCEPT + { + return 1140; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maxTradeVolSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxTradeVolSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool maxTradeVolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maxTradeVolInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maxTradeVolSinceVersion(); + return m_actingVersion >= maxTradeVolSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maxTradeVolEncodingOffset() SBE_NOEXCEPT { - return 90; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxTradeVolEncodingOffset() SBE_NOEXCEPT + { + return 90; + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t maxTradeVolMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t maxTradeVolMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t maxTradeVolEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t maxTradeVolEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t maxTradeVol() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 90, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t maxTradeVol() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 90, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionSpread56 & - maxTradeVol(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 90, &val, sizeof(std::uint32_t)); - return *this; - } + MDInstrumentDefinitionSpread56 &maxTradeVol(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 90, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char *MinPriceIncrementMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MinPriceIncrementMetaAttribute(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 minPriceIncrementId() SBE_NOEXCEPT { - return 969; - } + static SBE_CONSTEXPR std::uint16_t minPriceIncrementId() SBE_NOEXCEPT + { + return 969; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minPriceIncrementSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minPriceIncrementSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool minPriceIncrementInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool minPriceIncrementInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= minPriceIncrementSinceVersion(); + return m_actingVersion >= minPriceIncrementSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minPriceIncrementEncodingOffset() SBE_NOEXCEPT { - return 94; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minPriceIncrementEncodingOffset() SBE_NOEXCEPT + { + return 94; + } - private: - PRICENULL9 m_minPriceIncrement; +private: + PRICENULL9 m_minPriceIncrement; - public: - SBE_NODISCARD PRICENULL9 &minPriceIncrement() { - m_minPriceIncrement.wrap( - m_buffer, m_offset + 94, m_actingVersion, m_bufferLength); - return m_minPriceIncrement; - } +public: + SBE_NODISCARD PRICENULL9 &minPriceIncrement() + { + m_minPriceIncrement.wrap(m_buffer, m_offset + 94, m_actingVersion, m_bufferLength); + return m_minPriceIncrement; + } - SBE_NODISCARD static const char * - DisplayFactorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "float"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *DisplayFactorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "float"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t displayFactorId() SBE_NOEXCEPT { - return 9787; - } + static SBE_CONSTEXPR std::uint16_t displayFactorId() SBE_NOEXCEPT + { + return 9787; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - displayFactorSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t displayFactorSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool displayFactorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool displayFactorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= displayFactorSinceVersion(); + return m_actingVersion >= displayFactorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - displayFactorEncodingOffset() SBE_NOEXCEPT { - return 102; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t displayFactorEncodingOffset() SBE_NOEXCEPT + { + return 102; + } - private: - Decimal9 m_displayFactor; +private: + Decimal9 m_displayFactor; - public: - SBE_NODISCARD Decimal9 &displayFactor() { - m_displayFactor.wrap( - m_buffer, m_offset + 102, m_actingVersion, m_bufferLength); - return m_displayFactor; - } +public: + SBE_NODISCARD Decimal9 &displayFactor() + { + m_displayFactor.wrap(m_buffer, m_offset + 102, m_actingVersion, m_bufferLength); + return m_displayFactor; + } - SBE_NODISCARD static const char *PriceDisplayFormatMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *PriceDisplayFormatMetaAttribute(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 priceDisplayFormatId() SBE_NOEXCEPT { - return 9800; - } + static SBE_CONSTEXPR std::uint16_t priceDisplayFormatId() SBE_NOEXCEPT + { + return 9800; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - priceDisplayFormatSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceDisplayFormatSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool priceDisplayFormatInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool priceDisplayFormatInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= priceDisplayFormatSinceVersion(); + return m_actingVersion >= priceDisplayFormatSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - priceDisplayFormatEncodingOffset() SBE_NOEXCEPT { - return 110; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceDisplayFormatEncodingOffset() SBE_NOEXCEPT + { + return 110; + } - static SBE_CONSTEXPR std::uint8_t - priceDisplayFormatNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t priceDisplayFormatMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t - priceDisplayFormatEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t priceDisplayFormatEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t priceDisplayFormat() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 110, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t priceDisplayFormat() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 110, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionSpread56 & - priceDisplayFormat(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 110, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionSpread56 &priceDisplayFormat(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 110, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - PriceRatioMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *PriceRatioMetaAttribute(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 priceRatioId() SBE_NOEXCEPT { - return 5770; - } + static SBE_CONSTEXPR std::uint16_t priceRatioId() SBE_NOEXCEPT + { + return 5770; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - priceRatioSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceRatioSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool priceRatioInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool priceRatioInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= priceRatioSinceVersion(); + return m_actingVersion >= priceRatioSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - priceRatioEncodingOffset() SBE_NOEXCEPT { - return 111; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceRatioEncodingOffset() SBE_NOEXCEPT + { + return 111; + } - private: - PRICENULL9 m_priceRatio; +private: + PRICENULL9 m_priceRatio; - public: - SBE_NODISCARD PRICENULL9 &priceRatio() { - m_priceRatio.wrap( - m_buffer, m_offset + 111, m_actingVersion, m_bufferLength); - return m_priceRatio; - } +public: + SBE_NODISCARD PRICENULL9 &priceRatio() + { + m_priceRatio.wrap(m_buffer, m_offset + 111, m_actingVersion, m_bufferLength); + return m_priceRatio; + } - SBE_NODISCARD static const char * - TickRuleMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TickRuleMetaAttribute(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 tickRuleId() SBE_NOEXCEPT { return 6350; } + static SBE_CONSTEXPR std::uint16_t tickRuleId() SBE_NOEXCEPT + { + return 6350; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tickRuleSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tickRuleSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool tickRuleInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tickRuleInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tickRuleSinceVersion(); + return m_actingVersion >= tickRuleSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tickRuleEncodingOffset() SBE_NOEXCEPT { - return 119; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tickRuleEncodingOffset() SBE_NOEXCEPT + { + return 119; + } - static SBE_CONSTEXPR std::int8_t tickRuleNullValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t tickRuleNullValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::int8_t tickRuleMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + static SBE_CONSTEXPR std::int8_t tickRuleMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - static SBE_CONSTEXPR std::int8_t tickRuleMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t tickRuleMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::size_t tickRuleEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t tickRuleEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::int8_t tickRule() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 119, sizeof(std::int8_t)); - return (val); - } + SBE_NODISCARD std::int8_t tickRule() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 119, sizeof(std::int8_t)); + return (val); + } - MDInstrumentDefinitionSpread56 & - tickRule(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 119, &val, sizeof(std::int8_t)); - return *this; - } + MDInstrumentDefinitionSpread56 &tickRule(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 119, &val, sizeof(std::int8_t)); + return *this; + } - SBE_NODISCARD static const char * - UnitOfMeasureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *UnitOfMeasureMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t unitOfMeasureId() SBE_NOEXCEPT { - return 996; - } + static SBE_CONSTEXPR std::uint16_t unitOfMeasureId() SBE_NOEXCEPT + { + return 996; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - unitOfMeasureSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t unitOfMeasureSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool unitOfMeasureInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool unitOfMeasureInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= unitOfMeasureSinceVersion(); + return m_actingVersion >= unitOfMeasureSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - unitOfMeasureEncodingOffset() SBE_NOEXCEPT { - return 120; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingOffset() SBE_NOEXCEPT + { + return 120; + } - static SBE_CONSTEXPR char unitOfMeasureNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char unitOfMeasureNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char unitOfMeasureMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char unitOfMeasureMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char unitOfMeasureMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char unitOfMeasureMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingLength() SBE_NOEXCEPT { - return 30; - } + static SBE_CONSTEXPR std::size_t unitOfMeasureEncodingLength() SBE_NOEXCEPT + { + return 30; + } - static SBE_CONSTEXPR std::uint64_t unitOfMeasureLength() SBE_NOEXCEPT { - return 30; - } + static SBE_CONSTEXPR std::uint64_t unitOfMeasureLength() SBE_NOEXCEPT + { + return 30; + } - SBE_NODISCARD const char *unitOfMeasure() const SBE_NOEXCEPT { - return m_buffer + m_offset + 120; - } + SBE_NODISCARD const char *unitOfMeasure() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 120; + } - SBE_NODISCARD char *unitOfMeasure() SBE_NOEXCEPT { - return m_buffer + m_offset + 120; - } + SBE_NODISCARD char *unitOfMeasure() SBE_NOEXCEPT + { + return m_buffer + m_offset + 120; + } - SBE_NODISCARD char unitOfMeasure(const std::uint64_t index) const { - if (index >= 30) { - throw std::runtime_error( - "index out of range for unitOfMeasure [E104]"); - } + SBE_NODISCARD char unitOfMeasure(const std::uint64_t index) const + { + if (index >= 30) + { + throw std::runtime_error("index out of range for unitOfMeasure [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 120 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 120 + (index * 1), sizeof(char)); + return (val); + } - MDInstrumentDefinitionSpread56 & - unitOfMeasure(const std::uint64_t index, const char value) { - if (index >= 30) { - throw std::runtime_error( - "index out of range for unitOfMeasure [E105]"); - } + MDInstrumentDefinitionSpread56 &unitOfMeasure(const std::uint64_t index, const char value) + { + if (index >= 30) + { + throw std::runtime_error("index out of range for unitOfMeasure [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 120 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 120 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getUnitOfMeasure(char *const dst, const std::uint64_t length) const { - if (length > 30) { - throw std::runtime_error( - "length too large for getUnitOfMeasure [E106]"); - } + std::uint64_t getUnitOfMeasure(char *const dst, const std::uint64_t length) const + { + if (length > 30) + { + throw std::runtime_error("length too large for getUnitOfMeasure [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 120, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 120, sizeof(char) * static_cast(length)); + return length; + } - MDInstrumentDefinitionSpread56 & - putUnitOfMeasure(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 120, src, sizeof(char) * 30); - return *this; - } + MDInstrumentDefinitionSpread56 &putUnitOfMeasure(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 120, src, sizeof(char) * 30); + return *this; + } - std::string getUnitOfMeasureAsString() const { - const char *buffer = m_buffer + m_offset + 120; - size_t length = 0; + SBE_NODISCARD std::string getUnitOfMeasureAsString() const + { + const char *buffer = m_buffer + m_offset + 120; + size_t length = 0; - for (; length < 30 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getUnitOfMeasureAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getUnitOfMeasureAsString(); + std::string getUnitOfMeasureAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getUnitOfMeasureAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getUnitOfMeasureAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 120; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getUnitOfMeasureAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 120; + size_t length = 0; - for (; length < 30 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 30 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - MDInstrumentDefinitionSpread56 & - putUnitOfMeasure(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 30) { - throw std::runtime_error( - "string too large for putUnitOfMeasure [E106]"); - } + #if __cplusplus >= 201703L + MDInstrumentDefinitionSpread56 &putUnitOfMeasure(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 30) + { + throw std::runtime_error("string too large for putUnitOfMeasure [E106]"); + } - std::memcpy(m_buffer + m_offset + 120, str.data(), srcLength); - for (size_t start = srcLength; start < 30; ++start) { - m_buffer[m_offset + 120 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 120, str.data(), srcLength); + for (size_t start = srcLength; start < 30; ++start) + { + m_buffer[m_offset + 120 + start] = 0; + } - return *this; - } -#else - MDInstrumentDefinitionSpread56 &putUnitOfMeasure(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 30) { - throw std::runtime_error( - "string too large for putUnitOfMeasure [E106]"); - } + return *this; + } + #else + MDInstrumentDefinitionSpread56 &putUnitOfMeasure(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 30) + { + throw std::runtime_error("string too large for putUnitOfMeasure [E106]"); + } - std::memcpy(m_buffer + m_offset + 120, str.c_str(), srcLength); - for (size_t start = srcLength; start < 30; ++start) { - m_buffer[m_offset + 120 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 120, str.c_str(), srcLength); + for (size_t start = srcLength; start < 30; ++start) + { + m_buffer[m_offset + 120 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char *TradingReferencePriceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TradingReferencePriceMetaAttribute(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 tradingReferencePriceId() SBE_NOEXCEPT { - return 1150; - } + static SBE_CONSTEXPR std::uint16_t tradingReferencePriceId() SBE_NOEXCEPT + { + return 1150; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradingReferencePriceSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingReferencePriceSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool tradingReferencePriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tradingReferencePriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tradingReferencePriceSinceVersion(); + return m_actingVersion >= tradingReferencePriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradingReferencePriceEncodingOffset() SBE_NOEXCEPT { - return 150; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingReferencePriceEncodingOffset() SBE_NOEXCEPT + { + return 150; + } - private: - PRICENULL9 m_tradingReferencePrice; +private: + PRICENULL9 m_tradingReferencePrice; - public: - SBE_NODISCARD PRICENULL9 &tradingReferencePrice() { - m_tradingReferencePrice.wrap( - m_buffer, m_offset + 150, m_actingVersion, m_bufferLength); - return m_tradingReferencePrice; - } +public: + SBE_NODISCARD PRICENULL9 &tradingReferencePrice() + { + m_tradingReferencePrice.wrap(m_buffer, m_offset + 150, m_actingVersion, m_bufferLength); + return m_tradingReferencePrice; + } - SBE_NODISCARD static const char * - SettlPriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SettlPriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT { - return 731; - } + static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT + { + return 731; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - settlPriceTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t settlPriceTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= settlPriceTypeSinceVersion(); + return m_actingVersion >= settlPriceTypeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingOffset() SBE_NOEXCEPT { - return 158; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingOffset() SBE_NOEXCEPT + { + return 158; + } - private: - SettlPriceType m_settlPriceType; +private: + SettlPriceType m_settlPriceType; - public: - SBE_NODISCARD SettlPriceType &settlPriceType() { - m_settlPriceType.wrap( - m_buffer, m_offset + 158, m_actingVersion, m_bufferLength); - return m_settlPriceType; - } +public: + SBE_NODISCARD SettlPriceType &settlPriceType() + { + m_settlPriceType.wrap(m_buffer, m_offset + 158, m_actingVersion, m_bufferLength); + return m_settlPriceType; + } - static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD static const char *OpenInterestQtyMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *OpenInterestQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t openInterestQtyId() SBE_NOEXCEPT { - return 5792; - } + static SBE_CONSTEXPR std::uint16_t openInterestQtyId() SBE_NOEXCEPT + { + return 5792; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - openInterestQtySinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t openInterestQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool openInterestQtyInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool openInterestQtyInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= openInterestQtySinceVersion(); + return m_actingVersion >= openInterestQtySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - openInterestQtyEncodingOffset() SBE_NOEXCEPT { - return 159; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t openInterestQtyEncodingOffset() SBE_NOEXCEPT + { + return 159; + } - static SBE_CONSTEXPR std::int32_t openInterestQtyNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t openInterestQtyMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t openInterestQtyMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t openInterestQtyMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t - openInterestQtyEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t openInterestQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t openInterestQty() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 159, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t openInterestQty() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 159, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionSpread56 & - openInterestQty(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 159, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionSpread56 &openInterestQty(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 159, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char * - ClearedVolumeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *ClearedVolumeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t clearedVolumeId() SBE_NOEXCEPT { - return 5791; - } + static SBE_CONSTEXPR std::uint16_t clearedVolumeId() SBE_NOEXCEPT + { + return 5791; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - clearedVolumeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t clearedVolumeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool clearedVolumeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool clearedVolumeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= clearedVolumeSinceVersion(); + return m_actingVersion >= clearedVolumeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - clearedVolumeEncodingOffset() SBE_NOEXCEPT { - return 163; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t clearedVolumeEncodingOffset() SBE_NOEXCEPT + { + return 163; + } - static SBE_CONSTEXPR std::int32_t clearedVolumeNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t clearedVolumeMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t clearedVolumeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t clearedVolumeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t clearedVolumeEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t clearedVolumeEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t clearedVolume() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 163, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t clearedVolume() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 163, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - MDInstrumentDefinitionSpread56 & - clearedVolume(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 163, &val, sizeof(std::int32_t)); - return *this; - } + MDInstrumentDefinitionSpread56 &clearedVolume(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 163, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char * - HighLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *HighLimitPriceMetaAttribute(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 highLimitPriceId() SBE_NOEXCEPT { - return 1149; - } + static SBE_CONSTEXPR std::uint16_t highLimitPriceId() SBE_NOEXCEPT + { + return 1149; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - highLimitPriceSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t highLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= highLimitPriceSinceVersion(); + return m_actingVersion >= highLimitPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - highLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 167; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t highLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 167; + } - private: - PRICENULL9 m_highLimitPrice; +private: + PRICENULL9 m_highLimitPrice; - public: - SBE_NODISCARD PRICENULL9 &highLimitPrice() { - m_highLimitPrice.wrap( - m_buffer, m_offset + 167, m_actingVersion, m_bufferLength); - return m_highLimitPrice; - } +public: + SBE_NODISCARD PRICENULL9 &highLimitPrice() + { + m_highLimitPrice.wrap(m_buffer, m_offset + 167, m_actingVersion, m_bufferLength); + return m_highLimitPrice; + } - SBE_NODISCARD static const char * - LowLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *LowLimitPriceMetaAttribute(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 lowLimitPriceId() SBE_NOEXCEPT { - return 1148; - } + static SBE_CONSTEXPR std::uint16_t lowLimitPriceId() SBE_NOEXCEPT + { + return 1148; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lowLimitPriceSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lowLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lowLimitPriceSinceVersion(); + return m_actingVersion >= lowLimitPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lowLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 175; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lowLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 175; + } - private: - PRICENULL9 m_lowLimitPrice; +private: + PRICENULL9 m_lowLimitPrice; - public: - SBE_NODISCARD PRICENULL9 &lowLimitPrice() { - m_lowLimitPrice.wrap( - m_buffer, m_offset + 175, m_actingVersion, m_bufferLength); - return m_lowLimitPrice; - } +public: + SBE_NODISCARD PRICENULL9 &lowLimitPrice() + { + m_lowLimitPrice.wrap(m_buffer, m_offset + 175, m_actingVersion, m_bufferLength); + return m_lowLimitPrice; + } - SBE_NODISCARD static const char *MaxPriceVariationMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaxPriceVariationMetaAttribute(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 maxPriceVariationId() SBE_NOEXCEPT { - return 1143; - } + static SBE_CONSTEXPR std::uint16_t maxPriceVariationId() SBE_NOEXCEPT + { + return 1143; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maxPriceVariationSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxPriceVariationSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool maxPriceVariationInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maxPriceVariationInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maxPriceVariationSinceVersion(); + return m_actingVersion >= maxPriceVariationSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maxPriceVariationEncodingOffset() SBE_NOEXCEPT { - return 183; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxPriceVariationEncodingOffset() SBE_NOEXCEPT + { + return 183; + } - private: - PRICENULL9 m_maxPriceVariation; +private: + PRICENULL9 m_maxPriceVariation; - public: - SBE_NODISCARD PRICENULL9 &maxPriceVariation() { - m_maxPriceVariation.wrap( - m_buffer, m_offset + 183, m_actingVersion, m_bufferLength); - return m_maxPriceVariation; - } +public: + SBE_NODISCARD PRICENULL9 &maxPriceVariation() + { + m_maxPriceVariation.wrap(m_buffer, m_offset + 183, m_actingVersion, m_bufferLength); + return m_maxPriceVariation; + } - SBE_NODISCARD static const char * - MainFractionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MainFractionMetaAttribute(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 mainFractionId() SBE_NOEXCEPT { - return 37702; - } + static SBE_CONSTEXPR std::uint16_t mainFractionId() SBE_NOEXCEPT + { + return 37702; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mainFractionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mainFractionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool mainFractionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool mainFractionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mainFractionSinceVersion(); + return m_actingVersion >= mainFractionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mainFractionEncodingOffset() SBE_NOEXCEPT { - return 191; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mainFractionEncodingOffset() SBE_NOEXCEPT + { + return 191; + } - static SBE_CONSTEXPR std::uint8_t mainFractionNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t mainFractionNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t mainFractionMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t mainFractionMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t mainFractionMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t mainFractionMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t mainFractionEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t mainFractionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t mainFraction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 191, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t mainFraction() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 191, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionSpread56 & - mainFraction(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 191, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionSpread56 &mainFraction(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 191, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - SubFractionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SubFractionMetaAttribute(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 subFractionId() SBE_NOEXCEPT { - return 37703; - } + static SBE_CONSTEXPR std::uint16_t subFractionId() SBE_NOEXCEPT + { + return 37703; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - subFractionSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t subFractionSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool subFractionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool subFractionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= subFractionSinceVersion(); + return m_actingVersion >= subFractionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - subFractionEncodingOffset() SBE_NOEXCEPT { - return 192; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t subFractionEncodingOffset() SBE_NOEXCEPT + { + return 192; + } - static SBE_CONSTEXPR std::uint8_t subFractionNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t subFractionNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t subFractionMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t subFractionMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t subFractionMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t subFractionMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t subFractionEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t subFractionEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t subFraction() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 192, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t subFraction() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 192, sizeof(std::uint8_t)); + return (val); + } - MDInstrumentDefinitionSpread56 & - subFraction(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 192, &val, sizeof(std::uint8_t)); - return *this; - } + MDInstrumentDefinitionSpread56 &subFraction(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 192, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "LocalMktDate"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute(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 tradingReferenceDateId() SBE_NOEXCEPT { - return 5796; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateId() SBE_NOEXCEPT + { + return 5796; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradingReferenceDateSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingReferenceDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tradingReferenceDateSinceVersion(); + return m_actingVersion >= tradingReferenceDateSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingOffset() SBE_NOEXCEPT { - return 193; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingOffset() SBE_NOEXCEPT + { + return 193; + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateNullValue() SBE_NOEXCEPT { - return (std::uint16_t)65535; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 193, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MDInstrumentDefinitionSpread56 & - tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint16_t)); - return *this; - } + MDInstrumentDefinitionSpread56 &tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 193, &val, sizeof(std::uint16_t)); + return *this; + } - class NoEvents { + class NoEvents + { 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; + 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; - } + 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 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) { + 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(9)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 9; + 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 9; + } + + 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 NoEvents &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *EventTypeMetaAttribute(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 eventTypeId() SBE_NOEXCEPT + { + return 865; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t eventTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool eventTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= eventTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD EventType::Value eventType() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); + return EventType::get((val)); + } + + NoEvents &eventType(const EventType::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *EventTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t eventTimeId() SBE_NOEXCEPT + { + return 1145; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t eventTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool eventTimeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= eventTimeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t eventTimeEncodingOffset() SBE_NOEXCEPT + { + return 1; + } + + static SBE_CONSTEXPR std::uint64_t eventTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t eventTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t eventTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t eventTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t eventTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoEvents &eventTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint64_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoEvents writer) + { + builder << '{'; + builder << R"("EventType": )"; + builder << '"' << writer.eventType() << '"'; + + builder << ", "; + builder << R"("EventTime": )"; + builder << +writer.eventTime(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)9); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 9; - 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; - } +private: + NoEvents m_noEvents; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 9; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoEventsId() SBE_NOEXCEPT + { + return 864; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoEvents &noEvents() + { + m_noEvents.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noEvents; + } - 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; - } + NoEvents &noEventsCount(const std::uint8_t count) + { + m_noEvents.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noEvents; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noEventsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoEvents &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - EventTypeMetaAttribute(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 eventTypeId() SBE_NOEXCEPT { - return 865; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - eventTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool eventTypeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noEventsInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= eventTypeSinceVersion(); + return m_actingVersion >= noEventsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD EventType::Value eventType() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint8_t)); - return EventType::get((val)); - } - - NoEvents &eventType(const EventType::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - EventTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t eventTimeId() SBE_NOEXCEPT { - return 1145; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - eventTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool eventTimeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= eventTimeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - eventTimeEncodingOffset() SBE_NOEXCEPT { - return 1; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t eventTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t eventTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t eventTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 1, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoEvents &eventTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 1, &val, sizeof(std::uint64_t)); - return *this; - } - - template - friend std::basic_ostream & - operator<<(std::basic_ostream &builder, NoEvents writer) { - builder << '{'; - builder << R"("EventType": )"; - builder << '"' << writer.eventType() << '"'; - - builder << ", "; - builder << R"("EventTime": )"; - builder << +writer.eventTime(); - - builder << '}'; - - return builder; - } - }; - - private: - NoEvents m_noEvents; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoEventsId() SBE_NOEXCEPT { - return 864; - } - - SBE_NODISCARD inline NoEvents &noEvents() { - m_noEvents.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noEvents; - } - - NoEvents &noEventsCount(const std::uint8_t count) { - m_noEvents.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noEvents; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noEventsSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noEventsInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noEventsSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoMDFeedTypes { + class NoMDFeedTypes + { 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; + 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; - } + 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 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((std::uint16_t)4); - dimensions.numInGroup((std::uint8_t)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 { return *m_positionPtr; } - - std::uint64_t sbeCheckPosition(const std::uint64_t position) { - if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) { - throw std::runtime_error("buffer too short [E100]"); - } - return position; - } - - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } - - SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT { - return m_count; - } - - SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT { - return m_index < m_count; - } - - inline NoMDFeedTypes &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - MDFeedTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDFeedTypeId() SBE_NOEXCEPT { - return 1022; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDFeedTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDFeedTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDFeedTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDFeedTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR char mDFeedTypeNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char mDFeedTypeMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char mDFeedTypeMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingLength() SBE_NOEXCEPT { - return 3; - } - - static SBE_CONSTEXPR std::uint64_t mDFeedTypeLength() SBE_NOEXCEPT { - return 3; - } - - SBE_NODISCARD const char *mDFeedType() const SBE_NOEXCEPT { - return m_buffer + m_offset + 0; - } - - SBE_NODISCARD char *mDFeedType() SBE_NOEXCEPT { - return m_buffer + m_offset + 0; - } - - SBE_NODISCARD char mDFeedType(const std::uint64_t index) const { - if (index >= 3) { - throw std::runtime_error( - "index out of range for mDFeedType [E104]"); - } - - char val; - std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); - return (val); - } - - NoMDFeedTypes &mDFeedType(const std::uint64_t index, const char value) { - if (index >= 3) { - throw std::runtime_error( - "index out of range for mDFeedType [E105]"); - } - - char val = (value); - std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); - return *this; - } - - std::uint64_t - getMDFeedType(char *const dst, const std::uint64_t length) const { - if (length > 3) { - throw std::runtime_error( - "length too large for getMDFeedType [E106]"); - } - - std::memcpy( - dst, m_buffer + m_offset + 0, - sizeof(char) * static_cast(length)); - return length; - } - - NoMDFeedTypes &putMDFeedType(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 3); - return *this; - } - - NoMDFeedTypes & - putMDFeedType(const char value0, const char value1, const char value2) - SBE_NOEXCEPT { - char val0 = (value0); - std::memcpy(m_buffer + m_offset + 0, &val0, sizeof(char)); - char val1 = (value1); - std::memcpy(m_buffer + m_offset + 1, &val1, sizeof(char)); - char val2 = (value2); - std::memcpy(m_buffer + m_offset + 2, &val2, sizeof(char)); - - return *this; - } - - std::string getMDFeedTypeAsString() const { - const char *buffer = m_buffer + m_offset + 0; - size_t length = 0; - - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); - - return result; - } - - std::string getMDFeedTypeAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getMDFeedTypeAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } + 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]"); } - } - - return oss.str(); - } - -#if __cplusplus >= 201703L - std::string_view getMDFeedTypeAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 0; - size_t length = 0; - - for (; length < 3 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); - - return result; - } -#endif - -#if __cplusplus >= 201703L - NoMDFeedTypes &putMDFeedType(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putMDFeedType [E106]"); - } - - std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 0 + start] = 0; - } - - return *this; - } -#else - NoMDFeedTypes &putMDFeedType(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 3) { - throw std::runtime_error( - "string too large for putMDFeedType [E106]"); - } - - std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); - for (size_t start = srcLength; start < 3; ++start) { - m_buffer[m_offset + 0 + start] = 0; - } - - return *this; - } -#endif - - SBE_NODISCARD static const char * - MarketDepthMetaAttribute(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 marketDepthId() SBE_NOEXCEPT { - return 264; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - marketDepthSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool marketDepthInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= marketDepthSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - marketDepthEncodingOffset() SBE_NOEXCEPT { - return 3; - } - - static SBE_CONSTEXPR std::int8_t marketDepthNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t marketDepthMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t marketDepthMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t - marketDepthEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::int8_t marketDepth() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 3, sizeof(std::int8_t)); - return (val); - } - - NoMDFeedTypes &marketDepth(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 3, &val, sizeof(std::int8_t)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDFeedTypes writer) { - builder << '{'; - builder << R"("MDFeedType": )"; - builder << '"' << writer.getMDFeedTypeAsJsonEscapedString().c_str() - << '"'; - - builder << ", "; - builder << R"("MarketDepth": )"; - builder << +writer.marketDepth(); - - builder << '}'; - - return builder; - } - }; - - private: - NoMDFeedTypes m_noMDFeedTypes; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDFeedTypesId() SBE_NOEXCEPT { - return 1141; - } - - SBE_NODISCARD inline NoMDFeedTypes &noMDFeedTypes() { - m_noMDFeedTypes.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDFeedTypes; - } - - NoMDFeedTypes &noMDFeedTypesCount(const std::uint8_t count) { - m_noMDFeedTypes.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDFeedTypes; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDFeedTypesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDFeedTypesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDFeedTypesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoInstAttrib { - 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((std::uint16_t)4); - dimensions.numInGroup((std::uint8_t)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 { return *m_positionPtr; } - - std::uint64_t sbeCheckPosition(const std::uint64_t position) { - if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) { - throw std::runtime_error("buffer too short [E100]"); - } - return position; - } - - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } - - SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT { - return m_count; - } - - SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT { - return m_index < m_count; - } - - inline NoInstAttrib &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char *InstAttribTypeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t instAttribTypeId() SBE_NOEXCEPT { - return 871; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - instAttribTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool instAttribTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= instAttribTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - instAttribTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t instAttribTypeMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t - instAttribTypeEncodingLength() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::int8_t - instAttribType() SBE_NOEXCEPT { - return (std::int8_t)24; - } - - SBE_NODISCARD static const char *InstAttribValueMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t instAttribValueId() SBE_NOEXCEPT { - return 872; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - instAttribValueSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool instAttribValueInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= instAttribValueSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - instAttribValueEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - private: - InstAttribValue m_instAttribValue; - - public: - SBE_NODISCARD InstAttribValue &instAttribValue() { - m_instAttribValue.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_instAttribValue; - } - - static SBE_CONSTEXPR std::size_t - instAttribValueEncodingLength() SBE_NOEXCEPT { - return 4; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoInstAttrib writer) { - builder << '{'; - builder << R"("InstAttribValue": )"; - builder << writer.instAttribValue(); - - builder << '}'; - - return builder; - } - }; - - private: - NoInstAttrib m_noInstAttrib; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoInstAttribId() SBE_NOEXCEPT { - return 870; - } - - SBE_NODISCARD inline NoInstAttrib &noInstAttrib() { - m_noInstAttrib.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noInstAttrib; - } - - NoInstAttrib &noInstAttribCount(const std::uint8_t count) { - m_noInstAttrib.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noInstAttrib; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noInstAttribSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noInstAttribInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noInstAttribSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoLotTypeRules { - 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((std::uint16_t)5); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 5; - 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 5; - } - - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } - - std::uint64_t sbeCheckPosition(const std::uint64_t position) { - if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) { - throw std::runtime_error("buffer too short [E100]"); - } - return position; - } - - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } - - SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT { - return m_count; - } - - SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT { - return m_index < m_count; - } - - inline NoLotTypeRules &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - LotTypeMetaAttribute(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 lotTypeId() SBE_NOEXCEPT { - return 1093; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lotTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool lotTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= lotTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lotTypeEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int8_t lotTypeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t lotTypeMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t lotTypeMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t lotTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::int8_t lotType() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int8_t)); - return (val); - } - - NoLotTypeRules &lotType(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int8_t)); - return *this; - } - - SBE_NODISCARD static const char * - MinLotSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t minLotSizeId() SBE_NOEXCEPT { - return 1231; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - minLotSizeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool minLotSizeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= minLotSizeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - minLotSizeEncodingOffset() SBE_NOEXCEPT { - return 1; - } - - private: - DecimalQty m_minLotSize; - - public: - SBE_NODISCARD DecimalQty &minLotSize() { - m_minLotSize.wrap( - m_buffer, m_offset + 1, m_actingVersion, m_bufferLength); - return m_minLotSize; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoLotTypeRules writer) { - builder << '{'; - builder << R"("LotType": )"; - builder << +writer.lotType(); - - builder << ", "; - builder << R"("MinLotSize": )"; - builder << writer.minLotSize(); - - builder << '}'; - - return builder; - } - }; - - private: - NoLotTypeRules m_noLotTypeRules; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoLotTypeRulesId() SBE_NOEXCEPT { - return 1234; - } - - SBE_NODISCARD inline NoLotTypeRules &noLotTypeRules() { - m_noLotTypeRules.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noLotTypeRules; - } - - NoLotTypeRules &noLotTypeRulesCount(const std::uint8_t count) { - m_noLotTypeRules.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noLotTypeRules; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noLotTypeRulesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noLotTypeRulesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noLotTypeRulesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - class NoLegs { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_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((std::uint16_t)18); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 18; - 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 18; - } - - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } - - std::uint64_t sbeCheckPosition(const std::uint64_t position) { - if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false)) { - throw std::runtime_error("buffer too short [E100]"); - } - return position; - } - - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } - - SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT { - return m_count; - } - - SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT { - return m_index < m_count; - } - - inline NoLegs &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char *LegSecurityIDMetaAttribute( - 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 legSecurityIDId() SBE_NOEXCEPT { - return 602; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - legSecurityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool legSecurityIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= legSecurityIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - legSecurityIDEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::int32_t legSecurityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t legSecurityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t legSecurityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - legSecurityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t legSecurityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoLegs &legSecurityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char *LegSecurityIDSourceMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t legSecurityIDSourceId() SBE_NOEXCEPT { - return 603; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - legSecurityIDSourceSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool legSecurityIDSourceInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= legSecurityIDSourceSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - legSecurityIDSourceEncodingOffset() SBE_NOEXCEPT { - return 4; - } - - static SBE_CONSTEXPR char legSecurityIDSourceNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char legSecurityIDSourceMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char legSecurityIDSourceMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t - legSecurityIDSourceEncodingLength() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t - legSecurityIDSourceLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD const char *legSecurityIDSource() const { - static const std::uint8_t legSecurityIDSourceValues[] = {56}; - - return (const char *)legSecurityIDSourceValues; - } - - SBE_NODISCARD char legSecurityIDSource(const std::uint64_t index) const { - static const std::uint8_t legSecurityIDSourceValues[] = {56}; - - return (char)legSecurityIDSourceValues[index]; - } - - std::uint64_t - getLegSecurityIDSource(char *dst, const std::uint64_t length) const { - static std::uint8_t legSecurityIDSourceValues[] = {56}; - std::uint64_t bytesToCopy = length < sizeof(legSecurityIDSourceValues) - ? length - : sizeof(legSecurityIDSourceValues); - - std::memcpy( - dst, legSecurityIDSourceValues, static_cast(bytesToCopy)); - return bytesToCopy; - } - - std::string getLegSecurityIDSourceAsString() const { - static const std::uint8_t LegSecurityIDSourceValues[] = {56}; - - return std::string((const char *)LegSecurityIDSourceValues, 1); - } - - std::string getLegSecurityIDSourceAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getLegSecurityIDSourceAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } + #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; + } - return oss.str(); - } + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - SBE_NODISCARD static const char * - LegSideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - static SBE_CONSTEXPR std::uint16_t legSideId() SBE_NOEXCEPT { - return 624; - } + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - legSideSinceVersion() SBE_NOEXCEPT { - return 0; - } + inline NoMDFeedTypes &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; - SBE_NODISCARD bool legSideInActingVersion() SBE_NOEXCEPT { + return *this; + } + + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *MDFeedTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDFeedTypeId() SBE_NOEXCEPT + { + return 1022; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDFeedTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDFeedTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDFeedTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char mDFeedTypeNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char mDFeedTypeMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char mDFeedTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t mDFeedTypeEncodingLength() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::uint64_t mDFeedTypeLength() SBE_NOEXCEPT + { + return 3; + } + + SBE_NODISCARD const char *mDFeedType() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *mDFeedType() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char mDFeedType(const std::uint64_t index) const + { + if (index >= 3) + { + throw std::runtime_error("index out of range for mDFeedType [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoMDFeedTypes &mDFeedType(const std::uint64_t index, const char value) + { + if (index >= 3) + { + throw std::runtime_error("index out of range for mDFeedType [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getMDFeedType(char *const dst, const std::uint64_t length) const + { + if (length > 3) + { + throw std::runtime_error("length too large for getMDFeedType [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoMDFeedTypes &putMDFeedType(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 3); + return *this; + } + + NoMDFeedTypes &putMDFeedType( + const char value0, + const char value1, + const char value2) SBE_NOEXCEPT + { + char val0 = (value0); + std::memcpy(m_buffer + m_offset + 0, &val0, sizeof(char)); + char val1 = (value1); + std::memcpy(m_buffer + m_offset + 1, &val1, sizeof(char)); + char val2 = (value2); + std::memcpy(m_buffer + m_offset + 2, &val2, sizeof(char)); + + return *this; + } + + SBE_NODISCARD std::string getMDFeedTypeAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getMDFeedTypeAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getMDFeedTypeAsString(); + + 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 getMDFeedTypeAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 3 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoMDFeedTypes &putMDFeedType(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putMDFeedType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoMDFeedTypes &putMDFeedType(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 3) + { + throw std::runtime_error("string too large for putMDFeedType [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 3; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *MarketDepthMetaAttribute(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 marketDepthId() SBE_NOEXCEPT + { + return 264; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t marketDepthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool marketDepthInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= marketDepthSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t marketDepthEncodingOffset() SBE_NOEXCEPT + { + return 3; + } + + static SBE_CONSTEXPR std::int8_t marketDepthNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t marketDepthMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t marketDepthMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t marketDepthEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t marketDepth() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 3, sizeof(std::int8_t)); + return (val); + } + + NoMDFeedTypes &marketDepth(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 3, &val, sizeof(std::int8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDFeedTypes writer) + { + builder << '{'; + builder << R"("MDFeedType": )"; + builder << '"' << + writer.getMDFeedTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("MarketDepth": )"; + builder << +writer.marketDepth(); + + 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: + NoMDFeedTypes m_noMDFeedTypes; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDFeedTypesId() SBE_NOEXCEPT + { + return 1141; + } + + SBE_NODISCARD inline NoMDFeedTypes &noMDFeedTypes() + { + m_noMDFeedTypes.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDFeedTypes; + } + + NoMDFeedTypes &noMDFeedTypesCount(const std::uint8_t count) + { + m_noMDFeedTypes.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDFeedTypes; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDFeedTypesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noMDFeedTypesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= legSideSinceVersion(); + return m_actingVersion >= noMDFeedTypesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - legSideEncodingOffset() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - legSideEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD LegSide::Value legSide() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint8_t)); - return LegSide::get((val)); - } - - NoLegs &legSide(const LegSide::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char * - LegRatioQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t legRatioQtyId() SBE_NOEXCEPT { - return 623; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - legRatioQtySinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool legRatioQtyInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= legRatioQtySinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - legRatioQtyEncodingOffset() SBE_NOEXCEPT { - return 5; - } - - static SBE_CONSTEXPR std::int8_t legRatioQtyNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t legRatioQtyMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t legRatioQtyMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t - legRatioQtyEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::int8_t legRatioQty() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 5, sizeof(std::int8_t)); - return (val); - } - - NoLegs &legRatioQty(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 5, &val, sizeof(std::int8_t)); - return *this; - } - - SBE_NODISCARD static const char * - LegPriceMetaAttribute(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 legPriceId() SBE_NOEXCEPT { - return 566; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - legPriceSinceVersion() SBE_NOEXCEPT { - return 9; - } - - SBE_NODISCARD bool legPriceInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= legPriceSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - legPriceEncodingOffset() SBE_NOEXCEPT { - return 6; - } + } + class NoInstAttrib + { private: - PRICENULL9 m_legPrice; + 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: - SBE_NODISCARD PRICENULL9 &legPrice() { - m_legPrice.wrap( - m_buffer, m_offset + 6, m_actingVersion, m_bufferLength); - return m_legPrice; - } + 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; + } - SBE_NODISCARD static const char *LegOptionDeltaMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + 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::uint16_t legOptionDeltaId() SBE_NOEXCEPT { - return 1017; - } + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - legOptionDeltaSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD bool legOptionDeltaInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= legOptionDeltaSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - legOptionDeltaEncodingOffset() SBE_NOEXCEPT { - return 14; - } + // 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 NoInstAttrib &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *InstAttribTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t instAttribTypeId() SBE_NOEXCEPT + { + return 871; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t instAttribTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool instAttribTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= instAttribTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t instAttribTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t instAttribTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t instAttribTypeEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t instAttribType() SBE_NOEXCEPT + { + return static_cast(24); + } + + SBE_NODISCARD static const char *InstAttribValueMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t instAttribValueId() SBE_NOEXCEPT + { + return 872; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t instAttribValueSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool instAttribValueInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= instAttribValueSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t instAttribValueEncodingOffset() SBE_NOEXCEPT + { + return 0; + } private: - DecimalQty m_legOptionDelta; + InstAttribValue m_instAttribValue; public: - SBE_NODISCARD DecimalQty &legOptionDelta() { - m_legOptionDelta.wrap( - m_buffer, m_offset + 14, m_actingVersion, m_bufferLength); - return m_legOptionDelta; - } + SBE_NODISCARD InstAttribValue &instAttribValue() + { + m_instAttribValue.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_instAttribValue; + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &builder, NoLegs writer) { - builder << '{'; - builder << R"("LegSecurityID": )"; - builder << +writer.legSecurityID(); + static SBE_CONSTEXPR std::size_t instAttribValueEncodingLength() SBE_NOEXCEPT + { + return 4; + } - builder << ", "; - builder << R"("LegSide": )"; - builder << '"' << writer.legSide() << '"'; + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoInstAttrib writer) + { + builder << '{'; + builder << R"("InstAttribValue": )"; + builder << writer.instAttribValue(); - builder << ", "; - builder << R"("LegRatioQty": )"; - builder << +writer.legRatioQty(); + builder << '}'; - builder << ", "; - builder << R"("LegPrice": )"; - builder << writer.legPrice(); + return builder; + } - builder << ", "; - builder << R"("LegOptionDelta": )"; - builder << writer.legOptionDelta(); + void skip() + { + } - builder << '}'; + SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT + { + return true; + } - return builder; - } - }; + 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(); - private: - NoLegs m_noLegs; + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + } + }; - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLegsId() SBE_NOEXCEPT { - return 555; - } +private: + NoInstAttrib m_noInstAttrib; - SBE_NODISCARD inline NoLegs &noLegs() { - m_noLegs.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noLegs; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoInstAttribId() SBE_NOEXCEPT + { + return 870; + } - NoLegs &noLegsCount(const std::uint8_t count) { - m_noLegs.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noLegs; - } + SBE_NODISCARD inline NoInstAttrib &noInstAttrib() + { + m_noInstAttrib.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noInstAttrib; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noLegsSinceVersion() SBE_NOEXCEPT { - return 0; - } + NoInstAttrib &noInstAttribCount(const std::uint8_t count) + { + m_noInstAttrib.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noInstAttrib; + } - SBE_NODISCARD bool noLegsInActingVersion() const SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noInstAttribSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noInstAttribInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= noLegsSinceVersion(); + return m_actingVersion >= noInstAttribSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - MDInstrumentDefinitionSpread56 _writer) { - MDInstrumentDefinitionSpread56 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "MDInstrumentDefinitionSpread56", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; + class NoLotTypeRules + { + 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; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); + SBE_NODISCARD std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return m_positionPtr; + } - builder << ", "; - builder << R"("TotNumReports": )"; - builder << +writer.totNumReports(); + 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; + } - builder << ", "; - builder << R"("SecurityUpdateAction": )"; - builder << '"' << writer.securityUpdateAction() << '"'; + 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(5)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 5; + m_actingVersion = actingVersion; + m_initialPosition = *pos; + m_positionPtr = pos; + *m_positionPtr = *m_positionPtr + 3; + } - builder << ", "; - builder << R"("LastUpdateTime": )"; - builder << +writer.lastUpdateTime(); + static SBE_CONSTEXPR std::uint64_t sbeHeaderSize() SBE_NOEXCEPT + { + return 3; + } - builder << ", "; - builder << R"("MDSecurityTradingStatus": )"; - builder << '"' << writer.mDSecurityTradingStatus() << '"'; + static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT + { + return 5; + } - builder << ", "; - builder << R"("ApplID": )"; - builder << +writer.applID(); + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return *m_positionPtr; + } - builder << ", "; - builder << R"("MarketSegmentID": )"; - builder << +writer.marketSegmentID(); + // 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; + } - builder << ", "; - builder << R"("UnderlyingProduct": )"; - builder << +writer.underlyingProduct(); + void sbePosition(const std::uint64_t position) + { + *m_positionPtr = sbeCheckPosition(position); + } - builder << ", "; - builder << R"("SecurityExchange": )"; - builder << '"' << writer.getSecurityExchangeAsJsonEscapedString().c_str() - << '"'; + SBE_NODISCARD inline std::uint64_t count() const SBE_NOEXCEPT + { + return m_count; + } - builder << ", "; - builder << R"("SecurityGroup": )"; - builder << '"' << writer.getSecurityGroupAsJsonEscapedString().c_str() - << '"'; + SBE_NODISCARD inline bool hasNext() const SBE_NOEXCEPT + { + return m_index < m_count; + } - builder << ", "; - builder << R"("Asset": )"; - builder << '"' << writer.getAssetAsJsonEscapedString().c_str() << '"'; + inline NoLotTypeRules &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; - builder << ", "; - builder << R"("Symbol": )"; - builder << '"' << writer.getSymbolAsJsonEscapedString().c_str() << '"'; + return *this; + } - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); + inline std::uint64_t resetCountToIndex() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } - builder << ", "; - builder << R"("SecurityType": )"; - builder << '"' << writer.getSecurityTypeAsJsonEscapedString().c_str() - << '"'; + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - builder << ", "; - builder << R"("CFICode": )"; - builder << '"' << writer.getCFICodeAsJsonEscapedString().c_str() << '"'; + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } - builder << ", "; - builder << R"("MaturityMonthYear": )"; - builder << writer.maturityMonthYear(); + #endif - builder << ", "; - builder << R"("Currency": )"; - builder << '"' << writer.getCurrencyAsJsonEscapedString().c_str() << '"'; + SBE_NODISCARD static const char *LotTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - builder << ", "; - builder << R"("SecuritySubType": )"; - builder << '"' << writer.getSecuritySubTypeAsJsonEscapedString().c_str() - << '"'; + static SBE_CONSTEXPR std::uint16_t lotTypeId() SBE_NOEXCEPT + { + return 1093; + } - builder << ", "; - builder << R"("UserDefinedInstrument": )"; - if (std::isprint(writer.userDefinedInstrument())) { - builder << '"' << (char)writer.userDefinedInstrument() << '"'; - } else { - builder << (int)writer.userDefinedInstrument(); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lotTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - builder << ", "; - builder << R"("MatchAlgorithm": )"; - if (std::isprint(writer.matchAlgorithm())) { - builder << '"' << (char)writer.matchAlgorithm() << '"'; - } else { - builder << (int)writer.matchAlgorithm(); - } + SBE_NODISCARD bool lotTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= lotTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } - builder << ", "; - builder << R"("MinTradeVol": )"; - builder << +writer.minTradeVol(); + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lotTypeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - builder << ", "; - builder << R"("MaxTradeVol": )"; - builder << +writer.maxTradeVol(); + static SBE_CONSTEXPR std::int8_t lotTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } - builder << ", "; - builder << R"("MinPriceIncrement": )"; - builder << writer.minPriceIncrement(); + static SBE_CONSTEXPR std::int8_t lotTypeMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - builder << ", "; - builder << R"("DisplayFactor": )"; - builder << writer.displayFactor(); + static SBE_CONSTEXPR std::int8_t lotTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - builder << ", "; - builder << R"("PriceDisplayFormat": )"; - builder << +writer.priceDisplayFormat(); + static SBE_CONSTEXPR std::size_t lotTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } - builder << ", "; - builder << R"("PriceRatio": )"; - builder << writer.priceRatio(); + SBE_NODISCARD std::int8_t lotType() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int8_t)); + return (val); + } - builder << ", "; - builder << R"("TickRule": )"; - builder << +writer.tickRule(); + NoLotTypeRules &lotType(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int8_t)); + return *this; + } - builder << ", "; - builder << R"("UnitOfMeasure": )"; - builder << '"' << writer.getUnitOfMeasureAsJsonEscapedString().c_str() - << '"'; + SBE_NODISCARD static const char *MinLotSizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - builder << ", "; - builder << R"("TradingReferencePrice": )"; - builder << writer.tradingReferencePrice(); + static SBE_CONSTEXPR std::uint16_t minLotSizeId() SBE_NOEXCEPT + { + return 1231; + } - builder << ", "; - builder << R"("SettlPriceType": )"; - builder << writer.settlPriceType(); + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t minLotSizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - builder << ", "; - builder << R"("OpenInterestQty": )"; - builder << +writer.openInterestQty(); + SBE_NODISCARD bool minLotSizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= minLotSizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } - builder << ", "; - builder << R"("ClearedVolume": )"; - builder << +writer.clearedVolume(); + SBE_NODISCARD static SBE_CONSTEXPR std::size_t minLotSizeEncodingOffset() SBE_NOEXCEPT + { + return 1; + } - builder << ", "; - builder << R"("HighLimitPrice": )"; - builder << writer.highLimitPrice(); +private: + DecimalQty m_minLotSize; - builder << ", "; - builder << R"("LowLimitPrice": )"; - builder << writer.lowLimitPrice(); +public: + SBE_NODISCARD DecimalQty &minLotSize() + { + m_minLotSize.wrap(m_buffer, m_offset + 1, m_actingVersion, m_bufferLength); + return m_minLotSize; + } - builder << ", "; - builder << R"("MaxPriceVariation": )"; - builder << writer.maxPriceVariation(); + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoLotTypeRules writer) + { + builder << '{'; + builder << R"("LotType": )"; + builder << +writer.lotType(); - builder << ", "; - builder << R"("MainFraction": )"; - builder << +writer.mainFraction(); + builder << ", "; + builder << R"("MinLotSize": )"; + builder << writer.minLotSize(); - builder << ", "; - builder << R"("SubFraction": )"; - builder << +writer.subFraction(); + builder << '}'; - builder << ", "; - builder << R"("TradingReferenceDate": )"; - builder << +writer.tradingReferenceDate(); + return builder; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoEvents": [)"; - writer.noEvents().forEach([&](NoEvents &noEvents) { - if (atLeastOne) { - 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: + NoLotTypeRules m_noLotTypeRules; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLotTypeRulesId() SBE_NOEXCEPT + { + return 1234; + } + + SBE_NODISCARD inline NoLotTypeRules &noLotTypeRules() + { + m_noLotTypeRules.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLotTypeRules; + } + + NoLotTypeRules &noLotTypeRulesCount(const std::uint8_t count) + { + m_noLotTypeRules.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLotTypeRules; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noLotTypeRulesSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noLotTypeRulesInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noLotTypeRulesSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + + class NoLegs + { + private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_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(18)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 18; + 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 18; + } + + 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 NoLegs &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *LegSecurityIDMetaAttribute(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 legSecurityIDId() SBE_NOEXCEPT + { + return 602; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSecurityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSecurityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSecurityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSecurityIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t legSecurityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t legSecurityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t legSecurityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoLegs &legSecurityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *LegSecurityIDSourceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legSecurityIDSourceId() SBE_NOEXCEPT + { + return 603; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSecurityIDSourceSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSecurityIDSourceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSecurityIDSourceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSecurityIDSourceEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + static SBE_CONSTEXPR char legSecurityIDSourceNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char legSecurityIDSourceMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char legSecurityIDSourceMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t legSecurityIDSourceEncodingLength() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t legSecurityIDSourceLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD const char *legSecurityIDSource() const + { + static const std::uint8_t legSecurityIDSourceValues[] = { 56 }; + + return (const char *)legSecurityIDSourceValues; + } + + SBE_NODISCARD char legSecurityIDSource(const std::uint64_t index) const + { + static const std::uint8_t legSecurityIDSourceValues[] = { 56 }; + + return (char)legSecurityIDSourceValues[index]; + } + + std::uint64_t getLegSecurityIDSource(char *dst, const std::uint64_t length) const + { + static std::uint8_t legSecurityIDSourceValues[] = { 56 }; + std::uint64_t bytesToCopy = length < sizeof(legSecurityIDSourceValues) ? length : sizeof(legSecurityIDSourceValues); + + std::memcpy(dst, legSecurityIDSourceValues, static_cast(bytesToCopy)); + return bytesToCopy; + } + + std::string getLegSecurityIDSourceAsString() const + { + static const std::uint8_t LegSecurityIDSourceValues[] = { 56 }; + + return std::string((const char *)LegSecurityIDSourceValues, 1); + } + + std::string getLegSecurityIDSourceAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getLegSecurityIDSourceAsString(); + + for (const auto c : s) + { + switch (c) + { + case '"': oss << "\\\""; break; + case '\\': oss << "\\\\"; break; + case '\b': oss << "\\b"; break; + case '\f': oss << "\\f"; break; + case '\n': oss << "\\n"; break; + case '\r': oss << "\\r"; break; + case '\t': oss << "\\t"; break; + + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } + } + } + + return oss.str(); + } + + SBE_NODISCARD static const char *LegSideMetaAttribute(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 legSideId() SBE_NOEXCEPT + { + return 624; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legSideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legSideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legSideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingOffset() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legSideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD LegSide::Value legSide() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint8_t)); + return LegSide::get((val)); + } + + NoLegs &legSide(const LegSide::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *LegRatioQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legRatioQtyId() SBE_NOEXCEPT + { + return 623; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legRatioQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legRatioQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legRatioQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legRatioQtyEncodingOffset() SBE_NOEXCEPT + { + return 5; + } + + static SBE_CONSTEXPR std::int8_t legRatioQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t legRatioQtyMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t legRatioQtyMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t legRatioQtyEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t legRatioQty() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 5, sizeof(std::int8_t)); + return (val); + } + + NoLegs &legRatioQty(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 5, &val, sizeof(std::int8_t)); + return *this; + } + + SBE_NODISCARD static const char *LegPriceMetaAttribute(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 legPriceId() SBE_NOEXCEPT + { + return 566; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legPriceSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool legPriceInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legPriceSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legPriceEncodingOffset() SBE_NOEXCEPT + { + return 6; + } + +private: + PRICENULL9 m_legPrice; + +public: + SBE_NODISCARD PRICENULL9 &legPrice() + { + m_legPrice.wrap(m_buffer, m_offset + 6, m_actingVersion, m_bufferLength); + return m_legPrice; + } + + SBE_NODISCARD static const char *LegOptionDeltaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t legOptionDeltaId() SBE_NOEXCEPT + { + return 1017; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t legOptionDeltaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool legOptionDeltaInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= legOptionDeltaSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t legOptionDeltaEncodingOffset() SBE_NOEXCEPT + { + return 14; + } + +private: + DecimalQty m_legOptionDelta; + +public: + SBE_NODISCARD DecimalQty &legOptionDelta() + { + m_legOptionDelta.wrap(m_buffer, m_offset + 14, m_actingVersion, m_bufferLength); + return m_legOptionDelta; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoLegs writer) + { + builder << '{'; + builder << R"("LegSecurityID": )"; + builder << +writer.legSecurityID(); + + builder << ", "; + builder << R"("LegSide": )"; + builder << '"' << writer.legSide() << '"'; + + builder << ", "; + builder << R"("LegRatioQty": )"; + builder << +writer.legRatioQty(); + + builder << ", "; + builder << R"("LegPrice": )"; + builder << writer.legPrice(); + + builder << ", "; + builder << R"("LegOptionDelta": )"; + builder << writer.legOptionDelta(); + + 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: + NoLegs m_noLegs; + +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoLegsId() SBE_NOEXCEPT + { + return 555; + } + + SBE_NODISCARD inline NoLegs &noLegs() + { + m_noLegs.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + NoLegs &noLegsCount(const std::uint8_t count) + { + m_noLegs.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noLegs; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noLegsSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool noLegsInActingVersion() const SBE_NOEXCEPT + { +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-compare" +#endif + return m_actingVersion >= noLegsSinceVersion(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MDInstrumentDefinitionSpread56 _writer) +{ + MDInstrumentDefinitionSpread56 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "MDInstrumentDefinitionSpread56", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); + + builder << ", "; + builder << R"("TotNumReports": )"; + builder << +writer.totNumReports(); + + builder << ", "; + builder << R"("SecurityUpdateAction": )"; + builder << '"' << writer.securityUpdateAction() << '"'; + + builder << ", "; + builder << R"("LastUpdateTime": )"; + builder << +writer.lastUpdateTime(); + + builder << ", "; + builder << R"("MDSecurityTradingStatus": )"; + builder << '"' << writer.mDSecurityTradingStatus() << '"'; + + builder << ", "; + builder << R"("ApplID": )"; + builder << +writer.applID(); + + builder << ", "; + builder << R"("MarketSegmentID": )"; + builder << +writer.marketSegmentID(); + + builder << ", "; + builder << R"("UnderlyingProduct": )"; + builder << +writer.underlyingProduct(); + + builder << ", "; + builder << R"("SecurityExchange": )"; + builder << '"' << + writer.getSecurityExchangeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Asset": )"; + builder << '"' << + writer.getAssetAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("Symbol": )"; + builder << '"' << + writer.getSymbolAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("SecurityType": )"; + builder << '"' << + writer.getSecurityTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("CFICode": )"; + builder << '"' << + writer.getCFICodeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("MaturityMonthYear": )"; + builder << writer.maturityMonthYear(); + + builder << ", "; + builder << R"("Currency": )"; + builder << '"' << + writer.getCurrencyAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecuritySubType": )"; + builder << '"' << + writer.getSecuritySubTypeAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("UserDefinedInstrument": )"; + if (std::isprint(writer.userDefinedInstrument())) + { + builder << '"' << (char)writer.userDefinedInstrument() << '"'; + } + else + { + builder << (int)writer.userDefinedInstrument(); + } + + builder << ", "; + builder << R"("MatchAlgorithm": )"; + if (std::isprint(writer.matchAlgorithm())) + { + builder << '"' << (char)writer.matchAlgorithm() << '"'; + } + else + { + builder << (int)writer.matchAlgorithm(); + } + + builder << ", "; + builder << R"("MinTradeVol": )"; + builder << +writer.minTradeVol(); + + builder << ", "; + builder << R"("MaxTradeVol": )"; + builder << +writer.maxTradeVol(); + + builder << ", "; + builder << R"("MinPriceIncrement": )"; + builder << writer.minPriceIncrement(); + + builder << ", "; + builder << R"("DisplayFactor": )"; + builder << writer.displayFactor(); + + builder << ", "; + builder << R"("PriceDisplayFormat": )"; + builder << +writer.priceDisplayFormat(); + + builder << ", "; + builder << R"("PriceRatio": )"; + builder << writer.priceRatio(); + + builder << ", "; + builder << R"("TickRule": )"; + builder << +writer.tickRule(); + + builder << ", "; + builder << R"("UnitOfMeasure": )"; + builder << '"' << + writer.getUnitOfMeasureAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("TradingReferencePrice": )"; + builder << writer.tradingReferencePrice(); + + builder << ", "; + builder << R"("SettlPriceType": )"; + builder << writer.settlPriceType(); + + builder << ", "; + builder << R"("OpenInterestQty": )"; + builder << +writer.openInterestQty(); + + builder << ", "; + builder << R"("ClearedVolume": )"; + builder << +writer.clearedVolume(); + + builder << ", "; + builder << R"("HighLimitPrice": )"; + builder << writer.highLimitPrice(); + + builder << ", "; + builder << R"("LowLimitPrice": )"; + builder << writer.lowLimitPrice(); + + builder << ", "; + builder << R"("MaxPriceVariation": )"; + builder << writer.maxPriceVariation(); + + builder << ", "; + builder << R"("MainFraction": )"; + builder << +writer.mainFraction(); + + builder << ", "; + builder << R"("SubFraction": )"; + builder << +writer.subFraction(); + + builder << ", "; + builder << R"("TradingReferenceDate": )"; + builder << +writer.tradingReferenceDate(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoEvents": [)"; + writer.noEvents().forEach([&](NoEvents& noEvents) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noEvents; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDFeedTypes": [)"; - writer.noMDFeedTypes().forEach([&](NoMDFeedTypes &noMDFeedTypes) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDFeedTypes": [)"; + writer.noMDFeedTypes().forEach([&](NoMDFeedTypes& noMDFeedTypes) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDFeedTypes; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoInstAttrib": [)"; - writer.noInstAttrib().forEach([&](NoInstAttrib &noInstAttrib) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoInstAttrib": [)"; + writer.noInstAttrib().forEach([&](NoInstAttrib& noInstAttrib) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noInstAttrib; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoLotTypeRules": [)"; - writer.noLotTypeRules().forEach([&](NoLotTypeRules &noLotTypeRules) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoLotTypeRules": [)"; + writer.noLotTypeRules().forEach([&](NoLotTypeRules& noLotTypeRules) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noLotTypeRules; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoLegs": [)"; - writer.noLegs().forEach([&](NoLegs &noLegs) { - if (atLeastOne) { - builder << ", "; + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoLegs": [)"; + writer.noLegs().forEach([&](NoLegs& noLegs) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noLegs; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noEvents().forEach([](NoEvents e) + { + e.skip(); + }); + noMDFeedTypes().forEach([](NoMDFeedTypes e) + { + e.skip(); + }); + noInstAttrib().forEach([](NoInstAttrib e) + { + e.skip(); + }); + noLotTypeRules().forEach([](NoLotTypeRules e) + { + e.skip(); + }); + noLegs().forEach([](NoLegs e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength( + std::size_t noEventsLength = 0, + std::size_t noMDFeedTypesLength = 0, + std::size_t noInstAttribLength = 0, + std::size_t noLotTypeRulesLength = 0, + std::size_t noLegsLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoEvents::sbeHeaderSize(); + if (noEventsLength > 254LL) + { + throw std::runtime_error("noEventsLength outside of allowed range [E110]"); + } + length += noEventsLength *NoEvents::sbeBlockLength(); + + length += NoMDFeedTypes::sbeHeaderSize(); + if (noMDFeedTypesLength > 254LL) + { + throw std::runtime_error("noMDFeedTypesLength outside of allowed range [E110]"); + } + length += noMDFeedTypesLength *NoMDFeedTypes::sbeBlockLength(); + + length += NoInstAttrib::sbeHeaderSize(); + if (noInstAttribLength > 254LL) + { + throw std::runtime_error("noInstAttribLength outside of allowed range [E110]"); + } + length += noInstAttribLength *NoInstAttrib::sbeBlockLength(); + + length += NoLotTypeRules::sbeHeaderSize(); + if (noLotTypeRulesLength > 254LL) + { + throw std::runtime_error("noLotTypeRulesLength outside of allowed range [E110]"); + } + length += noLotTypeRulesLength *NoLotTypeRules::sbeBlockLength(); + + length += NoLegs::sbeHeaderSize(); + if (noLegsLength > 254LL) + { + throw std::runtime_error("noLegsLength outside of allowed range [E110]"); + } + length += noLegsLength *NoLegs::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDUpdateAction.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDUpdateAction.h index 922c38d04..84fb6928a 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MDUpdateAction.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MDUpdateAction.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,69 +86,63 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class MDUpdateAction { - public: - enum Value { - New = (std::uint8_t)0, - Change = (std::uint8_t)1, - Delete = (std::uint8_t)2, - DeleteThru = (std::uint8_t)3, - DeleteFrom = (std::uint8_t)4, - Overlay = (std::uint8_t)5, - NULL_VALUE = (std::uint8_t)255 - }; +class MDUpdateAction +{ +public: + enum Value + { + New = static_cast(0), + Change = static_cast(1), + Delete = static_cast(2), + DeleteThru = static_cast(3), + DeleteFrom = static_cast(4), + Overlay = static_cast(5), + NULL_VALUE = static_cast(255) + }; - static MDUpdateAction::Value get(const std::uint8_t value) { - switch (value) { - case 0: - return New; - case 1: - return Change; - case 2: - return Delete; - case 3: - return DeleteThru; - case 4: - return DeleteFrom; - case 5: - return Overlay; - case 255: - return NULL_VALUE; - } + static MDUpdateAction::Value get(const std::uint8_t value) + { + switch (value) + { + case static_cast(0): return New; + case static_cast(1): return Change; + case static_cast(2): return Delete; + case static_cast(3): return DeleteThru; + case static_cast(4): return DeleteFrom; + case static_cast(5): return Overlay; + case static_cast(255): return NULL_VALUE; + } - throw std::runtime_error("unknown value for enum MDUpdateAction [E103]"); - } + throw std::runtime_error("unknown value for enum MDUpdateAction [E103]"); + } - static const char *c_str(const MDUpdateAction::Value value) { - switch (value) { - case New: - return "New"; - case Change: - return "Change"; - case Delete: - return "Delete"; - case DeleteThru: - return "DeleteThru"; - case DeleteFrom: - return "DeleteFrom"; - case Overlay: - return "Overlay"; - case NULL_VALUE: - return "NULL_VALUE"; - } + static const char *c_str(const MDUpdateAction::Value value) + { + switch (value) + { + case New: return "New"; + case Change: return "Change"; + case Delete: return "Delete"; + case DeleteThru: return "DeleteThru"; + case DeleteFrom: return "DeleteFrom"; + case Overlay: return "Overlay"; + case NULL_VALUE: return "NULL_VALUE"; + } - throw std::runtime_error("unknown value for enum MDUpdateAction [E103]:"); - } + throw std::runtime_error("unknown value for enum MDUpdateAction [E103]:"); + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &os, MDUpdateAction::Value m) { - return os << MDUpdateAction::c_str(m); - } + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, MDUpdateAction::Value m) + { + return os << MDUpdateAction::c_str(m); + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MatchEventIndicator.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MatchEventIndicator.h index 821a68b73..3026be6af 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MatchEventIndicator.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MatchEventIndicator.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,373 +86,428 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class MatchEventIndicator { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_actingVersion = 0; +class MatchEventIndicator +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MatchEventIndicator() = default; + MatchEventIndicator() = default; - MatchEventIndicator( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_actingVersion(actingVersion) { - if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 1) > m_bufferLength), false)) { - throw std::runtime_error("buffer too short for flyweight [E107]"); - } - } + MatchEventIndicator( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 1) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } - MatchEventIndicator( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : MatchEventIndicator(buffer, 0, bufferLength, actingVersion) {} + MatchEventIndicator( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + MatchEventIndicator(buffer, 0, bufferLength, actingVersion) + { + } - MatchEventIndicator(char *buffer, const std::uint64_t bufferLength) - : MatchEventIndicator(buffer, 0, bufferLength, sbeSchemaVersion()) {} + MatchEventIndicator( + char *buffer, + const std::uint64_t bufferLength) : + MatchEventIndicator(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } - MatchEventIndicator &wrap( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MatchEventIndicator( - buffer, offset, bufferLength, actingVersion); - } + MatchEventIndicator &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MatchEventIndicator(buffer, offset, bufferLength, actingVersion); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - encodedLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - MatchEventIndicator &clear() { - std::uint8_t zero = 0; - std::memcpy(m_buffer + m_offset, &zero, sizeof(std::uint8_t)); - return *this; - } + MatchEventIndicator &clear() + { + std::uint8_t zero = 0; + std::memcpy(m_buffer + m_offset, &zero, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD bool isEmpty() const { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return 0 == val; - } + SBE_NODISCARD bool isEmpty() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return 0 == val; + } - SBE_NODISCARD std::uint8_t rawValue() const { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return val; - } + SBE_NODISCARD std::uint8_t rawValue() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return val; + } - MatchEventIndicator &rawValue(std::uint8_t value) { - std::memcpy(m_buffer + m_offset, &value, sizeof(std::uint8_t)); - return *this; - } + MatchEventIndicator &rawValue(std::uint8_t value) + { + std::memcpy(m_buffer + m_offset, &value, sizeof(std::uint8_t)); + return *this; + } - static bool lastTradeMsg(const std::uint8_t bits) { - return (bits & (1u << 0u)) != 0; - } + static bool lastTradeMsg(const std::uint8_t bits) + { + return (bits & (static_cast(1) << 0u)) != 0; + } - static std::uint8_t lastTradeMsg(const std::uint8_t bits, const bool value) { - return value ? static_cast(bits | (1u << 0u)) - : static_cast(bits & ~(1u << 0u)); - } + static std::uint8_t lastTradeMsg(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (static_cast(1) << 0u)) : static_cast(bits & ~(static_cast(1) << 0u)); + } - SBE_NODISCARD bool lastTradeMsg() const { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return ((val) & (1u << 0u)) != 0; - } + SBE_NODISCARD bool lastTradeMsg() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (static_cast(1) << 0u)) != 0; + } - MatchEventIndicator &lastTradeMsg(const bool value) { - std::uint8_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); - bits = - (value ? static_cast((bits) | (1u << 0u)) - : static_cast((bits) & ~(1u << 0u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); - return *this; - } + MatchEventIndicator &lastTradeMsg(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (static_cast(1) << 0u)) : static_cast((bits) & ~(static_cast(1) << 0u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } - static bool lastVolumeMsg(const std::uint8_t bits) { - return (bits & (1u << 1u)) != 0; - } + static bool lastVolumeMsg(const std::uint8_t bits) + { + return (bits & (static_cast(1) << 1u)) != 0; + } - static std::uint8_t - lastVolumeMsg(const std::uint8_t bits, const bool value) { - return value ? static_cast(bits | (1u << 1u)) - : static_cast(bits & ~(1u << 1u)); - } + static std::uint8_t lastVolumeMsg(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (static_cast(1) << 1u)) : static_cast(bits & ~(static_cast(1) << 1u)); + } - SBE_NODISCARD bool lastVolumeMsg() const { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return ((val) & (1u << 1u)) != 0; - } + SBE_NODISCARD bool lastVolumeMsg() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (static_cast(1) << 1u)) != 0; + } - MatchEventIndicator &lastVolumeMsg(const bool value) { - std::uint8_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); - bits = - (value ? static_cast((bits) | (1u << 1u)) - : static_cast((bits) & ~(1u << 1u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); - return *this; - } + MatchEventIndicator &lastVolumeMsg(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (static_cast(1) << 1u)) : static_cast((bits) & ~(static_cast(1) << 1u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } - static bool lastQuoteMsg(const std::uint8_t bits) { - return (bits & (1u << 2u)) != 0; - } + static bool lastQuoteMsg(const std::uint8_t bits) + { + return (bits & (static_cast(1) << 2u)) != 0; + } - static std::uint8_t lastQuoteMsg(const std::uint8_t bits, const bool value) { - return value ? static_cast(bits | (1u << 2u)) - : static_cast(bits & ~(1u << 2u)); - } + static std::uint8_t lastQuoteMsg(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (static_cast(1) << 2u)) : static_cast(bits & ~(static_cast(1) << 2u)); + } - SBE_NODISCARD bool lastQuoteMsg() const { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return ((val) & (1u << 2u)) != 0; - } + SBE_NODISCARD bool lastQuoteMsg() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (static_cast(1) << 2u)) != 0; + } - MatchEventIndicator &lastQuoteMsg(const bool value) { - std::uint8_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); - bits = - (value ? static_cast((bits) | (1u << 2u)) - : static_cast((bits) & ~(1u << 2u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); - return *this; - } + MatchEventIndicator &lastQuoteMsg(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (static_cast(1) << 2u)) : static_cast((bits) & ~(static_cast(1) << 2u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } - static bool lastStatsMsg(const std::uint8_t bits) { - return (bits & (1u << 3u)) != 0; - } + static bool lastStatsMsg(const std::uint8_t bits) + { + return (bits & (static_cast(1) << 3u)) != 0; + } - static std::uint8_t lastStatsMsg(const std::uint8_t bits, const bool value) { - return value ? static_cast(bits | (1u << 3u)) - : static_cast(bits & ~(1u << 3u)); - } + static std::uint8_t lastStatsMsg(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (static_cast(1) << 3u)) : static_cast(bits & ~(static_cast(1) << 3u)); + } - SBE_NODISCARD bool lastStatsMsg() const { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return ((val) & (1u << 3u)) != 0; - } + SBE_NODISCARD bool lastStatsMsg() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (static_cast(1) << 3u)) != 0; + } - MatchEventIndicator &lastStatsMsg(const bool value) { - std::uint8_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); - bits = - (value ? static_cast((bits) | (1u << 3u)) - : static_cast((bits) & ~(1u << 3u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); - return *this; - } + MatchEventIndicator &lastStatsMsg(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (static_cast(1) << 3u)) : static_cast((bits) & ~(static_cast(1) << 3u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } - static bool lastImpliedMsg(const std::uint8_t bits) { - return (bits & (1u << 4u)) != 0; - } + static bool lastImpliedMsg(const std::uint8_t bits) + { + return (bits & (static_cast(1) << 4u)) != 0; + } - static std::uint8_t - lastImpliedMsg(const std::uint8_t bits, const bool value) { - return value ? static_cast(bits | (1u << 4u)) - : static_cast(bits & ~(1u << 4u)); - } + static std::uint8_t lastImpliedMsg(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (static_cast(1) << 4u)) : static_cast(bits & ~(static_cast(1) << 4u)); + } - SBE_NODISCARD bool lastImpliedMsg() const { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return ((val) & (1u << 4u)) != 0; - } + SBE_NODISCARD bool lastImpliedMsg() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (static_cast(1) << 4u)) != 0; + } - MatchEventIndicator &lastImpliedMsg(const bool value) { - std::uint8_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); - bits = - (value ? static_cast((bits) | (1u << 4u)) - : static_cast((bits) & ~(1u << 4u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); - return *this; - } + MatchEventIndicator &lastImpliedMsg(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (static_cast(1) << 4u)) : static_cast((bits) & ~(static_cast(1) << 4u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } - static bool recoveryMsg(const std::uint8_t bits) { - return (bits & (1u << 5u)) != 0; - } + static bool recoveryMsg(const std::uint8_t bits) + { + return (bits & (static_cast(1) << 5u)) != 0; + } - static std::uint8_t recoveryMsg(const std::uint8_t bits, const bool value) { - return value ? static_cast(bits | (1u << 5u)) - : static_cast(bits & ~(1u << 5u)); - } + static std::uint8_t recoveryMsg(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (static_cast(1) << 5u)) : static_cast(bits & ~(static_cast(1) << 5u)); + } - SBE_NODISCARD bool recoveryMsg() const { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return ((val) & (1u << 5u)) != 0; - } + SBE_NODISCARD bool recoveryMsg() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (static_cast(1) << 5u)) != 0; + } - MatchEventIndicator &recoveryMsg(const bool value) { - std::uint8_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); - bits = - (value ? static_cast((bits) | (1u << 5u)) - : static_cast((bits) & ~(1u << 5u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); - return *this; - } + MatchEventIndicator &recoveryMsg(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (static_cast(1) << 5u)) : static_cast((bits) & ~(static_cast(1) << 5u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } - static bool reserved(const std::uint8_t bits) { - return (bits & (1u << 6u)) != 0; - } + static bool reserved(const std::uint8_t bits) + { + return (bits & (static_cast(1) << 6u)) != 0; + } - static std::uint8_t reserved(const std::uint8_t bits, const bool value) { - return value ? static_cast(bits | (1u << 6u)) - : static_cast(bits & ~(1u << 6u)); - } + static std::uint8_t reserved(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (static_cast(1) << 6u)) : static_cast(bits & ~(static_cast(1) << 6u)); + } - SBE_NODISCARD bool reserved() const { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return ((val) & (1u << 6u)) != 0; - } + SBE_NODISCARD bool reserved() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (static_cast(1) << 6u)) != 0; + } - MatchEventIndicator &reserved(const bool value) { - std::uint8_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); - bits = - (value ? static_cast((bits) | (1u << 6u)) - : static_cast((bits) & ~(1u << 6u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); - return *this; - } + MatchEventIndicator &reserved(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (static_cast(1) << 6u)) : static_cast((bits) & ~(static_cast(1) << 6u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } - static bool endOfEvent(const std::uint8_t bits) { - return (bits & (1u << 7u)) != 0; - } + static bool endOfEvent(const std::uint8_t bits) + { + return (bits & (static_cast(1) << 7u)) != 0; + } - static std::uint8_t endOfEvent(const std::uint8_t bits, const bool value) { - return value ? static_cast(bits | (1u << 7u)) - : static_cast(bits & ~(1u << 7u)); - } + static std::uint8_t endOfEvent(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (static_cast(1) << 7u)) : static_cast(bits & ~(static_cast(1) << 7u)); + } - SBE_NODISCARD bool endOfEvent() const { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return ((val) & (1u << 7u)) != 0; - } + SBE_NODISCARD bool endOfEvent() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (static_cast(1) << 7u)) != 0; + } - MatchEventIndicator &endOfEvent(const bool value) { - std::uint8_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); - bits = - (value ? static_cast((bits) | (1u << 7u)) - : static_cast((bits) & ~(1u << 7u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); - return *this; - } + MatchEventIndicator &endOfEvent(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (static_cast(1) << 7u)) : static_cast((bits) & ~(static_cast(1) << 7u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, MatchEventIndicator writer) { - builder << '['; - bool atLeastOne = false; - if (writer.lastTradeMsg()) { - builder << R"("lastTradeMsg")"; - atLeastOne = true; - } - if (writer.lastVolumeMsg()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("lastVolumeMsg")"; - atLeastOne = true; - } - if (writer.lastQuoteMsg()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("lastQuoteMsg")"; - atLeastOne = true; - } - if (writer.lastStatsMsg()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("lastStatsMsg")"; - atLeastOne = true; - } - if (writer.lastImpliedMsg()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("lastImpliedMsg")"; - atLeastOne = true; - } - if (writer.recoveryMsg()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("recoveryMsg")"; - atLeastOne = true; - } - if (writer.reserved()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("reserved")"; - atLeastOne = true; - } - if (writer.endOfEvent()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("endOfEvent")"; - } - builder << ']'; - return builder; - } + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MatchEventIndicator writer) + { + builder << '['; + bool atLeastOne = false; + if (writer.lastTradeMsg()) + { + builder << R"("lastTradeMsg")"; + atLeastOne = true; + } + if (writer.lastVolumeMsg()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("lastVolumeMsg")"; + atLeastOne = true; + } + if (writer.lastQuoteMsg()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("lastQuoteMsg")"; + atLeastOne = true; + } + if (writer.lastStatsMsg()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("lastStatsMsg")"; + atLeastOne = true; + } + if (writer.lastImpliedMsg()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("lastImpliedMsg")"; + atLeastOne = true; + } + if (writer.recoveryMsg()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("recoveryMsg")"; + atLeastOne = true; + } + if (writer.reserved()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("reserved")"; + atLeastOne = true; + } + if (writer.endOfEvent()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("endOfEvent")"; + } + builder << ']'; + return builder; + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MaturityMonthYear.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MaturityMonthYear.h index 72c38ffb0..9cdb5733d 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MaturityMonthYear.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MaturityMonthYear.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,349 +86,424 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class MaturityMonthYear { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_actingVersion = 0; +class MaturityMonthYear +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MaturityMonthYear() = default; + MaturityMonthYear() = default; - MaturityMonthYear( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_actingVersion(actingVersion) { - if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 5) > m_bufferLength), false)) { - throw std::runtime_error("buffer too short for flyweight [E107]"); - } - } + MaturityMonthYear( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 5) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } - MaturityMonthYear( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : MaturityMonthYear(buffer, 0, bufferLength, actingVersion) {} + MaturityMonthYear( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + MaturityMonthYear(buffer, 0, bufferLength, actingVersion) + { + } - MaturityMonthYear(char *buffer, const std::uint64_t bufferLength) - : MaturityMonthYear(buffer, 0, bufferLength, sbeSchemaVersion()) {} + MaturityMonthYear( + char *buffer, + const std::uint64_t bufferLength) : + MaturityMonthYear(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } - MaturityMonthYear &wrap( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = - MaturityMonthYear(buffer, offset, bufferLength, actingVersion); - } + MaturityMonthYear &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MaturityMonthYear(buffer, offset, bufferLength, actingVersion); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - encodedLength() SBE_NOEXCEPT { - return 5; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 5; + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SBE_NODISCARD static const char * - yearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *yearMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - yearSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t yearId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool yearInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t yearSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool yearInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= yearSinceVersion(); + return m_actingVersion >= yearSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - yearEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t yearEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint16_t yearNullValue() SBE_NOEXCEPT { - return (std::uint16_t)65535; - } + static SBE_CONSTEXPR std::uint16_t yearNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } - static SBE_CONSTEXPR std::uint16_t yearMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t yearMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t yearMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t yearMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t yearEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t yearEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t year() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::uint16_t year() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MaturityMonthYear &year(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint16_t)); - return *this; - } + MaturityMonthYear &year(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint16_t)); + return *this; + } - SBE_NODISCARD static const char * - monthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *monthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - monthSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t monthId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool monthInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t monthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool monthInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= monthSinceVersion(); + return m_actingVersion >= monthSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - monthEncodingOffset() SBE_NOEXCEPT { - return 2; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t monthEncodingOffset() SBE_NOEXCEPT + { + return 2; + } - static SBE_CONSTEXPR std::uint8_t monthNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t monthNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t monthMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t monthMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t monthMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t monthMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t monthEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t monthEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t month() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 2, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t month() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 2, sizeof(std::uint8_t)); + return (val); + } - MaturityMonthYear &month(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 2, &val, sizeof(std::uint8_t)); - return *this; - } + MaturityMonthYear &month(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 2, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - dayMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *dayMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - daySinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t dayId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool dayInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t daySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool dayInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= daySinceVersion(); + return m_actingVersion >= daySinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - dayEncodingOffset() SBE_NOEXCEPT { - return 3; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t dayEncodingOffset() SBE_NOEXCEPT + { + return 3; + } - static SBE_CONSTEXPR std::uint8_t dayNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t dayNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t dayMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t dayMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t dayMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t dayMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t dayEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t dayEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t day() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 3, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t day() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 3, sizeof(std::uint8_t)); + return (val); + } - MaturityMonthYear &day(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 3, &val, sizeof(std::uint8_t)); - return *this; - } + MaturityMonthYear &day(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 3, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - weekMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *weekMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - weekSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t weekId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool weekInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t weekSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool weekInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= weekSinceVersion(); + return m_actingVersion >= weekSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - weekEncodingOffset() SBE_NOEXCEPT { - return 4; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t weekEncodingOffset() SBE_NOEXCEPT + { + return 4; + } - static SBE_CONSTEXPR std::uint8_t weekNullValue() SBE_NOEXCEPT { - return (std::uint8_t)255; - } + static SBE_CONSTEXPR std::uint8_t weekNullValue() SBE_NOEXCEPT + { + return static_cast(255); + } - static SBE_CONSTEXPR std::uint8_t weekMinValue() SBE_NOEXCEPT { - return (std::uint8_t)0; - } + static SBE_CONSTEXPR std::uint8_t weekMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint8_t weekMaxValue() SBE_NOEXCEPT { - return (std::uint8_t)254; - } + static SBE_CONSTEXPR std::uint8_t weekMaxValue() SBE_NOEXCEPT + { + return static_cast(254); + } - static SBE_CONSTEXPR std::size_t weekEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t weekEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint8_t week() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint8_t)); - return (val); - } + SBE_NODISCARD std::uint8_t week() const SBE_NOEXCEPT + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint8_t)); + return (val); + } - MaturityMonthYear &week(const std::uint8_t value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint8_t)); - return *this; - } + MaturityMonthYear &week(const std::uint8_t value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint8_t)); + return *this; + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, MaturityMonthYear writer) { - builder << '{'; - builder << R"("year": )"; - builder << +writer.year(); +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MaturityMonthYear writer) +{ + builder << '{'; + builder << R"("year": )"; + builder << +writer.year(); - builder << ", "; - builder << R"("month": )"; - builder << +writer.month(); + builder << ", "; + builder << R"("month": )"; + builder << +writer.month(); - builder << ", "; - builder << R"("day": )"; - builder << +writer.day(); + builder << ", "; + builder << R"("day": )"; + builder << +writer.day(); - builder << ", "; - builder << R"("week": )"; - builder << +writer.week(); + builder << ", "; + builder << R"("week": )"; + builder << +writer.week(); - builder << '}'; + builder << '}'; + + return builder; +} - return builder; - } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/MessageHeader.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/MessageHeader.h index 324faa08b..aa223e515 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/MessageHeader.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/MessageHeader.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,348 +86,424 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class MessageHeader { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_actingVersion = 0; +class MessageHeader +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - MessageHeader() = default; + MessageHeader() = default; - MessageHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_actingVersion(actingVersion) { - if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) { - throw std::runtime_error("buffer too short for flyweight [E107]"); - } - } + MessageHeader( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } - MessageHeader( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : MessageHeader(buffer, 0, bufferLength, actingVersion) {} + MessageHeader( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + MessageHeader(buffer, 0, bufferLength, actingVersion) + { + } - MessageHeader(char *buffer, const std::uint64_t bufferLength) - : MessageHeader(buffer, 0, bufferLength, sbeSchemaVersion()) {} + MessageHeader( + char *buffer, + const std::uint64_t bufferLength) : + MessageHeader(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } - MessageHeader &wrap( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = MessageHeader(buffer, offset, bufferLength, actingVersion); - } + MessageHeader &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = MessageHeader(buffer, offset, bufferLength, actingVersion); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - encodedLength() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SBE_NODISCARD static const char * - blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *blockLengthMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - blockLengthSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t blockLengthId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool blockLengthInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t blockLengthSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool blockLengthInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= blockLengthSinceVersion(); + return m_actingVersion >= blockLengthSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - blockLengthEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t blockLengthEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint16_t blockLengthNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT16; - } + static SBE_CONSTEXPR std::uint16_t blockLengthNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } - static SBE_CONSTEXPR std::uint16_t blockLengthMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t blockLengthMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t blockLengthMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t blockLengthMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t blockLengthEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t blockLengthEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t blockLength() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::uint16_t blockLength() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MessageHeader &blockLength(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint16_t)); - return *this; - } + MessageHeader &blockLength(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint16_t)); + return *this; + } - SBE_NODISCARD static const char * - templateIdMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *templateIdMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - templateIdSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t templateIdId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool templateIdInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t templateIdSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool templateIdInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= templateIdSinceVersion(); + return m_actingVersion >= templateIdSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - templateIdEncodingOffset() SBE_NOEXCEPT { - return 2; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t templateIdEncodingOffset() SBE_NOEXCEPT + { + return 2; + } - static SBE_CONSTEXPR std::uint16_t templateIdNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT16; - } + static SBE_CONSTEXPR std::uint16_t templateIdNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } - static SBE_CONSTEXPR std::uint16_t templateIdMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t templateIdMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t templateIdMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t templateIdMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t templateIdEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t templateIdEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t templateId() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 2, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::uint16_t templateId() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 2, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MessageHeader &templateId(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 2, &val, sizeof(std::uint16_t)); - return *this; - } + MessageHeader &templateId(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 2, &val, sizeof(std::uint16_t)); + return *this; + } - SBE_NODISCARD static const char * - schemaIdMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *schemaIdMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - schemaIdSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t schemaIdId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool schemaIdInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t schemaIdSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool schemaIdInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= schemaIdSinceVersion(); + return m_actingVersion >= schemaIdSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - schemaIdEncodingOffset() SBE_NOEXCEPT { - return 4; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t schemaIdEncodingOffset() SBE_NOEXCEPT + { + return 4; + } - static SBE_CONSTEXPR std::uint16_t schemaIdNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT16; - } + static SBE_CONSTEXPR std::uint16_t schemaIdNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } - static SBE_CONSTEXPR std::uint16_t schemaIdMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t schemaIdMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t schemaIdMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t schemaIdMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t schemaIdEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t schemaIdEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t schemaId() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::uint16_t schemaId() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MessageHeader &schemaId(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint16_t)); - return *this; - } + MessageHeader &schemaId(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint16_t)); + return *this; + } - SBE_NODISCARD static const char * - versionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *versionMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - versionSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t versionId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool versionInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t versionSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool versionInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= versionSinceVersion(); + return m_actingVersion >= versionSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - versionEncodingOffset() SBE_NOEXCEPT { - return 6; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t versionEncodingOffset() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint16_t versionNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT16; - } + static SBE_CONSTEXPR std::uint16_t versionNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT16; + } - static SBE_CONSTEXPR std::uint16_t versionMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t versionMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t versionMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t versionMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t versionEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t versionEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t version() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 6, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::uint16_t version() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 6, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - MessageHeader &version(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 6, &val, sizeof(std::uint16_t)); - return *this; - } + MessageHeader &version(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 6, &val, sizeof(std::uint16_t)); + return *this; + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, MessageHeader writer) { - builder << '{'; - builder << R"("blockLength": )"; - builder << +writer.blockLength(); +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, MessageHeader writer) +{ + builder << '{'; + builder << R"("blockLength": )"; + builder << +writer.blockLength(); - builder << ", "; - builder << R"("templateId": )"; - builder << +writer.templateId(); + builder << ", "; + builder << R"("templateId": )"; + builder << +writer.templateId(); - builder << ", "; - builder << R"("schemaId": )"; - builder << +writer.schemaId(); + builder << ", "; + builder << R"("schemaId": )"; + builder << +writer.schemaId(); - builder << ", "; - builder << R"("version": )"; - builder << +writer.version(); + builder << ", "; + builder << R"("version": )"; + builder << +writer.version(); - builder << '}'; + builder << '}'; + + return builder; +} - return builder; - } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/OpenCloseSettlFlag.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/OpenCloseSettlFlag.h index afcbb560d..26e68ef75 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/OpenCloseSettlFlag.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/OpenCloseSettlFlag.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,51 +86,51 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class OpenCloseSettlFlag { - public: - enum Value { - DailyOpenPrice = (std::uint8_t)0, - IndicativeOpeningPrice = (std::uint8_t)5, - NULL_VALUE = (std::uint8_t)255 - }; +class OpenCloseSettlFlag +{ +public: + enum Value + { + DailyOpenPrice = static_cast(0), + IndicativeOpeningPrice = static_cast(5), + NULL_VALUE = static_cast(255) + }; - static OpenCloseSettlFlag::Value get(const std::uint8_t value) { - switch (value) { - case 0: - return DailyOpenPrice; - case 5: - return IndicativeOpeningPrice; - case 255: - return NULL_VALUE; - } + static OpenCloseSettlFlag::Value get(const std::uint8_t value) + { + switch (value) + { + case static_cast(0): return DailyOpenPrice; + case static_cast(5): return IndicativeOpeningPrice; + case static_cast(255): return NULL_VALUE; + } - throw std::runtime_error( - "unknown value for enum OpenCloseSettlFlag [E103]"); - } + throw std::runtime_error("unknown value for enum OpenCloseSettlFlag [E103]"); + } - static const char *c_str(const OpenCloseSettlFlag::Value value) { - switch (value) { - case DailyOpenPrice: - return "DailyOpenPrice"; - case IndicativeOpeningPrice: - return "IndicativeOpeningPrice"; - case NULL_VALUE: - return "NULL_VALUE"; - } + static const char *c_str(const OpenCloseSettlFlag::Value value) + { + switch (value) + { + case DailyOpenPrice: return "DailyOpenPrice"; + case IndicativeOpeningPrice: return "IndicativeOpeningPrice"; + case NULL_VALUE: return "NULL_VALUE"; + } - throw std::runtime_error( - "unknown value for enum OpenCloseSettlFlag [E103]:"); - } + throw std::runtime_error("unknown value for enum OpenCloseSettlFlag [E103]:"); + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &os, OpenCloseSettlFlag::Value m) { - return os << OpenCloseSettlFlag::c_str(m); - } + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, OpenCloseSettlFlag::Value m) + { + return os << OpenCloseSettlFlag::c_str(m); + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/OrderUpdateAction.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/OrderUpdateAction.h index b58e74c94..48e32dd7e 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/OrderUpdateAction.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/OrderUpdateAction.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,56 +86,54 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class OrderUpdateAction { - public: - enum Value { - New = (std::uint8_t)0, - Update = (std::uint8_t)1, - Delete = (std::uint8_t)2, - NULL_VALUE = (std::uint8_t)255 - }; +class OrderUpdateAction +{ +public: + enum Value + { + New = static_cast(0), + Update = static_cast(1), + Delete = static_cast(2), + NULL_VALUE = static_cast(255) + }; - static OrderUpdateAction::Value get(const std::uint8_t value) { - switch (value) { - case 0: - return New; - case 1: - return Update; - case 2: - return Delete; - case 255: - return NULL_VALUE; - } + static OrderUpdateAction::Value get(const std::uint8_t value) + { + switch (value) + { + case static_cast(0): return New; + case static_cast(1): return Update; + case static_cast(2): return Delete; + case static_cast(255): return NULL_VALUE; + } - throw std::runtime_error( - "unknown value for enum OrderUpdateAction [E103]"); - } + throw std::runtime_error("unknown value for enum OrderUpdateAction [E103]"); + } - static const char *c_str(const OrderUpdateAction::Value value) { - switch (value) { - case New: - return "New"; - case Update: - return "Update"; - case Delete: - return "Delete"; - case NULL_VALUE: - return "NULL_VALUE"; - } + static const char *c_str(const OrderUpdateAction::Value value) + { + switch (value) + { + case New: return "New"; + case Update: return "Update"; + case Delete: return "Delete"; + case NULL_VALUE: return "NULL_VALUE"; + } - throw std::runtime_error( - "unknown value for enum OrderUpdateAction [E103]:"); - } + throw std::runtime_error("unknown value for enum OrderUpdateAction [E103]:"); + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &os, OrderUpdateAction::Value m) { - return os << OrderUpdateAction::c_str(m); - } + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, OrderUpdateAction::Value m) + { + return os << OrderUpdateAction::c_str(m); + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/PRICE.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/PRICE.h index e950f28ac..512d1a6c6 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/PRICE.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/PRICE.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,210 +86,263 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class PRICE { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_actingVersion = 0; +class PRICE +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - PRICE() = default; + PRICE() = default; - PRICE( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_actingVersion(actingVersion) { - if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) { - throw std::runtime_error("buffer too short for flyweight [E107]"); - } - } + PRICE( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } - PRICE( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : PRICE(buffer, 0, bufferLength, actingVersion) {} + PRICE( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + PRICE(buffer, 0, bufferLength, actingVersion) + { + } - PRICE(char *buffer, const std::uint64_t bufferLength) - : PRICE(buffer, 0, bufferLength, sbeSchemaVersion()) {} + PRICE( + char *buffer, + const std::uint64_t bufferLength) : + PRICE(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } - PRICE &wrap( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = PRICE(buffer, offset, bufferLength, actingVersion); - } + PRICE &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = PRICE(buffer, offset, bufferLength, actingVersion); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - encodedLength() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SBE_NODISCARD static const char * - mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mantissaSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t mantissaId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mantissaSinceVersion(); + return m_actingVersion >= mantissaSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mantissaEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mantissaEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT64; - } + static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT64; + } - static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT { - return -9223372036854775807L; - } + static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT + { + return INT64_C(-9223372036854775807); + } - static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT { - return 9223372036854775807L; - } + static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT + { + return INT64_C(9223372036854775807); + } - static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT { - std::int64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT + { + std::int64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - PRICE &mantissa(const std::int64_t value) SBE_NOEXCEPT { - std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); - return *this; - } + PRICE &mantissa(const std::int64_t value) SBE_NOEXCEPT + { + std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); + return *this; + } - SBE_NODISCARD static const char * - exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } + SBE_NODISCARD static const char *exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - exponentSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t exponentId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= exponentSinceVersion(); + return m_actingVersion >= exponentSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - exponentEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exponentEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } + static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } - static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT { - return (std::int8_t)-7; - } + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT + { + return static_cast(-7); + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &builder, PRICE writer) { - builder << '{'; - builder << R"("mantissa": )"; - builder << +writer.mantissa(); +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, PRICE writer) +{ + builder << '{'; + builder << R"("mantissa": )"; + builder << +writer.mantissa(); - builder << '}'; + builder << '}'; + + return builder; +} - return builder; - } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/PRICE9.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/PRICE9.h index 67938cc33..887ad2678 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/PRICE9.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/PRICE9.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,210 +86,263 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class PRICE9 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_actingVersion = 0; +class PRICE9 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - PRICE9() = default; + PRICE9() = default; - PRICE9( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_actingVersion(actingVersion) { - if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) { - throw std::runtime_error("buffer too short for flyweight [E107]"); - } - } + PRICE9( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } - PRICE9( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : PRICE9(buffer, 0, bufferLength, actingVersion) {} + PRICE9( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + PRICE9(buffer, 0, bufferLength, actingVersion) + { + } - PRICE9(char *buffer, const std::uint64_t bufferLength) - : PRICE9(buffer, 0, bufferLength, sbeSchemaVersion()) {} + PRICE9( + char *buffer, + const std::uint64_t bufferLength) : + PRICE9(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } - PRICE9 &wrap( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = PRICE9(buffer, offset, bufferLength, actingVersion); - } + PRICE9 &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = PRICE9(buffer, offset, bufferLength, actingVersion); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - encodedLength() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SBE_NODISCARD static const char * - mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mantissaSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t mantissaId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mantissaSinceVersion(); + return m_actingVersion >= mantissaSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mantissaEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mantissaEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT64; - } + static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT64; + } - static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT { - return -9223372036854775807L; - } + static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT + { + return INT64_C(-9223372036854775807); + } - static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT { - return 9223372036854775807L; - } + static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT + { + return INT64_C(9223372036854775807); + } - static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT { - std::int64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT + { + std::int64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - PRICE9 &mantissa(const std::int64_t value) SBE_NOEXCEPT { - std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); - return *this; - } + PRICE9 &mantissa(const std::int64_t value) SBE_NOEXCEPT + { + std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); + return *this; + } - SBE_NODISCARD static const char * - exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } + SBE_NODISCARD static const char *exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - exponentSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t exponentId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= exponentSinceVersion(); + return m_actingVersion >= exponentSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - exponentEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exponentEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } + static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } - static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT { - return (std::int8_t)-9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT + { + return static_cast(-9); + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &builder, PRICE9 writer) { - builder << '{'; - builder << R"("mantissa": )"; - builder << +writer.mantissa(); +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, PRICE9 writer) +{ + builder << '{'; + builder << R"("mantissa": )"; + builder << +writer.mantissa(); - builder << '}'; + builder << '}'; + + return builder; +} - return builder; - } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/PRICENULL.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/PRICENULL.h index 4cd93e979..8d659ca3c 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/PRICENULL.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/PRICENULL.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,210 +86,263 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class PRICENULL { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_actingVersion = 0; +class PRICENULL +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - PRICENULL() = default; + PRICENULL() = default; - PRICENULL( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_actingVersion(actingVersion) { - if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) { - throw std::runtime_error("buffer too short for flyweight [E107]"); - } - } + PRICENULL( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } - PRICENULL( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : PRICENULL(buffer, 0, bufferLength, actingVersion) {} + PRICENULL( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + PRICENULL(buffer, 0, bufferLength, actingVersion) + { + } - PRICENULL(char *buffer, const std::uint64_t bufferLength) - : PRICENULL(buffer, 0, bufferLength, sbeSchemaVersion()) {} + PRICENULL( + char *buffer, + const std::uint64_t bufferLength) : + PRICENULL(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } - PRICENULL &wrap( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = PRICENULL(buffer, offset, bufferLength, actingVersion); - } + PRICENULL &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = PRICENULL(buffer, offset, bufferLength, actingVersion); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - encodedLength() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SBE_NODISCARD static const char * - mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mantissaSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t mantissaId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mantissaSinceVersion(); + return m_actingVersion >= mantissaSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mantissaEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mantissaEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT { - return 9223372036854775807L; - } + static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT + { + return INT64_C(9223372036854775807); + } - static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT { - return -9223372036854775807L; - } + static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT + { + return INT64_C(-9223372036854775807); + } - static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT { - return 9223372036854775807L; - } + static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT + { + return INT64_C(9223372036854775807); + } - static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT { - std::int64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT + { + std::int64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - PRICENULL &mantissa(const std::int64_t value) SBE_NOEXCEPT { - std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); - return *this; - } + PRICENULL &mantissa(const std::int64_t value) SBE_NOEXCEPT + { + std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); + return *this; + } - SBE_NODISCARD static const char * - exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } + SBE_NODISCARD static const char *exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - exponentSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t exponentId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= exponentSinceVersion(); + return m_actingVersion >= exponentSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - exponentEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exponentEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } + static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } - static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT { - return (std::int8_t)-7; - } + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT + { + return static_cast(-7); + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &builder, PRICENULL writer) { - builder << '{'; - builder << R"("mantissa": )"; - builder << +writer.mantissa(); +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, PRICENULL writer) +{ + builder << '{'; + builder << R"("mantissa": )"; + builder << +writer.mantissa(); - builder << '}'; + builder << '}'; + + return builder; +} - return builder; - } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/PRICENULL9.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/PRICENULL9.h index bf0d504dd..6d26c12c1 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/PRICENULL9.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/PRICENULL9.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,210 +86,263 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class PRICENULL9 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_actingVersion = 0; +class PRICENULL9 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - PRICENULL9() = default; + PRICENULL9() = default; - PRICENULL9( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_actingVersion(actingVersion) { - if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) { - throw std::runtime_error("buffer too short for flyweight [E107]"); - } - } + PRICENULL9( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 8) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } - PRICENULL9( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : PRICENULL9(buffer, 0, bufferLength, actingVersion) {} + PRICENULL9( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + PRICENULL9(buffer, 0, bufferLength, actingVersion) + { + } - PRICENULL9(char *buffer, const std::uint64_t bufferLength) - : PRICENULL9(buffer, 0, bufferLength, sbeSchemaVersion()) {} + PRICENULL9( + char *buffer, + const std::uint64_t bufferLength) : + PRICENULL9(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } - PRICENULL9 &wrap( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = PRICENULL9(buffer, offset, bufferLength, actingVersion); - } + PRICENULL9 &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = PRICENULL9(buffer, offset, bufferLength, actingVersion); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - encodedLength() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SBE_NODISCARD static const char * - mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *mantissaMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mantissaSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t mantissaId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mantissaSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mantissaInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mantissaSinceVersion(); + return m_actingVersion >= mantissaSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mantissaEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mantissaEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT { - return 9223372036854775807L; - } + static SBE_CONSTEXPR std::int64_t mantissaNullValue() SBE_NOEXCEPT + { + return INT64_C(9223372036854775807); + } - static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT { - return -9223372036854775807L; - } + static SBE_CONSTEXPR std::int64_t mantissaMinValue() SBE_NOEXCEPT + { + return INT64_C(-9223372036854775807); + } - static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT { - return 9223372036854775807L; - } + static SBE_CONSTEXPR std::int64_t mantissaMaxValue() SBE_NOEXCEPT + { + return INT64_C(9223372036854775807); + } - static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t mantissaEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT { - std::int64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::int64_t mantissa() const SBE_NOEXCEPT + { + std::int64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::int64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - PRICENULL9 &mantissa(const std::int64_t value) SBE_NOEXCEPT { - std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); - return *this; - } + PRICENULL9 &mantissa(const std::int64_t value) SBE_NOEXCEPT + { + std::int64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::int64_t)); + return *this; + } - SBE_NODISCARD static const char * - exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::PRESENCE: - return "constant"; - default: - return ""; - } - } + SBE_NODISCARD static const char *exponentMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::PRESENCE: return "constant"; + default: return ""; + } + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - exponentSinceVersion() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint16_t exponentId() SBE_NOEXCEPT + { + return -1; + } - SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t exponentSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool exponentInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= exponentSinceVersion(); + return m_actingVersion >= exponentSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - exponentEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t exponentEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } + static SBE_CONSTEXPR std::int8_t exponentNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } - static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } + static SBE_CONSTEXPR std::int8_t exponentMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } - static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } + static SBE_CONSTEXPR std::int8_t exponentMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } - static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::size_t exponentEncodingLength() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT { - return (std::int8_t)-9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::int8_t exponent() SBE_NOEXCEPT + { + return static_cast(-9); + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &builder, PRICENULL9 writer) { - builder << '{'; - builder << R"("mantissa": )"; - builder << +writer.mantissa(); +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, PRICENULL9 writer) +{ + builder << '{'; + builder << R"("mantissa": )"; + builder << +writer.mantissa(); - builder << '}'; + builder << '}'; + + return builder; +} - return builder; - } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/PutOrCall.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/PutOrCall.h index 23b35a708..e5d2e0bfb 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/PutOrCall.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/PutOrCall.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,49 +86,51 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class PutOrCall { - public: - enum Value { - Put = (std::uint8_t)0, - Call = (std::uint8_t)1, - NULL_VALUE = (std::uint8_t)255 - }; +class PutOrCall +{ +public: + enum Value + { + Put = static_cast(0), + Call = static_cast(1), + NULL_VALUE = static_cast(255) + }; - static PutOrCall::Value get(const std::uint8_t value) { - switch (value) { - case 0: - return Put; - case 1: - return Call; - case 255: - return NULL_VALUE; - } + static PutOrCall::Value get(const std::uint8_t value) + { + switch (value) + { + case static_cast(0): return Put; + case static_cast(1): return Call; + case static_cast(255): return NULL_VALUE; + } - throw std::runtime_error("unknown value for enum PutOrCall [E103]"); - } + throw std::runtime_error("unknown value for enum PutOrCall [E103]"); + } - static const char *c_str(const PutOrCall::Value value) { - switch (value) { - case Put: - return "Put"; - case Call: - return "Call"; - case NULL_VALUE: - return "NULL_VALUE"; - } + static const char *c_str(const PutOrCall::Value value) + { + switch (value) + { + case Put: return "Put"; + case Call: return "Call"; + case NULL_VALUE: return "NULL_VALUE"; + } - throw std::runtime_error("unknown value for enum PutOrCall [E103]:"); - } + throw std::runtime_error("unknown value for enum PutOrCall [E103]:"); + } - template - friend std::basic_ostream & - operator<<(std::basic_ostream &os, PutOrCall::Value m) { - return os << PutOrCall::c_str(m); - } + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, PutOrCall::Value m) + { + return os << PutOrCall::c_str(m); + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/QuoteRequest39.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/QuoteRequest39.h index 32da45139..ff2f38b7d 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/QuoteRequest39.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/QuoteRequest39.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,1189 +86,1374 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class QuoteRequest39 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class QuoteRequest39 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(35); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(39); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - QuoteRequest39() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - QuoteRequest39( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - QuoteRequest39(char *buffer, const std::uint64_t bufferLength) - : QuoteRequest39( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + QuoteRequest39() = default; - QuoteRequest39( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : QuoteRequest39( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + QuoteRequest39( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)35; - } + QuoteRequest39(char *buffer, const std::uint64_t bufferLength) : + QuoteRequest39(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)39; - } + QuoteRequest39( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + QuoteRequest39(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(35); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "R"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(39); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - QuoteRequest39 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = QuoteRequest39( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - QuoteRequest39 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "R"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = QuoteRequest39( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + QuoteRequest39 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = QuoteRequest39(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - QuoteRequest39 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = QuoteRequest39( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + QuoteRequest39 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = QuoteRequest39( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + QuoteRequest39 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = QuoteRequest39(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + QuoteRequest39 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() 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); + } - QuoteRequest39 &transactTime(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; - } + QuoteRequest39 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } - SBE_NODISCARD static const char * - QuoteReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *QuoteReqIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t quoteReqIDId() SBE_NOEXCEPT { - return 131; - } + static SBE_CONSTEXPR std::uint16_t quoteReqIDId() SBE_NOEXCEPT + { + return 131; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - quoteReqIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteReqIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool quoteReqIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool quoteReqIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= quoteReqIDSinceVersion(); + return m_actingVersion >= quoteReqIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - quoteReqIDEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteReqIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - static SBE_CONSTEXPR char quoteReqIDNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char quoteReqIDNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char quoteReqIDMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char quoteReqIDMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char quoteReqIDMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char quoteReqIDMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t quoteReqIDEncodingLength() SBE_NOEXCEPT { - return 23; - } + static SBE_CONSTEXPR std::size_t quoteReqIDEncodingLength() SBE_NOEXCEPT + { + return 23; + } - static SBE_CONSTEXPR std::uint64_t quoteReqIDLength() SBE_NOEXCEPT { - return 23; - } + static SBE_CONSTEXPR std::uint64_t quoteReqIDLength() SBE_NOEXCEPT + { + return 23; + } - SBE_NODISCARD const char *quoteReqID() const SBE_NOEXCEPT { - return m_buffer + m_offset + 8; - } + SBE_NODISCARD const char *quoteReqID() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } - SBE_NODISCARD char *quoteReqID() SBE_NOEXCEPT { - return m_buffer + m_offset + 8; - } + SBE_NODISCARD char *quoteReqID() SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } - SBE_NODISCARD char quoteReqID(const std::uint64_t index) const { - if (index >= 23) { - throw std::runtime_error("index out of range for quoteReqID [E104]"); - } + SBE_NODISCARD char quoteReqID(const std::uint64_t index) const + { + if (index >= 23) + { + throw std::runtime_error("index out of range for quoteReqID [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 8 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 8 + (index * 1), sizeof(char)); + return (val); + } - QuoteRequest39 "eReqID(const std::uint64_t index, const char value) { - if (index >= 23) { - throw std::runtime_error("index out of range for quoteReqID [E105]"); - } + QuoteRequest39 "eReqID(const std::uint64_t index, const char value) + { + if (index >= 23) + { + throw std::runtime_error("index out of range for quoteReqID [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 8 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 8 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getQuoteReqID(char *const dst, const std::uint64_t length) const { - if (length > 23) { - throw std::runtime_error("length too large for getQuoteReqID [E106]"); - } + std::uint64_t getQuoteReqID(char *const dst, const std::uint64_t length) const + { + if (length > 23) + { + throw std::runtime_error("length too large for getQuoteReqID [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 8, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 8, sizeof(char) * static_cast(length)); + return length; + } - QuoteRequest39 &putQuoteReqID(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 8, src, sizeof(char) * 23); - return *this; - } + QuoteRequest39 &putQuoteReqID(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 8, src, sizeof(char) * 23); + return *this; + } - std::string getQuoteReqIDAsString() const { - const char *buffer = m_buffer + m_offset + 8; - size_t length = 0; + SBE_NODISCARD std::string getQuoteReqIDAsString() const + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; - for (; length < 23 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 23 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getQuoteReqIDAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getQuoteReqIDAsString(); + std::string getQuoteReqIDAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getQuoteReqIDAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getQuoteReqIDAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 8; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getQuoteReqIDAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; - for (; length < 23 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 23 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - QuoteRequest39 &putQuoteReqID(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 23) { - throw std::runtime_error("string too large for putQuoteReqID [E106]"); - } + #if __cplusplus >= 201703L + QuoteRequest39 &putQuoteReqID(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 23) + { + throw std::runtime_error("string too large for putQuoteReqID [E106]"); + } - std::memcpy(m_buffer + m_offset + 8, str.data(), srcLength); - for (size_t start = srcLength; start < 23; ++start) { - m_buffer[m_offset + 8 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 8, str.data(), srcLength); + for (size_t start = srcLength; start < 23; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } - return *this; - } -#else - QuoteRequest39 &putQuoteReqID(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 23) { - throw std::runtime_error("string too large for putQuoteReqID [E106]"); - } + return *this; + } + #else + QuoteRequest39 &putQuoteReqID(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 23) + { + throw std::runtime_error("string too large for putQuoteReqID [E106]"); + } - std::memcpy(m_buffer + m_offset + 8, str.c_str(), srcLength); - for (size_t start = srcLength; start < 23; ++start) { - m_buffer[m_offset + 8 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 8, str.c_str(), srcLength); + for (size_t start = srcLength; start < 23; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 31; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 31; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 31, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 31, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - class NoRelatedSym { + class NoRelatedSym + { 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; + 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; - } + 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 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) { + 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(32)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 32; + 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 32; + } + + 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 NoRelatedSym &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *SymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t symbolId() SBE_NOEXCEPT + { + return 55; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t symbolSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool symbolInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= symbolSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t symbolEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR char symbolNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR char symbolMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } + + static SBE_CONSTEXPR char symbolMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } + + static SBE_CONSTEXPR std::size_t symbolEncodingLength() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::uint64_t symbolLength() SBE_NOEXCEPT + { + return 20; + } + + SBE_NODISCARD const char *symbol() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char *symbol() SBE_NOEXCEPT + { + return m_buffer + m_offset + 0; + } + + SBE_NODISCARD char symbol(const std::uint64_t index) const + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E104]"); + } + + char val; + std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); + return (val); + } + + NoRelatedSym &symbol(const std::uint64_t index, const char value) + { + if (index >= 20) + { + throw std::runtime_error("index out of range for symbol [E105]"); + } + + char val = (value); + std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); + return *this; + } + + std::uint64_t getSymbol(char *const dst, const std::uint64_t length) const + { + if (length > 20) + { + throw std::runtime_error("length too large for getSymbol [E106]"); + } + + std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast(length)); + return length; + } + + NoRelatedSym &putSymbol(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 20); + return *this; + } + + SBE_NODISCARD std::string getSymbolAsString() const + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); + + return result; + } + + std::string getSymbolAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSymbolAsString(); + + 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 getSymbolAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 0; + size_t length = 0; + + for (; length < 20 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); + + return result; + } + #endif + + #if __cplusplus >= 201703L + NoRelatedSym &putSymbol(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #else + NoRelatedSym &putSymbol(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 20) + { + throw std::runtime_error("string too large for putSymbol [E106]"); + } + + std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); + for (size_t start = srcLength; start < 20; ++start) + { + m_buffer[m_offset + 0 + start] = 0; + } + + return *this; + } + #endif + + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= securityIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoRelatedSym &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t orderQtyId() SBE_NOEXCEPT + { + return 38; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderQtyEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::int32_t orderQtyNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t orderQtyMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t orderQtyMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t orderQty() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoRelatedSym &orderQty(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *QuoteTypeMetaAttribute(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 quoteTypeId() SBE_NOEXCEPT + { + return 537; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t quoteTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool quoteTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= quoteTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t quoteTypeEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + static SBE_CONSTEXPR std::int8_t quoteTypeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT8; + } + + static SBE_CONSTEXPR std::int8_t quoteTypeMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t quoteTypeMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t quoteTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t quoteType() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::int8_t)); + return (val); + } + + NoRelatedSym "eType(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::int8_t)); + return *this; + } + + SBE_NODISCARD static const char *SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT + { + return 54; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= sideSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT + { + return 29; + } + + static SBE_CONSTEXPR std::int8_t sideNullValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::int8_t sideMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t sideMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t side() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 29, sizeof(std::int8_t)); + return (val); + } + + NoRelatedSym &side(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 29, &val, sizeof(std::int8_t)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoRelatedSym writer) + { + builder << '{'; + builder << R"("Symbol": )"; + builder << '"' << + writer.getSymbolAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("OrderQty": )"; + builder << +writer.orderQty(); + + builder << ", "; + builder << R"("QuoteType": )"; + builder << +writer.quoteType(); + + builder << ", "; + builder << R"("Side": )"; + builder << +writer.side(); + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)32); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 32; - 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; - } +private: + NoRelatedSym m_noRelatedSym; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 32; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoRelatedSymId() SBE_NOEXCEPT + { + return 146; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoRelatedSym &noRelatedSym() + { + m_noRelatedSym.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noRelatedSym; + } - 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; - } + NoRelatedSym &noRelatedSymCount(const std::uint8_t count) + { + m_noRelatedSym.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noRelatedSym; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noRelatedSymSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoRelatedSym &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - SymbolMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t symbolId() SBE_NOEXCEPT { return 55; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - symbolSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool symbolInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noRelatedSymInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= symbolSinceVersion(); + return m_actingVersion >= noRelatedSymSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - symbolEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR char symbolNullValue() SBE_NOEXCEPT { - return (char)0; - } - - static SBE_CONSTEXPR char symbolMinValue() SBE_NOEXCEPT { - return (char)32; - } - - static SBE_CONSTEXPR char symbolMaxValue() SBE_NOEXCEPT { - return (char)126; - } - - static SBE_CONSTEXPR std::size_t symbolEncodingLength() SBE_NOEXCEPT { - return 20; - } - - static SBE_CONSTEXPR std::uint64_t symbolLength() SBE_NOEXCEPT { - return 20; - } - - SBE_NODISCARD const char *symbol() const SBE_NOEXCEPT { - return m_buffer + m_offset + 0; - } - - SBE_NODISCARD char *symbol() SBE_NOEXCEPT { - return m_buffer + m_offset + 0; - } - - SBE_NODISCARD char symbol(const std::uint64_t index) const { - if (index >= 20) { - throw std::runtime_error("index out of range for symbol [E104]"); - } - - char val; - std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char)); - return (val); - } - - NoRelatedSym &symbol(const std::uint64_t index, const char value) { - if (index >= 20) { - throw std::runtime_error("index out of range for symbol [E105]"); - } - - char val = (value); - std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char)); - return *this; - } - - std::uint64_t - getSymbol(char *const dst, const std::uint64_t length) const { - if (length > 20) { - throw std::runtime_error("length too large for getSymbol [E106]"); - } - - std::memcpy( - dst, m_buffer + m_offset + 0, - sizeof(char) * static_cast(length)); - return length; - } - - NoRelatedSym &putSymbol(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 20); - return *this; - } - - std::string getSymbolAsString() const { - const char *buffer = m_buffer + m_offset + 0; - size_t length = 0; - - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); - - return result; - } - - std::string getSymbolAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSymbolAsString(); - - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; - - default: - if ('\x00' <= *c && *c <= '\x1f') { - oss << "\\u" << std::hex << std::setw(4) << std::setfill('0') - << (int)(*c); - } else { - oss << *c; - } - } - } - - return oss.str(); - } - -#if __cplusplus >= 201703L - std::string_view getSymbolAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 0; - size_t length = 0; - - for (; length < 20 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); - - return result; - } -#endif - -#if __cplusplus >= 201703L - NoRelatedSym &putSymbol(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error("string too large for putSymbol [E106]"); - } - - std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 0 + start] = 0; - } - - return *this; - } -#else - NoRelatedSym &putSymbol(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 20) { - throw std::runtime_error("string too large for putSymbol [E106]"); - } - - std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength); - for (size_t start = srcLength; start < 20; ++start) { - m_buffer[m_offset + 0 + start] = 0; - } - - return *this; - } -#endif - - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { - return 48; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= securityIDSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 20; - } - - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoRelatedSym &securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - OrderQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t orderQtyId() SBE_NOEXCEPT { - return 38; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - orderQtySinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool orderQtyInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= orderQtySinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - orderQtyEncodingOffset() SBE_NOEXCEPT { - return 24; - } - - static SBE_CONSTEXPR std::int32_t orderQtyNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t orderQtyMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t orderQtyMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t orderQtyEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t orderQty() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoRelatedSym &orderQty(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - QuoteTypeMetaAttribute(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 quoteTypeId() SBE_NOEXCEPT { - return 537; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - quoteTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool quoteTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= quoteTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - quoteTypeEncodingOffset() SBE_NOEXCEPT { - return 28; - } - - static SBE_CONSTEXPR std::int8_t quoteTypeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT8; - } - - static SBE_CONSTEXPR std::int8_t quoteTypeMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t quoteTypeMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t quoteTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::int8_t quoteType() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::int8_t)); - return (val); - } - - NoRelatedSym "eType(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::int8_t)); - return *this; - } - - SBE_NODISCARD static const char * - SideMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t sideId() SBE_NOEXCEPT { return 54; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - sideSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= sideSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - sideEncodingOffset() SBE_NOEXCEPT { - return 29; - } - - static SBE_CONSTEXPR std::int8_t sideNullValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::int8_t sideMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t sideMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::int8_t side() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 29, sizeof(std::int8_t)); - return (val); - } - - NoRelatedSym &side(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 29, &val, sizeof(std::int8_t)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoRelatedSym writer) { - builder << '{'; - builder << R"("Symbol": )"; - builder << '"' << writer.getSymbolAsJsonEscapedString().c_str() << '"'; - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("OrderQty": )"; - builder << +writer.orderQty(); - - builder << ", "; - builder << R"("QuoteType": )"; - builder << +writer.quoteType(); - - builder << ", "; - builder << R"("Side": )"; - builder << +writer.side(); - - builder << '}'; - - return builder; - } - }; - - private: - NoRelatedSym m_noRelatedSym; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoRelatedSymId() SBE_NOEXCEPT { - return 146; - } - - SBE_NODISCARD inline NoRelatedSym &noRelatedSym() { - m_noRelatedSym.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noRelatedSym; - } - - NoRelatedSym &noRelatedSymCount(const std::uint8_t count) { - m_noRelatedSym.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noRelatedSym; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noRelatedSymSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noRelatedSymInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noRelatedSymSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, QuoteRequest39 _writer) { - QuoteRequest39 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "QuoteRequest39", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - builder << R"("QuoteReqID": )"; - builder << '"' << writer.getQuoteReqIDAsJsonEscapedString().c_str() - << '"'; - - builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoRelatedSym": [)"; - writer.noRelatedSym().forEach([&](NoRelatedSym &noRelatedSym) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, QuoteRequest39 _writer) +{ + QuoteRequest39 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "QuoteRequest39", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("QuoteReqID": )"; + builder << '"' << + writer.getQuoteReqIDAsJsonEscapedString().c_str() << '"'; + + builder << ", "; + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoRelatedSym": [)"; + writer.noRelatedSym().forEach([&](NoRelatedSym& noRelatedSym) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noRelatedSym; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noRelatedSym().forEach([](NoRelatedSym e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noRelatedSymLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoRelatedSym::sbeHeaderSize(); + if (noRelatedSymLength > 254LL) + { + throw std::runtime_error("noRelatedSymLength outside of allowed range [E110]"); + } + length += noRelatedSymLength *NoRelatedSym::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/SecurityStatus30.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/SecurityStatus30.h index 56ee04350..b8afea5d2 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/SecurityStatus30.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/SecurityStatus30.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,1027 +86,1150 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class SecurityStatus30 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class SecurityStatus30 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(30); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(30); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - SecurityStatus30() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - SecurityStatus30( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - SecurityStatus30(char *buffer, const std::uint64_t bufferLength) - : SecurityStatus30( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + SecurityStatus30() = default; - SecurityStatus30( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : SecurityStatus30( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + SecurityStatus30( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)30; - } + SecurityStatus30(char *buffer, const std::uint64_t bufferLength) : + SecurityStatus30(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)30; - } + SecurityStatus30( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + SecurityStatus30(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(30); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "f"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(30); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SecurityStatus30 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = SecurityStatus30( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SecurityStatus30 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "f"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = SecurityStatus30( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + SecurityStatus30 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = SecurityStatus30(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - SecurityStatus30 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = SecurityStatus30( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + SecurityStatus30 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = SecurityStatus30( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + SecurityStatus30 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = SecurityStatus30(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + SecurityStatus30 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() 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); + } - SecurityStatus30 &transactTime(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; - } + SecurityStatus30 &transactTime(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 * - SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityGroupMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT { - return 1151; - } + static SBE_CONSTEXPR std::uint16_t securityGroupId() SBE_NOEXCEPT + { + return 1151; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityGroupSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityGroupSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityGroupInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityGroupSinceVersion(); + return m_actingVersion >= securityGroupSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityGroupEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityGroupEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT { - return (char)0; - } + static SBE_CONSTEXPR char securityGroupNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT { - return (char)32; - } + static SBE_CONSTEXPR char securityGroupMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT { - return (char)126; - } + static SBE_CONSTEXPR char securityGroupMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t securityGroupEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::uint64_t securityGroupLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT { - return m_buffer + m_offset + 8; - } + SBE_NODISCARD const char *securityGroup() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } - SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT { - return m_buffer + m_offset + 8; - } + SBE_NODISCARD char *securityGroup() SBE_NOEXCEPT + { + return m_buffer + m_offset + 8; + } - SBE_NODISCARD char securityGroup(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error( - "index out of range for securityGroup [E104]"); - } + SBE_NODISCARD char securityGroup(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 8 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 8 + (index * 1), sizeof(char)); + return (val); + } - SecurityStatus30 & - securityGroup(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error( - "index out of range for securityGroup [E105]"); - } + SecurityStatus30 &securityGroup(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for securityGroup [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 8 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 8 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t - getSecurityGroup(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error( - "length too large for getSecurityGroup [E106]"); - } + std::uint64_t getSecurityGroup(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getSecurityGroup [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 8, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 8, sizeof(char) * static_cast(length)); + return length; + } - SecurityStatus30 &putSecurityGroup(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 8, src, sizeof(char) * 6); - return *this; - } + SecurityStatus30 &putSecurityGroup(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 8, src, sizeof(char) * 6); + return *this; + } - std::string getSecurityGroupAsString() const { - const char *buffer = m_buffer + m_offset + 8; - size_t length = 0; + SBE_NODISCARD std::string getSecurityGroupAsString() const + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getSecurityGroupAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getSecurityGroupAsString(); + std::string getSecurityGroupAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getSecurityGroupAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 8; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getSecurityGroupAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 8; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - SecurityStatus30 &putSecurityGroup(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityGroup [E106]"); - } + #if __cplusplus >= 201703L + SecurityStatus30 &putSecurityGroup(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } - std::memcpy(m_buffer + m_offset + 8, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 8 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 8, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } - return *this; - } -#else - SecurityStatus30 &putSecurityGroup(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error( - "string too large for putSecurityGroup [E106]"); - } + return *this; + } + #else + SecurityStatus30 &putSecurityGroup(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putSecurityGroup [E106]"); + } - std::memcpy(m_buffer + m_offset + 8, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 8 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 8, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 8 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - AssetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *AssetMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t assetId() SBE_NOEXCEPT { return 6937; } + static SBE_CONSTEXPR std::uint16_t assetId() SBE_NOEXCEPT + { + return 6937; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - assetSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t assetSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool assetInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool assetInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= assetSinceVersion(); + return m_actingVersion >= assetSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - assetEncodingOffset() SBE_NOEXCEPT { - return 14; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t assetEncodingOffset() SBE_NOEXCEPT + { + return 14; + } - static SBE_CONSTEXPR char assetNullValue() SBE_NOEXCEPT { return (char)0; } + static SBE_CONSTEXPR char assetNullValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR char assetMinValue() SBE_NOEXCEPT { return (char)32; } + static SBE_CONSTEXPR char assetMinValue() SBE_NOEXCEPT + { + return static_cast(32); + } - static SBE_CONSTEXPR char assetMaxValue() SBE_NOEXCEPT { return (char)126; } + static SBE_CONSTEXPR char assetMaxValue() SBE_NOEXCEPT + { + return static_cast(126); + } - static SBE_CONSTEXPR std::size_t assetEncodingLength() SBE_NOEXCEPT { - return 6; - } + static SBE_CONSTEXPR std::size_t assetEncodingLength() SBE_NOEXCEPT + { + return 6; + } - static SBE_CONSTEXPR std::uint64_t assetLength() SBE_NOEXCEPT { return 6; } + static SBE_CONSTEXPR std::uint64_t assetLength() SBE_NOEXCEPT + { + return 6; + } - SBE_NODISCARD const char *asset() const SBE_NOEXCEPT { - return m_buffer + m_offset + 14; - } + SBE_NODISCARD const char *asset() const SBE_NOEXCEPT + { + return m_buffer + m_offset + 14; + } - SBE_NODISCARD char *asset() SBE_NOEXCEPT { return m_buffer + m_offset + 14; } + SBE_NODISCARD char *asset() SBE_NOEXCEPT + { + return m_buffer + m_offset + 14; + } - SBE_NODISCARD char asset(const std::uint64_t index) const { - if (index >= 6) { - throw std::runtime_error("index out of range for asset [E104]"); - } + SBE_NODISCARD char asset(const std::uint64_t index) const + { + if (index >= 6) + { + throw std::runtime_error("index out of range for asset [E104]"); + } - char val; - std::memcpy(&val, m_buffer + m_offset + 14 + (index * 1), sizeof(char)); - return (val); - } + char val; + std::memcpy(&val, m_buffer + m_offset + 14 + (index * 1), sizeof(char)); + return (val); + } - SecurityStatus30 &asset(const std::uint64_t index, const char value) { - if (index >= 6) { - throw std::runtime_error("index out of range for asset [E105]"); - } + SecurityStatus30 &asset(const std::uint64_t index, const char value) + { + if (index >= 6) + { + throw std::runtime_error("index out of range for asset [E105]"); + } - char val = (value); - std::memcpy(m_buffer + m_offset + 14 + (index * 1), &val, sizeof(char)); - return *this; - } + char val = (value); + std::memcpy(m_buffer + m_offset + 14 + (index * 1), &val, sizeof(char)); + return *this; + } - std::uint64_t getAsset(char *const dst, const std::uint64_t length) const { - if (length > 6) { - throw std::runtime_error("length too large for getAsset [E106]"); - } + std::uint64_t getAsset(char *const dst, const std::uint64_t length) const + { + if (length > 6) + { + throw std::runtime_error("length too large for getAsset [E106]"); + } - std::memcpy( - dst, m_buffer + m_offset + 14, - sizeof(char) * static_cast(length)); - return length; - } + std::memcpy(dst, m_buffer + m_offset + 14, sizeof(char) * static_cast(length)); + return length; + } - SecurityStatus30 &putAsset(const char *const src) SBE_NOEXCEPT { - std::memcpy(m_buffer + m_offset + 14, src, sizeof(char) * 6); - return *this; - } + SecurityStatus30 &putAsset(const char *const src) SBE_NOEXCEPT + { + std::memcpy(m_buffer + m_offset + 14, src, sizeof(char) * 6); + return *this; + } - std::string getAssetAsString() const { - const char *buffer = m_buffer + m_offset + 14; - size_t length = 0; + SBE_NODISCARD std::string getAssetAsString() const + { + const char *buffer = m_buffer + m_offset + 14; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string result(buffer, length); - return result; - } + return result; + } - std::string getAssetAsJsonEscapedString() { - std::ostringstream oss; - std::string s = getAssetAsString(); + std::string getAssetAsJsonEscapedString() + { + std::ostringstream oss; + std::string s = getAssetAsString(); - for (auto c = s.cbegin(); c != s.cend(); c++) { - switch (*c) { - case '"': - oss << "\\\""; - break; - case '\\': - oss << "\\\\"; - break; - case '\b': - oss << "\\b"; - break; - case '\f': - oss << "\\f"; - break; - case '\n': - oss << "\\n"; - break; - case '\r': - oss << "\\r"; - break; - case '\t': - oss << "\\t"; - break; + 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; + default: + if ('\x00' <= c && c <= '\x1f') + { + oss << "\\u" << std::hex << std::setw(4) + << std::setfill('0') << (int)(c); + } + else + { + oss << c; + } } - } - } + } - return oss.str(); - } + return oss.str(); + } -#if __cplusplus >= 201703L - std::string_view getAssetAsStringView() const SBE_NOEXCEPT { - const char *buffer = m_buffer + m_offset + 14; - size_t length = 0; + #if __cplusplus >= 201703L + SBE_NODISCARD std::string_view getAssetAsStringView() const SBE_NOEXCEPT + { + const char *buffer = m_buffer + m_offset + 14; + size_t length = 0; - for (; length < 6 && *(buffer + length) != '\0'; ++length) - ; - std::string_view result(buffer, length); + for (; length < 6 && *(buffer + length) != '\0'; ++length); + std::string_view result(buffer, length); - return result; - } -#endif + return result; + } + #endif -#if __cplusplus >= 201703L - SecurityStatus30 &putAsset(const std::string_view str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putAsset [E106]"); - } + #if __cplusplus >= 201703L + SecurityStatus30 &putAsset(const std::string_view str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putAsset [E106]"); + } - std::memcpy(m_buffer + m_offset + 14, str.data(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 14 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 14, str.data(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 14 + start] = 0; + } - return *this; - } -#else - SecurityStatus30 &putAsset(const std::string &str) { - const size_t srcLength = str.length(); - if (srcLength > 6) { - throw std::runtime_error("string too large for putAsset [E106]"); - } + return *this; + } + #else + SecurityStatus30 &putAsset(const std::string& str) + { + const size_t srcLength = str.length(); + if (srcLength > 6) + { + throw std::runtime_error("string too large for putAsset [E106]"); + } - std::memcpy(m_buffer + m_offset + 14, str.c_str(), srcLength); - for (size_t start = srcLength; start < 6; ++start) { - m_buffer[m_offset + 14 + start] = 0; - } + std::memcpy(m_buffer + m_offset + 14, str.c_str(), srcLength); + for (size_t start = srcLength; start < 6; ++start) + { + m_buffer[m_offset + 14 + start] = 0; + } - return *this; - } -#endif + return *this; + } + #endif - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityIDMetaAttribute(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 securityIDId() SBE_NOEXCEPT { return 48; } + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityIDSinceVersion(); + return m_actingVersion >= securityIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 20; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 20; + } - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - SecurityStatus30 &securityID(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::int32_t)); - return *this; - } + SecurityStatus30 &securityID(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::int32_t)); + return *this; + } - SBE_NODISCARD static const char * - TradeDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "LocalMktDate"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TradeDateMetaAttribute(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 tradeDateId() SBE_NOEXCEPT { return 75; } + static SBE_CONSTEXPR std::uint16_t tradeDateId() SBE_NOEXCEPT + { + return 75; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradeDateSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradeDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tradeDateSinceVersion(); + return m_actingVersion >= tradeDateSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradeDateEncodingOffset() SBE_NOEXCEPT { - return 24; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradeDateEncodingOffset() SBE_NOEXCEPT + { + return 24; + } - static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT { - return (std::uint16_t)65535; - } + static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } - static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - SecurityStatus30 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint16_t)); - return *this; - } + SecurityStatus30 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint16_t)); + return *this; + } - SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MatchEventIndicatorMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT { - return 5799; - } + static SBE_CONSTEXPR std::uint16_t matchEventIndicatorId() SBE_NOEXCEPT + { + return 5799; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - matchEventIndicatorSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t matchEventIndicatorSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool matchEventIndicatorInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= matchEventIndicatorSinceVersion(); + return m_actingVersion >= matchEventIndicatorSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingOffset() SBE_NOEXCEPT { - return 26; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingOffset() SBE_NOEXCEPT + { + return 26; + } - private: - MatchEventIndicator m_matchEventIndicator; +private: + MatchEventIndicator m_matchEventIndicator; - public: - SBE_NODISCARD MatchEventIndicator &matchEventIndicator() { - m_matchEventIndicator.wrap( - m_buffer, m_offset + 26, m_actingVersion, m_bufferLength); - return m_matchEventIndicator; - } +public: + SBE_NODISCARD MatchEventIndicator &matchEventIndicator() + { + m_matchEventIndicator.wrap(m_buffer, m_offset + 26, m_actingVersion, m_bufferLength); + return m_matchEventIndicator; + } - static SBE_CONSTEXPR std::size_t - matchEventIndicatorEncodingLength() SBE_NOEXCEPT { - return 1; - } + static SBE_CONSTEXPR std::size_t matchEventIndicatorEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD static const char *SecurityTradingStatusMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityTradingStatusMetaAttribute(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 securityTradingStatusId() SBE_NOEXCEPT { - return 326; - } + static SBE_CONSTEXPR std::uint16_t securityTradingStatusId() SBE_NOEXCEPT + { + return 326; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityTradingStatusSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityTradingStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityTradingStatusInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityTradingStatusInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityTradingStatusSinceVersion(); + return m_actingVersion >= securityTradingStatusSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityTradingStatusEncodingOffset() SBE_NOEXCEPT { - return 27; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityTradingStatusEncodingOffset() SBE_NOEXCEPT + { + return 27; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityTradingStatusEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityTradingStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD SecurityTradingStatus::Value - securityTradingStatus() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 27, sizeof(std::uint8_t)); - return SecurityTradingStatus::get((val)); - } + SBE_NODISCARD SecurityTradingStatus::Value securityTradingStatus() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 27, sizeof(std::uint8_t)); + return SecurityTradingStatus::get((val)); + } - SecurityStatus30 &securityTradingStatus( - const SecurityTradingStatus::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 27, &val, sizeof(std::uint8_t)); - return *this; - } + SecurityStatus30 &securityTradingStatus(const SecurityTradingStatus::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 27, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - HaltReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *HaltReasonMetaAttribute(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 haltReasonId() SBE_NOEXCEPT { - return 327; - } + static SBE_CONSTEXPR std::uint16_t haltReasonId() SBE_NOEXCEPT + { + return 327; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - haltReasonSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t haltReasonSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool haltReasonInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool haltReasonInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= haltReasonSinceVersion(); + return m_actingVersion >= haltReasonSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - haltReasonEncodingOffset() SBE_NOEXCEPT { - return 28; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t haltReasonEncodingOffset() SBE_NOEXCEPT + { + return 28; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - haltReasonEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t haltReasonEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD HaltReason::Value haltReason() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint8_t)); - return HaltReason::get((val)); - } + SBE_NODISCARD HaltReason::Value haltReason() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(std::uint8_t)); + return HaltReason::get((val)); + } - SecurityStatus30 &haltReason(const HaltReason::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint8_t)); - return *this; - } + SecurityStatus30 &haltReason(const HaltReason::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char *SecurityTradingEventMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityTradingEventMetaAttribute(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 securityTradingEventId() SBE_NOEXCEPT { - return 1174; - } + static SBE_CONSTEXPR std::uint16_t securityTradingEventId() SBE_NOEXCEPT + { + return 1174; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityTradingEventSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityTradingEventSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityTradingEventInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityTradingEventInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityTradingEventSinceVersion(); + return m_actingVersion >= securityTradingEventSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityTradingEventEncodingOffset() SBE_NOEXCEPT { - return 29; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityTradingEventEncodingOffset() SBE_NOEXCEPT + { + return 29; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityTradingEventEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityTradingEventEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD SecurityTradingEvent::Value - securityTradingEvent() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 29, sizeof(std::uint8_t)); - return SecurityTradingEvent::get((val)); - } + SBE_NODISCARD SecurityTradingEvent::Value securityTradingEvent() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 29, sizeof(std::uint8_t)); + return SecurityTradingEvent::get((val)); + } - SecurityStatus30 & - securityTradingEvent(const SecurityTradingEvent::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 29, &val, sizeof(std::uint8_t)); - return *this; - } + SecurityStatus30 &securityTradingEvent(const SecurityTradingEvent::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 29, &val, sizeof(std::uint8_t)); + return *this; + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, SecurityStatus30 _writer) { - SecurityStatus30 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "SecurityStatus30", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, SecurityStatus30 _writer) +{ + SecurityStatus30 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "SecurityStatus30", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); - builder << ", "; - builder << R"("SecurityGroup": )"; - builder << '"' << writer.getSecurityGroupAsJsonEscapedString().c_str() - << '"'; + builder << ", "; + builder << R"("SecurityGroup": )"; + builder << '"' << + writer.getSecurityGroupAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("Asset": )"; - builder << '"' << writer.getAssetAsJsonEscapedString().c_str() << '"'; + builder << ", "; + builder << R"("Asset": )"; + builder << '"' << + writer.getAssetAsJsonEscapedString().c_str() << '"'; - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); - builder << ", "; - builder << R"("TradeDate": )"; - builder << +writer.tradeDate(); + builder << ", "; + builder << R"("TradeDate": )"; + builder << +writer.tradeDate(); - builder << ", "; - builder << R"("MatchEventIndicator": )"; - builder << writer.matchEventIndicator(); + builder << ", "; + builder << R"("MatchEventIndicator": )"; + builder << writer.matchEventIndicator(); - builder << ", "; - builder << R"("SecurityTradingStatus": )"; - builder << '"' << writer.securityTradingStatus() << '"'; + builder << ", "; + builder << R"("SecurityTradingStatus": )"; + builder << '"' << writer.securityTradingStatus() << '"'; - builder << ", "; - builder << R"("HaltReason": )"; - builder << '"' << writer.haltReason() << '"'; + builder << ", "; + builder << R"("HaltReason": )"; + builder << '"' << writer.haltReason() << '"'; - builder << ", "; - builder << R"("SecurityTradingEvent": )"; - builder << '"' << writer.securityTradingEvent() << '"'; + builder << ", "; + builder << R"("SecurityTradingEvent": )"; + builder << '"' << writer.securityTradingEvent() << '"'; - builder << '}'; + builder << '}'; - return 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 +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/SecurityTradingEvent.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/SecurityTradingEvent.h index d00e9be4d..a47e189a2 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/SecurityTradingEvent.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/SecurityTradingEvent.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,66 +86,60 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class SecurityTradingEvent { - public: - enum Value { - NoEvent = (std::uint8_t)0, - NoCancel = (std::uint8_t)1, - ResetStatistics = (std::uint8_t)4, - ImpliedMatchingON = (std::uint8_t)5, - ImpliedMatchingOFF = (std::uint8_t)6, - NULL_VALUE = (std::uint8_t)255 - }; +class SecurityTradingEvent +{ +public: + enum Value + { + NoEvent = static_cast(0), + NoCancel = static_cast(1), + ResetStatistics = static_cast(4), + ImpliedMatchingON = static_cast(5), + ImpliedMatchingOFF = static_cast(6), + NULL_VALUE = static_cast(255) + }; - static SecurityTradingEvent::Value get(const std::uint8_t value) { - switch (value) { - case 0: - return NoEvent; - case 1: - return NoCancel; - case 4: - return ResetStatistics; - case 5: - return ImpliedMatchingON; - case 6: - return ImpliedMatchingOFF; - case 255: - return NULL_VALUE; - } + static SecurityTradingEvent::Value get(const std::uint8_t value) + { + switch (value) + { + case static_cast(0): return NoEvent; + case static_cast(1): return NoCancel; + case static_cast(4): return ResetStatistics; + case static_cast(5): return ImpliedMatchingON; + case static_cast(6): return ImpliedMatchingOFF; + case static_cast(255): return NULL_VALUE; + } - throw std::runtime_error( - "unknown value for enum SecurityTradingEvent [E103]"); - } + throw std::runtime_error("unknown value for enum SecurityTradingEvent [E103]"); + } - static const char *c_str(const SecurityTradingEvent::Value value) { - switch (value) { - case NoEvent: - return "NoEvent"; - case NoCancel: - return "NoCancel"; - case ResetStatistics: - return "ResetStatistics"; - case ImpliedMatchingON: - return "ImpliedMatchingON"; - case ImpliedMatchingOFF: - return "ImpliedMatchingOFF"; - case NULL_VALUE: - return "NULL_VALUE"; - } + static const char *c_str(const SecurityTradingEvent::Value value) + { + switch (value) + { + case NoEvent: return "NoEvent"; + case NoCancel: return "NoCancel"; + case ResetStatistics: return "ResetStatistics"; + case ImpliedMatchingON: return "ImpliedMatchingON"; + case ImpliedMatchingOFF: return "ImpliedMatchingOFF"; + case NULL_VALUE: return "NULL_VALUE"; + } - throw std::runtime_error( - "unknown value for enum SecurityTradingEvent [E103]:"); - } + throw std::runtime_error("unknown value for enum SecurityTradingEvent [E103]:"); + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &os, SecurityTradingEvent::Value m) { - return os << SecurityTradingEvent::c_str(m); - } + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, SecurityTradingEvent::Value m) + { + return os << SecurityTradingEvent::c_str(m); + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/SecurityTradingStatus.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/SecurityTradingStatus.h index f1d8927c5..6d6353ed5 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/SecurityTradingStatus.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/SecurityTradingStatus.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,96 +86,78 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class SecurityTradingStatus { - public: - enum Value { - TradingHalt = (std::uint8_t)2, - Close = (std::uint8_t)4, - NewPriceIndication = (std::uint8_t)15, - ReadyToTrade = (std::uint8_t)17, - NotAvailableForTrading = (std::uint8_t)18, - UnknownorInvalid = (std::uint8_t)20, - PreOpen = (std::uint8_t)21, - PreCross = (std::uint8_t)24, - Cross = (std::uint8_t)25, - PostClose = (std::uint8_t)26, - NoChange = (std::uint8_t)103, - NULL_VALUE = (std::uint8_t)255 - }; +class SecurityTradingStatus +{ +public: + enum Value + { + TradingHalt = static_cast(2), + Close = static_cast(4), + NewPriceIndication = static_cast(15), + ReadyToTrade = static_cast(17), + NotAvailableForTrading = static_cast(18), + UnknownorInvalid = static_cast(20), + PreOpen = static_cast(21), + PreCross = static_cast(24), + Cross = static_cast(25), + PostClose = static_cast(26), + NoChange = static_cast(103), + NULL_VALUE = static_cast(255) + }; - static SecurityTradingStatus::Value get(const std::uint8_t value) { - switch (value) { - case 2: - return TradingHalt; - case 4: - return Close; - case 15: - return NewPriceIndication; - case 17: - return ReadyToTrade; - case 18: - return NotAvailableForTrading; - case 20: - return UnknownorInvalid; - case 21: - return PreOpen; - case 24: - return PreCross; - case 25: - return Cross; - case 26: - return PostClose; - case 103: - return NoChange; - case 255: - return NULL_VALUE; - } + static SecurityTradingStatus::Value get(const std::uint8_t value) + { + switch (value) + { + case static_cast(2): return TradingHalt; + case static_cast(4): return Close; + case static_cast(15): return NewPriceIndication; + case static_cast(17): return ReadyToTrade; + case static_cast(18): return NotAvailableForTrading; + case static_cast(20): return UnknownorInvalid; + case static_cast(21): return PreOpen; + case static_cast(24): return PreCross; + case static_cast(25): return Cross; + case static_cast(26): return PostClose; + case static_cast(103): return NoChange; + case static_cast(255): return NULL_VALUE; + } - throw std::runtime_error( - "unknown value for enum SecurityTradingStatus [E103]"); - } + throw std::runtime_error("unknown value for enum SecurityTradingStatus [E103]"); + } - static const char *c_str(const SecurityTradingStatus::Value value) { - switch (value) { - case TradingHalt: - return "TradingHalt"; - case Close: - return "Close"; - case NewPriceIndication: - return "NewPriceIndication"; - case ReadyToTrade: - return "ReadyToTrade"; - case NotAvailableForTrading: - return "NotAvailableForTrading"; - case UnknownorInvalid: - return "UnknownorInvalid"; - case PreOpen: - return "PreOpen"; - case PreCross: - return "PreCross"; - case Cross: - return "Cross"; - case PostClose: - return "PostClose"; - case NoChange: - return "NoChange"; - case NULL_VALUE: - return "NULL_VALUE"; - } + static const char *c_str(const SecurityTradingStatus::Value value) + { + switch (value) + { + case TradingHalt: return "TradingHalt"; + case Close: return "Close"; + case NewPriceIndication: return "NewPriceIndication"; + case ReadyToTrade: return "ReadyToTrade"; + case NotAvailableForTrading: return "NotAvailableForTrading"; + case UnknownorInvalid: return "UnknownorInvalid"; + case PreOpen: return "PreOpen"; + case PreCross: return "PreCross"; + case Cross: return "Cross"; + case PostClose: return "PostClose"; + case NoChange: return "NoChange"; + case NULL_VALUE: return "NULL_VALUE"; + } - throw std::runtime_error( - "unknown value for enum SecurityTradingStatus [E103]:"); - } + throw std::runtime_error("unknown value for enum SecurityTradingStatus [E103]:"); + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &os, SecurityTradingStatus::Value m) { - return os << SecurityTradingStatus::c_str(m); - } + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, SecurityTradingStatus::Value m) + { + return os << SecurityTradingStatus::c_str(m); + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/SecurityUpdateAction.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/SecurityUpdateAction.h index 12a464c90..5df6b9acf 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/SecurityUpdateAction.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/SecurityUpdateAction.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,56 +86,54 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class SecurityUpdateAction { - public: - enum Value { - Add = (char)65, - Delete = (char)68, - Modify = (char)77, - NULL_VALUE = (char)0 - }; +class SecurityUpdateAction +{ +public: + enum Value + { + Add = static_cast(65), + Delete = static_cast(68), + Modify = static_cast(77), + NULL_VALUE = static_cast(0) + }; - static SecurityUpdateAction::Value get(const char value) { - switch (value) { - case 65: - return Add; - case 68: - return Delete; - case 77: - return Modify; - case 0: - return NULL_VALUE; - } + static SecurityUpdateAction::Value get(const char value) + { + switch (value) + { + case static_cast(65): return Add; + case static_cast(68): return Delete; + case static_cast(77): return Modify; + case static_cast(0): return NULL_VALUE; + } - throw std::runtime_error( - "unknown value for enum SecurityUpdateAction [E103]"); - } + throw std::runtime_error("unknown value for enum SecurityUpdateAction [E103]"); + } - static const char *c_str(const SecurityUpdateAction::Value value) { - switch (value) { - case Add: - return "Add"; - case Delete: - return "Delete"; - case Modify: - return "Modify"; - case NULL_VALUE: - return "NULL_VALUE"; - } + static const char *c_str(const SecurityUpdateAction::Value value) + { + switch (value) + { + case Add: return "Add"; + case Delete: return "Delete"; + case Modify: return "Modify"; + case NULL_VALUE: return "NULL_VALUE"; + } - throw std::runtime_error( - "unknown value for enum SecurityUpdateAction [E103]:"); - } + throw std::runtime_error("unknown value for enum SecurityUpdateAction [E103]:"); + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &os, SecurityUpdateAction::Value m) { - return os << SecurityUpdateAction::c_str(m); - } + template + friend std::basic_ostream& operator << ( + std::basic_ostream& os, SecurityUpdateAction::Value m) + { + return os << SecurityUpdateAction::c_str(m); + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/SettlPriceType.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/SettlPriceType.h index b1bdc4362..6b020092a 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/SettlPriceType.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/SettlPriceType.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,311 +86,363 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() + namespace mdp3 { -class SettlPriceType { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_actingVersion = 0; +class SettlPriceType +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_actingVersion = 0; - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - SettlPriceType() = default; + SettlPriceType() = default; - SettlPriceType( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_actingVersion(actingVersion) { - if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 1) > m_bufferLength), false)) { - throw std::runtime_error("buffer too short for flyweight [E107]"); - } - } + SettlPriceType( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_actingVersion(actingVersion) + { + if (SBE_BOUNDS_CHECK_EXPECT(((m_offset + 1) > m_bufferLength), false)) + { + throw std::runtime_error("buffer too short for flyweight [E107]"); + } + } - SettlPriceType( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingVersion) - : SettlPriceType(buffer, 0, bufferLength, actingVersion) {} + SettlPriceType( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingVersion) : + SettlPriceType(buffer, 0, bufferLength, actingVersion) + { + } - SettlPriceType(char *buffer, const std::uint64_t bufferLength) - : SettlPriceType(buffer, 0, bufferLength, sbeSchemaVersion()) {} + SettlPriceType( + char *buffer, + const std::uint64_t bufferLength) : + SettlPriceType(buffer, 0, bufferLength, sbeSchemaVersion()) + { + } - SettlPriceType &wrap( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = - SettlPriceType(buffer, offset, bufferLength, actingVersion); - } + SettlPriceType &wrap( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = SettlPriceType(buffer, offset, bufferLength, actingVersion); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - encodedLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t encodedLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SettlPriceType &clear() { - std::uint8_t zero = 0; - std::memcpy(m_buffer + m_offset, &zero, sizeof(std::uint8_t)); - return *this; - } + SettlPriceType &clear() + { + std::uint8_t zero = 0; + std::memcpy(m_buffer + m_offset, &zero, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD bool isEmpty() const { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return 0 == val; - } + SBE_NODISCARD bool isEmpty() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return 0 == val; + } - SBE_NODISCARD std::uint8_t rawValue() const { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return val; - } + SBE_NODISCARD std::uint8_t rawValue() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return val; + } - SettlPriceType &rawValue(std::uint8_t value) { - std::memcpy(m_buffer + m_offset, &value, sizeof(std::uint8_t)); - return *this; - } + SettlPriceType &rawValue(std::uint8_t value) + { + std::memcpy(m_buffer + m_offset, &value, sizeof(std::uint8_t)); + return *this; + } - static bool finalDaily(const std::uint8_t bits) { - return (bits & (1u << 0u)) != 0; - } + static bool finalDaily(const std::uint8_t bits) + { + return (bits & (static_cast(1) << 0u)) != 0; + } - static std::uint8_t finalDaily(const std::uint8_t bits, const bool value) { - return value ? static_cast(bits | (1u << 0u)) - : static_cast(bits & ~(1u << 0u)); - } + static std::uint8_t finalDaily(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (static_cast(1) << 0u)) : static_cast(bits & ~(static_cast(1) << 0u)); + } - SBE_NODISCARD bool finalDaily() const { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return ((val) & (1u << 0u)) != 0; - } + SBE_NODISCARD bool finalDaily() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (static_cast(1) << 0u)) != 0; + } - SettlPriceType &finalDaily(const bool value) { - std::uint8_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); - bits = - (value ? static_cast((bits) | (1u << 0u)) - : static_cast((bits) & ~(1u << 0u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); - return *this; - } + SettlPriceType &finalDaily(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (static_cast(1) << 0u)) : static_cast((bits) & ~(static_cast(1) << 0u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } - static bool actual(const std::uint8_t bits) { - return (bits & (1u << 1u)) != 0; - } + static bool actual(const std::uint8_t bits) + { + return (bits & (static_cast(1) << 1u)) != 0; + } - static std::uint8_t actual(const std::uint8_t bits, const bool value) { - return value ? static_cast(bits | (1u << 1u)) - : static_cast(bits & ~(1u << 1u)); - } + static std::uint8_t actual(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (static_cast(1) << 1u)) : static_cast(bits & ~(static_cast(1) << 1u)); + } - SBE_NODISCARD bool actual() const { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return ((val) & (1u << 1u)) != 0; - } + SBE_NODISCARD bool actual() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (static_cast(1) << 1u)) != 0; + } - SettlPriceType &actual(const bool value) { - std::uint8_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); - bits = - (value ? static_cast((bits) | (1u << 1u)) - : static_cast((bits) & ~(1u << 1u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); - return *this; - } + SettlPriceType &actual(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (static_cast(1) << 1u)) : static_cast((bits) & ~(static_cast(1) << 1u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } - static bool rounded(const std::uint8_t bits) { - return (bits & (1u << 2u)) != 0; - } + static bool rounded(const std::uint8_t bits) + { + return (bits & (static_cast(1) << 2u)) != 0; + } - static std::uint8_t rounded(const std::uint8_t bits, const bool value) { - return value ? static_cast(bits | (1u << 2u)) - : static_cast(bits & ~(1u << 2u)); - } + static std::uint8_t rounded(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (static_cast(1) << 2u)) : static_cast(bits & ~(static_cast(1) << 2u)); + } - SBE_NODISCARD bool rounded() const { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return ((val) & (1u << 2u)) != 0; - } + SBE_NODISCARD bool rounded() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (static_cast(1) << 2u)) != 0; + } - SettlPriceType &rounded(const bool value) { - std::uint8_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); - bits = - (value ? static_cast((bits) | (1u << 2u)) - : static_cast((bits) & ~(1u << 2u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); - return *this; - } + SettlPriceType &rounded(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (static_cast(1) << 2u)) : static_cast((bits) & ~(static_cast(1) << 2u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } - static bool intraday(const std::uint8_t bits) { - return (bits & (1u << 3u)) != 0; - } + static bool intraday(const std::uint8_t bits) + { + return (bits & (static_cast(1) << 3u)) != 0; + } - static std::uint8_t intraday(const std::uint8_t bits, const bool value) { - return value ? static_cast(bits | (1u << 3u)) - : static_cast(bits & ~(1u << 3u)); - } + static std::uint8_t intraday(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (static_cast(1) << 3u)) : static_cast(bits & ~(static_cast(1) << 3u)); + } - SBE_NODISCARD bool intraday() const { - if (m_actingVersion < 4) { - return false; - } + SBE_NODISCARD bool intraday() const + { + if (m_actingVersion < 4) + { + return false; + } - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return ((val) & (1u << 3u)) != 0; - } + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (static_cast(1) << 3u)) != 0; + } - SettlPriceType &intraday(const bool value) { - std::uint8_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); - bits = - (value ? static_cast((bits) | (1u << 3u)) - : static_cast((bits) & ~(1u << 3u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); - return *this; - } + SettlPriceType &intraday(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (static_cast(1) << 3u)) : static_cast((bits) & ~(static_cast(1) << 3u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } - static bool reservedBits(const std::uint8_t bits) { - return (bits & (1u << 4u)) != 0; - } + static bool reservedBits(const std::uint8_t bits) + { + return (bits & (static_cast(1) << 4u)) != 0; + } - static std::uint8_t reservedBits(const std::uint8_t bits, const bool value) { - return value ? static_cast(bits | (1u << 4u)) - : static_cast(bits & ~(1u << 4u)); - } + static std::uint8_t reservedBits(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (static_cast(1) << 4u)) : static_cast(bits & ~(static_cast(1) << 4u)); + } - SBE_NODISCARD bool reservedBits() const { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return ((val) & (1u << 4u)) != 0; - } + SBE_NODISCARD bool reservedBits() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (static_cast(1) << 4u)) != 0; + } - SettlPriceType &reservedBits(const bool value) { - std::uint8_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); - bits = - (value ? static_cast((bits) | (1u << 4u)) - : static_cast((bits) & ~(1u << 4u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); - return *this; - } + SettlPriceType &reservedBits(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (static_cast(1) << 4u)) : static_cast((bits) & ~(static_cast(1) << 4u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } - static bool nullValue(const std::uint8_t bits) { - return (bits & (1u << 7u)) != 0; - } + static bool nullValue(const std::uint8_t bits) + { + return (bits & (static_cast(1) << 7u)) != 0; + } - static std::uint8_t nullValue(const std::uint8_t bits, const bool value) { - return value ? static_cast(bits | (1u << 7u)) - : static_cast(bits & ~(1u << 7u)); - } + static std::uint8_t nullValue(const std::uint8_t bits, const bool value) + { + return value ? static_cast(bits | (static_cast(1) << 7u)) : static_cast(bits & ~(static_cast(1) << 7u)); + } - SBE_NODISCARD bool nullValue() const { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); - return ((val) & (1u << 7u)) != 0; - } + SBE_NODISCARD bool nullValue() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset, sizeof(std::uint8_t)); + return ((val) & (static_cast(1) << 7u)) != 0; + } - SettlPriceType &nullValue(const bool value) { - std::uint8_t bits; - std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); - bits = - (value ? static_cast((bits) | (1u << 7u)) - : static_cast((bits) & ~(1u << 7u))); - std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); - return *this; - } + SettlPriceType &nullValue(const bool value) + { + std::uint8_t bits; + std::memcpy(&bits, m_buffer + m_offset, sizeof(std::uint8_t)); + bits = (value ? static_cast((bits) | (static_cast(1) << 7u)) : static_cast((bits) & ~(static_cast(1) << 7u))); + std::memcpy(m_buffer + m_offset, &bits, sizeof(std::uint8_t)); + return *this; + } - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, SettlPriceType writer) { - builder << '['; - bool atLeastOne = false; - if (writer.finalDaily()) { - builder << R"("finalDaily")"; - atLeastOne = true; - } - if (writer.actual()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("actual")"; - atLeastOne = true; - } - if (writer.rounded()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("rounded")"; - atLeastOne = true; - } - if (writer.intraday()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("intraday")"; - atLeastOne = true; - } - if (writer.reservedBits()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("reservedBits")"; - atLeastOne = true; - } - if (writer.nullValue()) { - if (atLeastOne) { - builder << ","; - } - builder << R"("nullValue")"; - } - builder << ']'; - return builder; - } + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, SettlPriceType writer) + { + builder << '['; + bool atLeastOne = false; + if (writer.finalDaily()) + { + builder << R"("finalDaily")"; + atLeastOne = true; + } + if (writer.actual()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("actual")"; + atLeastOne = true; + } + if (writer.rounded()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("rounded")"; + atLeastOne = true; + } + if (writer.intraday()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("intraday")"; + atLeastOne = true; + } + if (writer.reservedBits()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("reservedBits")"; + atLeastOne = true; + } + if (writer.nullValue()) + { + if (atLeastOne) + { + builder << ","; + } + builder << R"("nullValue")"; + } + builder << ']'; + return builder; + } }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/SnapshotFullRefresh38.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/SnapshotFullRefresh38.h index 9d17820e3..c5edee28c 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/SnapshotFullRefresh38.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/SnapshotFullRefresh38.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,1597 +86,1786 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class SnapshotFullRefresh38 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class SnapshotFullRefresh38 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(59); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(38); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - SnapshotFullRefresh38() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - SnapshotFullRefresh38( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - SnapshotFullRefresh38(char *buffer, const std::uint64_t bufferLength) - : SnapshotFullRefresh38( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + SnapshotFullRefresh38() = default; - SnapshotFullRefresh38( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : SnapshotFullRefresh38( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + SnapshotFullRefresh38( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)59; - } + SnapshotFullRefresh38(char *buffer, const std::uint64_t bufferLength) : + SnapshotFullRefresh38(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)38; - } + SnapshotFullRefresh38( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + SnapshotFullRefresh38(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(59); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "W"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(38); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SnapshotFullRefresh38 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = SnapshotFullRefresh38( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SnapshotFullRefresh38 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "W"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = SnapshotFullRefresh38( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + SnapshotFullRefresh38 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = SnapshotFullRefresh38(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - SnapshotFullRefresh38 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = SnapshotFullRefresh38( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + SnapshotFullRefresh38 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = SnapshotFullRefresh38( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + SnapshotFullRefresh38 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = SnapshotFullRefresh38(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + SnapshotFullRefresh38 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char *LastMsgSeqNumProcessedMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "SeqNum"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t lastMsgSeqNumProcessedId() SBE_NOEXCEPT { - return 369; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lastMsgSeqNumProcessedSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool lastMsgSeqNumProcessedInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *LastMsgSeqNumProcessedMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "SeqNum"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastMsgSeqNumProcessedId() SBE_NOEXCEPT + { + return 369; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastMsgSeqNumProcessedSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastMsgSeqNumProcessedInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lastMsgSeqNumProcessedSinceVersion(); + return m_actingVersion >= lastMsgSeqNumProcessedSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lastMsgSeqNumProcessedEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastMsgSeqNumProcessedEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint32_t - lastMsgSeqNumProcessedNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t lastMsgSeqNumProcessedNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t - lastMsgSeqNumProcessedMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t lastMsgSeqNumProcessedMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t - lastMsgSeqNumProcessedMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t lastMsgSeqNumProcessedMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t - lastMsgSeqNumProcessedEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t lastMsgSeqNumProcessedEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t lastMsgSeqNumProcessed() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t lastMsgSeqNumProcessed() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - SnapshotFullRefresh38 & - lastMsgSeqNumProcessed(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); - return *this; - } + SnapshotFullRefresh38 &lastMsgSeqNumProcessed(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - TotNumReportsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TotNumReportsMetaAttribute(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 totNumReportsId() SBE_NOEXCEPT { - return 911; - } + static SBE_CONSTEXPR std::uint16_t totNumReportsId() SBE_NOEXCEPT + { + return 911; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - totNumReportsSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNumReportsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= totNumReportsSinceVersion(); + return m_actingVersion >= totNumReportsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - totNumReportsEncodingOffset() SBE_NOEXCEPT { - return 4; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNumReportsEncodingOffset() SBE_NOEXCEPT + { + return 4; + } - static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - SnapshotFullRefresh38 & - totNumReports(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint32_t)); - return *this; - } + SnapshotFullRefresh38 &totNumReports(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { return 48; } + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityIDSinceVersion(); + return m_actingVersion >= securityIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t securityID() 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); + } - SnapshotFullRefresh38 &securityID(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; - } + SnapshotFullRefresh38 &securityID(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 * - RptSeqMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "SeqNum"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *RptSeqMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "SeqNum"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t rptSeqId() SBE_NOEXCEPT { return 83; } + static SBE_CONSTEXPR std::uint16_t rptSeqId() SBE_NOEXCEPT + { + return 83; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - rptSeqSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t rptSeqSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= rptSeqSinceVersion(); + return m_actingVersion >= rptSeqSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - rptSeqEncodingOffset() SBE_NOEXCEPT { - return 12; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t rptSeqEncodingOffset() SBE_NOEXCEPT + { + return 12; + } - static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - SnapshotFullRefresh38 &rptSeq(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint32_t)); - return *this; - } + SnapshotFullRefresh38 &rptSeq(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 16; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 16; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - SnapshotFullRefresh38 &transactTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint64_t)); - return *this; - } + SnapshotFullRefresh38 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint64_t)); + return *this; + } - SBE_NODISCARD static const char * - LastUpdateTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *LastUpdateTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t lastUpdateTimeId() SBE_NOEXCEPT { - return 779; - } + static SBE_CONSTEXPR std::uint16_t lastUpdateTimeId() SBE_NOEXCEPT + { + return 779; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lastUpdateTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastUpdateTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool lastUpdateTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool lastUpdateTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lastUpdateTimeSinceVersion(); + return m_actingVersion >= lastUpdateTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lastUpdateTimeEncodingOffset() SBE_NOEXCEPT { - return 24; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastUpdateTimeEncodingOffset() SBE_NOEXCEPT + { + return 24; + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t - lastUpdateTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t lastUpdateTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t lastUpdateTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t lastUpdateTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - SnapshotFullRefresh38 & - lastUpdateTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint64_t)); - return *this; - } + SnapshotFullRefresh38 &lastUpdateTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint64_t)); + return *this; + } - SBE_NODISCARD static const char * - TradeDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "LocalMktDate"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TradeDateMetaAttribute(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 tradeDateId() SBE_NOEXCEPT { return 75; } + static SBE_CONSTEXPR std::uint16_t tradeDateId() SBE_NOEXCEPT + { + return 75; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradeDateSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradeDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tradeDateSinceVersion(); + return m_actingVersion >= tradeDateSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradeDateEncodingOffset() SBE_NOEXCEPT { - return 32; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradeDateEncodingOffset() SBE_NOEXCEPT + { + return 32; + } - static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT { - return (std::uint16_t)65535; - } + static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } - static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - SnapshotFullRefresh38 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint16_t)); - return *this; - } + SnapshotFullRefresh38 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint16_t)); + return *this; + } - SBE_NODISCARD static const char *MDSecurityTradingStatusMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MDSecurityTradingStatusMetaAttribute(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 mDSecurityTradingStatusId() SBE_NOEXCEPT { - return 1682; - } + static SBE_CONSTEXPR std::uint16_t mDSecurityTradingStatusId() SBE_NOEXCEPT + { + return 1682; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDSecurityTradingStatusSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDSecurityTradingStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool mDSecurityTradingStatusInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool mDSecurityTradingStatusInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDSecurityTradingStatusSinceVersion(); + return m_actingVersion >= mDSecurityTradingStatusSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDSecurityTradingStatusEncodingOffset() SBE_NOEXCEPT { - return 34; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDSecurityTradingStatusEncodingOffset() SBE_NOEXCEPT + { + return 34; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDSecurityTradingStatusEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDSecurityTradingStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD SecurityTradingStatus::Value - mDSecurityTradingStatus() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 34, sizeof(std::uint8_t)); - return SecurityTradingStatus::get((val)); - } + SBE_NODISCARD SecurityTradingStatus::Value mDSecurityTradingStatus() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 34, sizeof(std::uint8_t)); + return SecurityTradingStatus::get((val)); + } - SnapshotFullRefresh38 &mDSecurityTradingStatus( - const SecurityTradingStatus::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 34, &val, sizeof(std::uint8_t)); - return *this; - } + SnapshotFullRefresh38 &mDSecurityTradingStatus(const SecurityTradingStatus::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 34, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - HighLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *HighLimitPriceMetaAttribute(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 highLimitPriceId() SBE_NOEXCEPT { - return 1149; - } + static SBE_CONSTEXPR std::uint16_t highLimitPriceId() SBE_NOEXCEPT + { + return 1149; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - highLimitPriceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t highLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= highLimitPriceSinceVersion(); + return m_actingVersion >= highLimitPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - highLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 35; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t highLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 35; + } - private: - PRICENULL m_highLimitPrice; +private: + PRICENULL m_highLimitPrice; - public: - SBE_NODISCARD PRICENULL &highLimitPrice() { - m_highLimitPrice.wrap( - m_buffer, m_offset + 35, m_actingVersion, m_bufferLength); - return m_highLimitPrice; - } +public: + SBE_NODISCARD PRICENULL &highLimitPrice() + { + m_highLimitPrice.wrap(m_buffer, m_offset + 35, m_actingVersion, m_bufferLength); + return m_highLimitPrice; + } - SBE_NODISCARD static const char * - LowLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *LowLimitPriceMetaAttribute(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 lowLimitPriceId() SBE_NOEXCEPT { - return 1148; - } + static SBE_CONSTEXPR std::uint16_t lowLimitPriceId() SBE_NOEXCEPT + { + return 1148; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lowLimitPriceSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lowLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lowLimitPriceSinceVersion(); + return m_actingVersion >= lowLimitPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lowLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 43; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lowLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 43; + } - private: - PRICENULL m_lowLimitPrice; +private: + PRICENULL m_lowLimitPrice; - public: - SBE_NODISCARD PRICENULL &lowLimitPrice() { - m_lowLimitPrice.wrap( - m_buffer, m_offset + 43, m_actingVersion, m_bufferLength); - return m_lowLimitPrice; - } +public: + SBE_NODISCARD PRICENULL &lowLimitPrice() + { + m_lowLimitPrice.wrap(m_buffer, m_offset + 43, m_actingVersion, m_bufferLength); + return m_lowLimitPrice; + } - SBE_NODISCARD static const char *MaxPriceVariationMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaxPriceVariationMetaAttribute(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 maxPriceVariationId() SBE_NOEXCEPT { - return 1143; - } + static SBE_CONSTEXPR std::uint16_t maxPriceVariationId() SBE_NOEXCEPT + { + return 1143; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maxPriceVariationSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxPriceVariationSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool maxPriceVariationInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maxPriceVariationInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maxPriceVariationSinceVersion(); + return m_actingVersion >= maxPriceVariationSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maxPriceVariationEncodingOffset() SBE_NOEXCEPT { - return 51; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxPriceVariationEncodingOffset() SBE_NOEXCEPT + { + return 51; + } - private: - PRICENULL m_maxPriceVariation; +private: + PRICENULL m_maxPriceVariation; - public: - SBE_NODISCARD PRICENULL &maxPriceVariation() { - m_maxPriceVariation.wrap( - m_buffer, m_offset + 51, m_actingVersion, m_bufferLength); - return m_maxPriceVariation; - } +public: + SBE_NODISCARD PRICENULL &maxPriceVariation() + { + m_maxPriceVariation.wrap(m_buffer, m_offset + 51, m_actingVersion, m_bufferLength); + return m_maxPriceVariation; + } - class NoMDEntries { + class NoMDEntries + { 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; + 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; - } + 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 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) { + 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(22)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 22; + 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 22; + } + + 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 NoMDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT + { + return 270; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICENULL m_mDEntryPx; + +public: + SBE_NODISCARD PRICENULL &mDEntryPx() + { + m_mDEntryPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_mDEntryPx; + } + + SBE_NODISCARD static const char *MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT + { + return 271; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntrySizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntrySizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t mDEntrySize() 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); + } + + NoMDEntries &mDEntrySize(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 *NumberOfOrdersMetaAttribute(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 numberOfOrdersId() SBE_NOEXCEPT + { + return 346; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t numberOfOrdersSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool numberOfOrdersInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= numberOfOrdersSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t numberOfOrdersEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t numberOfOrdersEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t numberOfOrders() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &numberOfOrders(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *MDPriceLevelMetaAttribute(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 mDPriceLevelId() SBE_NOEXCEPT + { + return 1023; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDPriceLevelSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDPriceLevelInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDPriceLevelSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDPriceLevelEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::int8_t mDPriceLevelNullValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::int8_t mDPriceLevelMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t mDPriceLevelMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t mDPriceLevelEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t mDPriceLevel() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::int8_t)); + return (val); + } + + NoMDEntries &mDPriceLevel(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::int8_t)); + return *this; + } + + SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute(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 tradingReferenceDateId() SBE_NOEXCEPT + { + return 5796; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingReferenceDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= tradingReferenceDateSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } + + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } + + static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoMDEntries &tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char *OpenCloseSettlFlagMetaAttribute(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 openCloseSettlFlagId() SBE_NOEXCEPT + { + return 286; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t openCloseSettlFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool openCloseSettlFlagInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= openCloseSettlFlagSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t openCloseSettlFlagEncodingOffset() SBE_NOEXCEPT + { + return 19; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t openCloseSettlFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OpenCloseSettlFlag::Value openCloseSettlFlag() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 19, sizeof(std::uint8_t)); + return OpenCloseSettlFlag::get((val)); + } + + NoMDEntries &openCloseSettlFlag(const OpenCloseSettlFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 19, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *SettlPriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT + { + return 731; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t settlPriceTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= settlPriceTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + private: + SettlPriceType m_settlPriceType; + + public: + SBE_NODISCARD SettlPriceType &settlPriceType() + { + m_settlPriceType.wrap(m_buffer, m_offset + 20, m_actingVersion, m_bufferLength); + return m_settlPriceType; + } + + static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDEntryType::Value mDEntryType() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 21, sizeof(char)); + return MDEntryType::get((val)); + } + + NoMDEntries &mDEntryType(const MDEntryType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 21, &val, sizeof(char)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("MDEntryPx": )"; + builder << writer.mDEntryPx(); + + builder << ", "; + builder << R"("MDEntrySize": )"; + builder << +writer.mDEntrySize(); + + builder << ", "; + builder << R"("NumberOfOrders": )"; + builder << +writer.numberOfOrders(); + + builder << ", "; + builder << R"("MDPriceLevel": )"; + builder << +writer.mDPriceLevel(); + + builder << ", "; + builder << R"("TradingReferenceDate": )"; + builder << +writer.tradingReferenceDate(); + + builder << ", "; + builder << R"("OpenCloseSettlFlag": )"; + builder << '"' << writer.openCloseSettlFlag() << '"'; + + builder << ", "; + builder << R"("SettlPriceType": )"; + builder << writer.settlPriceType(); + + builder << ", "; + builder << R"("MDEntryType": )"; + builder << '"' << writer.mDEntryType() << '"'; + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)22); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 22; - 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; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 22; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT { - return 270; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryPxSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDEntryPxSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryPxEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - private: - PRICENULL m_mDEntryPx; - - public: - SBE_NODISCARD PRICENULL &mDEntryPx() { - m_mDEntryPx.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_mDEntryPx; - } - - SBE_NODISCARD static const char * - MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT { - return 271; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntrySizeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntrySizeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t mDEntrySize() 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); - } - - NoMDEntries &mDEntrySize(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 *NumberOfOrdersMetaAttribute( - 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 numberOfOrdersId() SBE_NOEXCEPT { - return 346; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - numberOfOrdersSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool numberOfOrdersInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= numberOfOrdersSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - numberOfOrdersEncodingOffset() SBE_NOEXCEPT { - return 12; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - numberOfOrdersEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t numberOfOrders() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &numberOfOrders(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char *MDPriceLevelMetaAttribute( - 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 mDPriceLevelId() SBE_NOEXCEPT { - return 1023; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDPriceLevelSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDPriceLevelInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDPriceLevelSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDPriceLevelEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - static SBE_CONSTEXPR std::int8_t mDPriceLevelNullValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::int8_t mDPriceLevelMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t mDPriceLevelMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t - mDPriceLevelEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::int8_t mDPriceLevel() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::int8_t)); - return (val); - } - - NoMDEntries &mDPriceLevel(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::int8_t)); - return *this; - } - - SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute( - 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 tradingReferenceDateId() SBE_NOEXCEPT { - return 5796; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradingReferenceDateSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= tradingReferenceDateSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingOffset() SBE_NOEXCEPT { - return 17; - } - - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateNullValue() SBE_NOEXCEPT { - return (std::uint16_t)65535; - } - - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } - - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } - - static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingLength() SBE_NOEXCEPT { - return 2; - } - - SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } - - NoMDEntries & - tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint16_t)); - return *this; - } - - SBE_NODISCARD static const char *OpenCloseSettlFlagMetaAttribute( - 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 openCloseSettlFlagId() SBE_NOEXCEPT { - return 286; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - openCloseSettlFlagSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool openCloseSettlFlagInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= openCloseSettlFlagSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - openCloseSettlFlagEncodingOffset() SBE_NOEXCEPT { - return 19; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - openCloseSettlFlagEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD OpenCloseSettlFlag::Value - openCloseSettlFlag() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 19, sizeof(std::uint8_t)); - return OpenCloseSettlFlag::get((val)); - } - - NoMDEntries & - openCloseSettlFlag(const OpenCloseSettlFlag::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 19, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char *SettlPriceTypeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT { - return 731; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - settlPriceTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= settlPriceTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingOffset() SBE_NOEXCEPT { - return 20; - } - - private: - SettlPriceType m_settlPriceType; - - public: - SBE_NODISCARD SettlPriceType &settlPriceType() { - m_settlPriceType.wrap( - m_buffer, m_offset + 20, m_actingVersion, m_bufferLength); - return m_settlPriceType; - } - - static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 21; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDEntryType::Value mDEntryType() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 21, sizeof(char)); - return MDEntryType::get((val)); - } - - NoMDEntries &mDEntryType(const MDEntryType::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 21, &val, sizeof(char)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("MDEntryPx": )"; - builder << writer.mDEntryPx(); - - builder << ", "; - builder << R"("MDEntrySize": )"; - builder << +writer.mDEntrySize(); - - builder << ", "; - builder << R"("NumberOfOrders": )"; - builder << +writer.numberOfOrders(); - - builder << ", "; - builder << R"("MDPriceLevel": )"; - builder << +writer.mDPriceLevel(); - - builder << ", "; - builder << R"("TradingReferenceDate": )"; - builder << +writer.tradingReferenceDate(); - - builder << ", "; - builder << R"("OpenCloseSettlFlag": )"; - builder << '"' << writer.openCloseSettlFlag() << '"'; - - builder << ", "; - builder << R"("SettlPriceType": )"; - builder << writer.settlPriceType(); - - builder << ", "; - builder << R"("MDEntryType": )"; - builder << '"' << writer.mDEntryType() << '"'; - - builder << '}'; - - return builder; - } - }; - - private: - NoMDEntries m_noMDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } - - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - SnapshotFullRefresh38 _writer) { - SnapshotFullRefresh38 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "SnapshotFullRefresh38", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("LastMsgSeqNumProcessed": )"; - builder << +writer.lastMsgSeqNumProcessed(); - - builder << ", "; - builder << R"("TotNumReports": )"; - builder << +writer.totNumReports(); - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("RptSeq": )"; - builder << +writer.rptSeq(); - - builder << ", "; - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - builder << R"("LastUpdateTime": )"; - builder << +writer.lastUpdateTime(); - - builder << ", "; - builder << R"("TradeDate": )"; - builder << +writer.tradeDate(); - - builder << ", "; - builder << R"("MDSecurityTradingStatus": )"; - builder << '"' << writer.mDSecurityTradingStatus() << '"'; - - builder << ", "; - builder << R"("HighLimitPrice": )"; - builder << writer.highLimitPrice(); - - builder << ", "; - builder << R"("LowLimitPrice": )"; - builder << writer.lowLimitPrice(); - - builder << ", "; - builder << R"("MaxPriceVariation": )"; - builder << writer.maxPriceVariation(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, SnapshotFullRefresh38 _writer) +{ + SnapshotFullRefresh38 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "SnapshotFullRefresh38", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("LastMsgSeqNumProcessed": )"; + builder << +writer.lastMsgSeqNumProcessed(); + + builder << ", "; + builder << R"("TotNumReports": )"; + builder << +writer.totNumReports(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("RptSeq": )"; + builder << +writer.rptSeq(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("LastUpdateTime": )"; + builder << +writer.lastUpdateTime(); + + builder << ", "; + builder << R"("TradeDate": )"; + builder << +writer.tradeDate(); + + builder << ", "; + builder << R"("MDSecurityTradingStatus": )"; + builder << '"' << writer.mDSecurityTradingStatus() << '"'; + + builder << ", "; + builder << R"("HighLimitPrice": )"; + builder << writer.highLimitPrice(); + + builder << ", "; + builder << R"("LowLimitPrice": )"; + builder << writer.lowLimitPrice(); + + builder << ", "; + builder << R"("MaxPriceVariation": )"; + builder << writer.maxPriceVariation(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noMDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/SnapshotFullRefresh52.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/SnapshotFullRefresh52.h index a9fd6eed9..c90549d38 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/SnapshotFullRefresh52.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/SnapshotFullRefresh52.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,1597 +86,1786 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class SnapshotFullRefresh52 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class SnapshotFullRefresh52 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(59); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(52); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - SnapshotFullRefresh52() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - SnapshotFullRefresh52( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - SnapshotFullRefresh52(char *buffer, const std::uint64_t bufferLength) - : SnapshotFullRefresh52( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + SnapshotFullRefresh52() = default; - SnapshotFullRefresh52( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : SnapshotFullRefresh52( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + SnapshotFullRefresh52( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)59; - } + SnapshotFullRefresh52(char *buffer, const std::uint64_t bufferLength) : + SnapshotFullRefresh52(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)52; - } + SnapshotFullRefresh52( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + SnapshotFullRefresh52(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(59); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "W"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(52); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SnapshotFullRefresh52 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = SnapshotFullRefresh52( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SnapshotFullRefresh52 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "W"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = SnapshotFullRefresh52( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + SnapshotFullRefresh52 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = SnapshotFullRefresh52(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - SnapshotFullRefresh52 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = SnapshotFullRefresh52( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + SnapshotFullRefresh52 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = SnapshotFullRefresh52( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + SnapshotFullRefresh52 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = SnapshotFullRefresh52(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + SnapshotFullRefresh52 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char *LastMsgSeqNumProcessedMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "SeqNum"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t lastMsgSeqNumProcessedId() SBE_NOEXCEPT { - return 369; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lastMsgSeqNumProcessedSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool lastMsgSeqNumProcessedInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *LastMsgSeqNumProcessedMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "SeqNum"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastMsgSeqNumProcessedId() SBE_NOEXCEPT + { + return 369; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastMsgSeqNumProcessedSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastMsgSeqNumProcessedInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lastMsgSeqNumProcessedSinceVersion(); + return m_actingVersion >= lastMsgSeqNumProcessedSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lastMsgSeqNumProcessedEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastMsgSeqNumProcessedEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint32_t - lastMsgSeqNumProcessedNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t lastMsgSeqNumProcessedNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t - lastMsgSeqNumProcessedMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t lastMsgSeqNumProcessedMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t - lastMsgSeqNumProcessedMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t lastMsgSeqNumProcessedMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t - lastMsgSeqNumProcessedEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t lastMsgSeqNumProcessedEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t lastMsgSeqNumProcessed() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t lastMsgSeqNumProcessed() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - SnapshotFullRefresh52 & - lastMsgSeqNumProcessed(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); - return *this; - } + SnapshotFullRefresh52 &lastMsgSeqNumProcessed(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - TotNumReportsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TotNumReportsMetaAttribute(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 totNumReportsId() SBE_NOEXCEPT { - return 911; - } + static SBE_CONSTEXPR std::uint16_t totNumReportsId() SBE_NOEXCEPT + { + return 911; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - totNumReportsSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNumReportsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= totNumReportsSinceVersion(); + return m_actingVersion >= totNumReportsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - totNumReportsEncodingOffset() SBE_NOEXCEPT { - return 4; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNumReportsEncodingOffset() SBE_NOEXCEPT + { + return 4; + } - static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - SnapshotFullRefresh52 & - totNumReports(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint32_t)); - return *this; - } + SnapshotFullRefresh52 &totNumReports(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { return 48; } + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityIDSinceVersion(); + return m_actingVersion >= securityIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t securityID() 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); + } - SnapshotFullRefresh52 &securityID(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; - } + SnapshotFullRefresh52 &securityID(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 * - RptSeqMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *RptSeqMetaAttribute(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 rptSeqId() SBE_NOEXCEPT { return 83; } + static SBE_CONSTEXPR std::uint16_t rptSeqId() SBE_NOEXCEPT + { + return 83; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - rptSeqSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t rptSeqSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool rptSeqInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= rptSeqSinceVersion(); + return m_actingVersion >= rptSeqSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - rptSeqEncodingOffset() SBE_NOEXCEPT { - return 12; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t rptSeqEncodingOffset() SBE_NOEXCEPT + { + return 12; + } - static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t rptSeqNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t rptSeqMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t rptSeqMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t rptSeqEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t rptSeq() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - SnapshotFullRefresh52 &rptSeq(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint32_t)); - return *this; - } + SnapshotFullRefresh52 &rptSeq(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 16; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 16; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - SnapshotFullRefresh52 &transactTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint64_t)); - return *this; - } + SnapshotFullRefresh52 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint64_t)); + return *this; + } - SBE_NODISCARD static const char * - LastUpdateTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *LastUpdateTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t lastUpdateTimeId() SBE_NOEXCEPT { - return 779; - } + static SBE_CONSTEXPR std::uint16_t lastUpdateTimeId() SBE_NOEXCEPT + { + return 779; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lastUpdateTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastUpdateTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool lastUpdateTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool lastUpdateTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lastUpdateTimeSinceVersion(); + return m_actingVersion >= lastUpdateTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lastUpdateTimeEncodingOffset() SBE_NOEXCEPT { - return 24; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastUpdateTimeEncodingOffset() SBE_NOEXCEPT + { + return 24; + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t lastUpdateTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t - lastUpdateTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t lastUpdateTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t lastUpdateTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t lastUpdateTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - SnapshotFullRefresh52 & - lastUpdateTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint64_t)); - return *this; - } + SnapshotFullRefresh52 &lastUpdateTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::uint64_t)); + return *this; + } - SBE_NODISCARD static const char * - TradeDateMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "LocalMktDate"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TradeDateMetaAttribute(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 tradeDateId() SBE_NOEXCEPT { return 75; } + static SBE_CONSTEXPR std::uint16_t tradeDateId() SBE_NOEXCEPT + { + return 75; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradeDateSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradeDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool tradeDateInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= tradeDateSinceVersion(); + return m_actingVersion >= tradeDateSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradeDateEncodingOffset() SBE_NOEXCEPT { - return 32; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradeDateEncodingOffset() SBE_NOEXCEPT + { + return 32; + } - static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT { - return (std::uint16_t)65535; - } + static SBE_CONSTEXPR std::uint16_t tradeDateNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } - static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } + static SBE_CONSTEXPR std::uint16_t tradeDateMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } - static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } + static SBE_CONSTEXPR std::uint16_t tradeDateMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } - static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT { - return 2; - } + static SBE_CONSTEXPR std::size_t tradeDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } - SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } + SBE_NODISCARD std::uint16_t tradeDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } - SnapshotFullRefresh52 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint16_t)); - return *this; - } + SnapshotFullRefresh52 &tradeDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint16_t)); + return *this; + } - SBE_NODISCARD static const char *MDSecurityTradingStatusMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MDSecurityTradingStatusMetaAttribute(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 mDSecurityTradingStatusId() SBE_NOEXCEPT { - return 1682; - } + static SBE_CONSTEXPR std::uint16_t mDSecurityTradingStatusId() SBE_NOEXCEPT + { + return 1682; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDSecurityTradingStatusSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDSecurityTradingStatusSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool mDSecurityTradingStatusInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool mDSecurityTradingStatusInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDSecurityTradingStatusSinceVersion(); + return m_actingVersion >= mDSecurityTradingStatusSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDSecurityTradingStatusEncodingOffset() SBE_NOEXCEPT { - return 34; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDSecurityTradingStatusEncodingOffset() SBE_NOEXCEPT + { + return 34; + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDSecurityTradingStatusEncodingLength() SBE_NOEXCEPT { - return 1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDSecurityTradingStatusEncodingLength() SBE_NOEXCEPT + { + return 1; + } - SBE_NODISCARD SecurityTradingStatus::Value - mDSecurityTradingStatus() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 34, sizeof(std::uint8_t)); - return SecurityTradingStatus::get((val)); - } + SBE_NODISCARD SecurityTradingStatus::Value mDSecurityTradingStatus() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 34, sizeof(std::uint8_t)); + return SecurityTradingStatus::get((val)); + } - SnapshotFullRefresh52 &mDSecurityTradingStatus( - const SecurityTradingStatus::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 34, &val, sizeof(std::uint8_t)); - return *this; - } + SnapshotFullRefresh52 &mDSecurityTradingStatus(const SecurityTradingStatus::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 34, &val, sizeof(std::uint8_t)); + return *this; + } - SBE_NODISCARD static const char * - HighLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *HighLimitPriceMetaAttribute(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 highLimitPriceId() SBE_NOEXCEPT { - return 1149; - } + static SBE_CONSTEXPR std::uint16_t highLimitPriceId() SBE_NOEXCEPT + { + return 1149; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - highLimitPriceSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t highLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool highLimitPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= highLimitPriceSinceVersion(); + return m_actingVersion >= highLimitPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - highLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 35; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t highLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 35; + } - private: - PRICENULL9 m_highLimitPrice; +private: + PRICENULL9 m_highLimitPrice; - public: - SBE_NODISCARD PRICENULL9 &highLimitPrice() { - m_highLimitPrice.wrap( - m_buffer, m_offset + 35, m_actingVersion, m_bufferLength); - return m_highLimitPrice; - } +public: + SBE_NODISCARD PRICENULL9 &highLimitPrice() + { + m_highLimitPrice.wrap(m_buffer, m_offset + 35, m_actingVersion, m_bufferLength); + return m_highLimitPrice; + } - SBE_NODISCARD static const char * - LowLimitPriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *LowLimitPriceMetaAttribute(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 lowLimitPriceId() SBE_NOEXCEPT { - return 1148; - } + static SBE_CONSTEXPR std::uint16_t lowLimitPriceId() SBE_NOEXCEPT + { + return 1148; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lowLimitPriceSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lowLimitPriceSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool lowLimitPriceInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lowLimitPriceSinceVersion(); + return m_actingVersion >= lowLimitPriceSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lowLimitPriceEncodingOffset() SBE_NOEXCEPT { - return 43; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lowLimitPriceEncodingOffset() SBE_NOEXCEPT + { + return 43; + } - private: - PRICENULL9 m_lowLimitPrice; +private: + PRICENULL9 m_lowLimitPrice; - public: - SBE_NODISCARD PRICENULL9 &lowLimitPrice() { - m_lowLimitPrice.wrap( - m_buffer, m_offset + 43, m_actingVersion, m_bufferLength); - return m_lowLimitPrice; - } +public: + SBE_NODISCARD PRICENULL9 &lowLimitPrice() + { + m_lowLimitPrice.wrap(m_buffer, m_offset + 43, m_actingVersion, m_bufferLength); + return m_lowLimitPrice; + } - SBE_NODISCARD static const char *MaxPriceVariationMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Price"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *MaxPriceVariationMetaAttribute(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 maxPriceVariationId() SBE_NOEXCEPT { - return 1143; - } + static SBE_CONSTEXPR std::uint16_t maxPriceVariationId() SBE_NOEXCEPT + { + return 1143; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - maxPriceVariationSinceVersion() SBE_NOEXCEPT { - return 9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t maxPriceVariationSinceVersion() SBE_NOEXCEPT + { + return 9; + } - SBE_NODISCARD bool maxPriceVariationInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool maxPriceVariationInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= maxPriceVariationSinceVersion(); + return m_actingVersion >= maxPriceVariationSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - maxPriceVariationEncodingOffset() SBE_NOEXCEPT { - return 51; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t maxPriceVariationEncodingOffset() SBE_NOEXCEPT + { + return 51; + } - private: - PRICENULL9 m_maxPriceVariation; +private: + PRICENULL9 m_maxPriceVariation; - public: - SBE_NODISCARD PRICENULL9 &maxPriceVariation() { - m_maxPriceVariation.wrap( - m_buffer, m_offset + 51, m_actingVersion, m_bufferLength); - return m_maxPriceVariation; - } +public: + SBE_NODISCARD PRICENULL9 &maxPriceVariation() + { + m_maxPriceVariation.wrap(m_buffer, m_offset + 51, m_actingVersion, m_bufferLength); + return m_maxPriceVariation; + } - class NoMDEntries { + class NoMDEntries + { 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; + 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; - } + 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 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) { + 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(22)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 22; + 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 22; + } + + 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 NoMDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT + { + return 270; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryPxSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryPxEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + +private: + PRICENULL9 m_mDEntryPx; + +public: + SBE_NODISCARD PRICENULL9 &mDEntryPx() + { + m_mDEntryPx.wrap(m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); + return m_mDEntryPx; + } + + SBE_NODISCARD static const char *MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "optional"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT + { + return 271; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntrySizeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntrySizeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t mDEntrySizeEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t mDEntrySize() 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); + } + + NoMDEntries &mDEntrySize(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 *NumberOfOrdersMetaAttribute(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 numberOfOrdersId() SBE_NOEXCEPT + { + return 346; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t numberOfOrdersSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool numberOfOrdersInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= numberOfOrdersSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t numberOfOrdersEncodingOffset() SBE_NOEXCEPT + { + return 12; + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersNullValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t numberOfOrdersMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t numberOfOrdersEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t numberOfOrders() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &numberOfOrders(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *MDPriceLevelMetaAttribute(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 mDPriceLevelId() SBE_NOEXCEPT + { + return 1023; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDPriceLevelSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDPriceLevelInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDPriceLevelSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDPriceLevelEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + + static SBE_CONSTEXPR std::int8_t mDPriceLevelNullValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::int8_t mDPriceLevelMinValue() SBE_NOEXCEPT + { + return static_cast(-127); + } + + static SBE_CONSTEXPR std::int8_t mDPriceLevelMaxValue() SBE_NOEXCEPT + { + return static_cast(127); + } + + static SBE_CONSTEXPR std::size_t mDPriceLevelEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD std::int8_t mDPriceLevel() const SBE_NOEXCEPT + { + std::int8_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::int8_t)); + return (val); + } + + NoMDEntries &mDPriceLevel(const std::int8_t value) SBE_NOEXCEPT + { + std::int8_t val = (value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::int8_t)); + return *this; + } + + SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute(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 tradingReferenceDateId() SBE_NOEXCEPT + { + return 5796; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t tradingReferenceDateSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= tradingReferenceDateSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingOffset() SBE_NOEXCEPT + { + return 17; + } + + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateNullValue() SBE_NOEXCEPT + { + return static_cast(65535); + } + + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMinValue() SBE_NOEXCEPT + { + return static_cast(0); + } + + static SBE_CONSTEXPR std::uint16_t tradingReferenceDateMaxValue() SBE_NOEXCEPT + { + return static_cast(65534); + } + + static SBE_CONSTEXPR std::size_t tradingReferenceDateEncodingLength() SBE_NOEXCEPT + { + return 2; + } + + SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT + { + std::uint16_t val; + std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint16_t)); + return SBE_LITTLE_ENDIAN_ENCODE_16(val); + } + + NoMDEntries &tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT + { + std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); + std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint16_t)); + return *this; + } + + SBE_NODISCARD static const char *OpenCloseSettlFlagMetaAttribute(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 openCloseSettlFlagId() SBE_NOEXCEPT + { + return 286; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t openCloseSettlFlagSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool openCloseSettlFlagInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= openCloseSettlFlagSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t openCloseSettlFlagEncodingOffset() SBE_NOEXCEPT + { + return 19; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t openCloseSettlFlagEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD OpenCloseSettlFlag::Value openCloseSettlFlag() const + { + std::uint8_t val; + std::memcpy(&val, m_buffer + m_offset + 19, sizeof(std::uint8_t)); + return OpenCloseSettlFlag::get((val)); + } + + NoMDEntries &openCloseSettlFlag(const OpenCloseSettlFlag::Value value) SBE_NOEXCEPT + { + std::uint8_t val = (value); + std::memcpy(m_buffer + m_offset + 19, &val, sizeof(std::uint8_t)); + return *this; + } + + SBE_NODISCARD static const char *SettlPriceTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "MultipleCharValue"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT + { + return 731; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t settlPriceTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= settlPriceTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingOffset() SBE_NOEXCEPT + { + return 20; + } + + private: + SettlPriceType m_settlPriceType; + + public: + SBE_NODISCARD SettlPriceType &settlPriceType() + { + m_settlPriceType.wrap(m_buffer, m_offset + 20, m_actingVersion, m_bufferLength); + return m_settlPriceType; + } + + static SBE_CONSTEXPR std::size_t settlPriceTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 21; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDEntryType::Value mDEntryType() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 21, sizeof(char)); + return MDEntryType::get((val)); + } + + NoMDEntries &mDEntryType(const MDEntryType::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 21, &val, sizeof(char)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("MDEntryPx": )"; + builder << writer.mDEntryPx(); + + builder << ", "; + builder << R"("MDEntrySize": )"; + builder << +writer.mDEntrySize(); + + builder << ", "; + builder << R"("NumberOfOrders": )"; + builder << +writer.numberOfOrders(); + + builder << ", "; + builder << R"("MDPriceLevel": )"; + builder << +writer.mDPriceLevel(); + + builder << ", "; + builder << R"("TradingReferenceDate": )"; + builder << +writer.tradingReferenceDate(); + + builder << ", "; + builder << R"("OpenCloseSettlFlag": )"; + builder << '"' << writer.openCloseSettlFlag() << '"'; + + builder << ", "; + builder << R"("SettlPriceType": )"; + builder << writer.settlPriceType(); + + builder << ", "; + builder << R"("MDEntryType": )"; + builder << '"' << writer.mDEntryType() << '"'; + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)22); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 22; - 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; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 22; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT { - return 270; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryPxSinceVersion() SBE_NOEXCEPT { - return 9; - } - - SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= mDEntryPxSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryPxEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - private: - PRICENULL9 m_mDEntryPx; - - public: - SBE_NODISCARD PRICENULL9 &mDEntryPx() { - m_mDEntryPx.wrap( - m_buffer, m_offset + 0, m_actingVersion, m_bufferLength); - return m_mDEntryPx; - } - - SBE_NODISCARD static const char * - MDEntrySizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "optional"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntrySizeId() SBE_NOEXCEPT { - return 271; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntrySizeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntrySizeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntrySizeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDEntrySizeMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - mDEntrySizeEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t mDEntrySize() 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); - } - - NoMDEntries &mDEntrySize(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 *NumberOfOrdersMetaAttribute( - 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 numberOfOrdersId() SBE_NOEXCEPT { - return 346; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - numberOfOrdersSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool numberOfOrdersInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= numberOfOrdersSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - numberOfOrdersEncodingOffset() SBE_NOEXCEPT { - return 12; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersNullValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t numberOfOrdersMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - numberOfOrdersEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t numberOfOrders() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &numberOfOrders(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char *MDPriceLevelMetaAttribute( - 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 mDPriceLevelId() SBE_NOEXCEPT { - return 1023; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDPriceLevelSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDPriceLevelInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDPriceLevelSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDPriceLevelEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - static SBE_CONSTEXPR std::int8_t mDPriceLevelNullValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::int8_t mDPriceLevelMinValue() SBE_NOEXCEPT { - return (std::int8_t)-127; - } - - static SBE_CONSTEXPR std::int8_t mDPriceLevelMaxValue() SBE_NOEXCEPT { - return (std::int8_t)127; - } - - static SBE_CONSTEXPR std::size_t - mDPriceLevelEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD std::int8_t mDPriceLevel() const SBE_NOEXCEPT { - std::int8_t val; - std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::int8_t)); - return (val); - } - - NoMDEntries &mDPriceLevel(const std::int8_t value) SBE_NOEXCEPT { - std::int8_t val = (value); - std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::int8_t)); - return *this; - } - - SBE_NODISCARD static const char *TradingReferenceDateMetaAttribute( - 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 tradingReferenceDateId() SBE_NOEXCEPT { - return 5796; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - tradingReferenceDateSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool tradingReferenceDateInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= tradingReferenceDateSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingOffset() SBE_NOEXCEPT { - return 17; - } - - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateNullValue() SBE_NOEXCEPT { - return (std::uint16_t)65535; - } - - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMinValue() SBE_NOEXCEPT { - return (std::uint16_t)0; - } - - static SBE_CONSTEXPR std::uint16_t - tradingReferenceDateMaxValue() SBE_NOEXCEPT { - return (std::uint16_t)65534; - } - - static SBE_CONSTEXPR std::size_t - tradingReferenceDateEncodingLength() SBE_NOEXCEPT { - return 2; - } - - SBE_NODISCARD std::uint16_t tradingReferenceDate() const SBE_NOEXCEPT { - std::uint16_t val; - std::memcpy(&val, m_buffer + m_offset + 17, sizeof(std::uint16_t)); - return SBE_LITTLE_ENDIAN_ENCODE_16(val); - } - - NoMDEntries & - tradingReferenceDate(const std::uint16_t value) SBE_NOEXCEPT { - std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value); - std::memcpy(m_buffer + m_offset + 17, &val, sizeof(std::uint16_t)); - return *this; - } - - SBE_NODISCARD static const char *OpenCloseSettlFlagMetaAttribute( - 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 openCloseSettlFlagId() SBE_NOEXCEPT { - return 286; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - openCloseSettlFlagSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool openCloseSettlFlagInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= openCloseSettlFlagSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - openCloseSettlFlagEncodingOffset() SBE_NOEXCEPT { - return 19; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - openCloseSettlFlagEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD OpenCloseSettlFlag::Value - openCloseSettlFlag() const SBE_NOEXCEPT { - std::uint8_t val; - std::memcpy(&val, m_buffer + m_offset + 19, sizeof(std::uint8_t)); - return OpenCloseSettlFlag::get((val)); - } - - NoMDEntries & - openCloseSettlFlag(const OpenCloseSettlFlag::Value value) SBE_NOEXCEPT { - std::uint8_t val = (value); - std::memcpy(m_buffer + m_offset + 19, &val, sizeof(std::uint8_t)); - return *this; - } - - SBE_NODISCARD static const char *SettlPriceTypeMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "MultipleCharValue"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t settlPriceTypeId() SBE_NOEXCEPT { - return 731; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - settlPriceTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool settlPriceTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= settlPriceTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingOffset() SBE_NOEXCEPT { - return 20; - } - - private: - SettlPriceType m_settlPriceType; - - public: - SBE_NODISCARD SettlPriceType &settlPriceType() { - m_settlPriceType.wrap( - m_buffer, m_offset + 20, m_actingVersion, m_bufferLength); - return m_settlPriceType; - } - - static SBE_CONSTEXPR std::size_t - settlPriceTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 21; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDEntryType::Value mDEntryType() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 21, sizeof(char)); - return MDEntryType::get((val)); - } - - NoMDEntries &mDEntryType(const MDEntryType::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 21, &val, sizeof(char)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("MDEntryPx": )"; - builder << writer.mDEntryPx(); - - builder << ", "; - builder << R"("MDEntrySize": )"; - builder << +writer.mDEntrySize(); - - builder << ", "; - builder << R"("NumberOfOrders": )"; - builder << +writer.numberOfOrders(); - - builder << ", "; - builder << R"("MDPriceLevel": )"; - builder << +writer.mDPriceLevel(); - - builder << ", "; - builder << R"("TradingReferenceDate": )"; - builder << +writer.tradingReferenceDate(); - - builder << ", "; - builder << R"("OpenCloseSettlFlag": )"; - builder << '"' << writer.openCloseSettlFlag() << '"'; - - builder << ", "; - builder << R"("SettlPriceType": )"; - builder << writer.settlPriceType(); - - builder << ", "; - builder << R"("MDEntryType": )"; - builder << '"' << writer.mDEntryType() << '"'; - - builder << '}'; - - return builder; - } - }; - - private: - NoMDEntries m_noMDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } - - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - SnapshotFullRefresh52 _writer) { - SnapshotFullRefresh52 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "SnapshotFullRefresh52", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("LastMsgSeqNumProcessed": )"; - builder << +writer.lastMsgSeqNumProcessed(); - - builder << ", "; - builder << R"("TotNumReports": )"; - builder << +writer.totNumReports(); - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("RptSeq": )"; - builder << +writer.rptSeq(); - - builder << ", "; - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - builder << R"("LastUpdateTime": )"; - builder << +writer.lastUpdateTime(); - - builder << ", "; - builder << R"("TradeDate": )"; - builder << +writer.tradeDate(); - - builder << ", "; - builder << R"("MDSecurityTradingStatus": )"; - builder << '"' << writer.mDSecurityTradingStatus() << '"'; - - builder << ", "; - builder << R"("HighLimitPrice": )"; - builder << writer.highLimitPrice(); - - builder << ", "; - builder << R"("LowLimitPrice": )"; - builder << writer.lowLimitPrice(); - - builder << ", "; - builder << R"("MaxPriceVariation": )"; - builder << writer.maxPriceVariation(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, SnapshotFullRefresh52 _writer) +{ + SnapshotFullRefresh52 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "SnapshotFullRefresh52", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("LastMsgSeqNumProcessed": )"; + builder << +writer.lastMsgSeqNumProcessed(); + + builder << ", "; + builder << R"("TotNumReports": )"; + builder << +writer.totNumReports(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("RptSeq": )"; + builder << +writer.rptSeq(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + builder << R"("LastUpdateTime": )"; + builder << +writer.lastUpdateTime(); + + builder << ", "; + builder << R"("TradeDate": )"; + builder << +writer.tradeDate(); + + builder << ", "; + builder << R"("MDSecurityTradingStatus": )"; + builder << '"' << writer.mDSecurityTradingStatus() << '"'; + + builder << ", "; + builder << R"("HighLimitPrice": )"; + builder << writer.highLimitPrice(); + + builder << ", "; + builder << R"("LowLimitPrice": )"; + builder << writer.lowLimitPrice(); + + builder << ", "; + builder << R"("MaxPriceVariation": )"; + builder << writer.maxPriceVariation(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noMDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/SnapshotFullRefreshOrderBook44.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/SnapshotFullRefreshOrderBook44.h index 34c0a724b..14b4ace6b 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/SnapshotFullRefreshOrderBook44.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/SnapshotFullRefreshOrderBook44.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,1137 +86,1312 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class SnapshotFullRefreshOrderBook44 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class SnapshotFullRefreshOrderBook44 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(28); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(44); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - SnapshotFullRefreshOrderBook44() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - SnapshotFullRefreshOrderBook44( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - SnapshotFullRefreshOrderBook44( - char *buffer, const std::uint64_t bufferLength) - : SnapshotFullRefreshOrderBook44( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + SnapshotFullRefreshOrderBook44() = default; - SnapshotFullRefreshOrderBook44( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : SnapshotFullRefreshOrderBook44( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + SnapshotFullRefreshOrderBook44( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)28; - } + SnapshotFullRefreshOrderBook44(char *buffer, const std::uint64_t bufferLength) : + SnapshotFullRefreshOrderBook44(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)44; - } + SnapshotFullRefreshOrderBook44( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + SnapshotFullRefreshOrderBook44(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(28); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "W"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(44); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SnapshotFullRefreshOrderBook44 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = SnapshotFullRefreshOrderBook44( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SnapshotFullRefreshOrderBook44 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "W"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = SnapshotFullRefreshOrderBook44( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + SnapshotFullRefreshOrderBook44 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = SnapshotFullRefreshOrderBook44(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - SnapshotFullRefreshOrderBook44 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = SnapshotFullRefreshOrderBook44( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + SnapshotFullRefreshOrderBook44 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = SnapshotFullRefreshOrderBook44( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + SnapshotFullRefreshOrderBook44 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = SnapshotFullRefreshOrderBook44(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + SnapshotFullRefreshOrderBook44 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char *LastMsgSeqNumProcessedMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "SeqNum"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t lastMsgSeqNumProcessedId() SBE_NOEXCEPT { - return 369; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lastMsgSeqNumProcessedSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool lastMsgSeqNumProcessedInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *LastMsgSeqNumProcessedMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "SeqNum"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastMsgSeqNumProcessedId() SBE_NOEXCEPT + { + return 369; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastMsgSeqNumProcessedSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastMsgSeqNumProcessedInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lastMsgSeqNumProcessedSinceVersion(); + return m_actingVersion >= lastMsgSeqNumProcessedSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lastMsgSeqNumProcessedEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastMsgSeqNumProcessedEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint32_t - lastMsgSeqNumProcessedNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t lastMsgSeqNumProcessedNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t - lastMsgSeqNumProcessedMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t lastMsgSeqNumProcessedMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t - lastMsgSeqNumProcessedMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t lastMsgSeqNumProcessedMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t - lastMsgSeqNumProcessedEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t lastMsgSeqNumProcessedEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t lastMsgSeqNumProcessed() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t lastMsgSeqNumProcessed() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - SnapshotFullRefreshOrderBook44 & - lastMsgSeqNumProcessed(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); - return *this; - } + SnapshotFullRefreshOrderBook44 &lastMsgSeqNumProcessed(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - TotNumReportsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TotNumReportsMetaAttribute(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 totNumReportsId() SBE_NOEXCEPT { - return 911; - } + static SBE_CONSTEXPR std::uint16_t totNumReportsId() SBE_NOEXCEPT + { + return 911; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - totNumReportsSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNumReportsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= totNumReportsSinceVersion(); + return m_actingVersion >= totNumReportsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - totNumReportsEncodingOffset() SBE_NOEXCEPT { - return 4; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNumReportsEncodingOffset() SBE_NOEXCEPT + { + return 4; + } - static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - SnapshotFullRefreshOrderBook44 & - totNumReports(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint32_t)); - return *this; - } + SnapshotFullRefreshOrderBook44 &totNumReports(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "String"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "String"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { return 48; } + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityIDSinceVersion(); + return m_actingVersion >= securityIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t securityID() 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); + } - SnapshotFullRefreshOrderBook44 & - securityID(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; - } + SnapshotFullRefreshOrderBook44 &securityID(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 * - NoChunksMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *NoChunksMetaAttribute(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 noChunksId() SBE_NOEXCEPT { - return 37709; - } + static SBE_CONSTEXPR std::uint16_t noChunksId() SBE_NOEXCEPT + { + return 37709; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noChunksSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noChunksSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool noChunksInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noChunksInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= noChunksSinceVersion(); + return m_actingVersion >= noChunksSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - noChunksEncodingOffset() SBE_NOEXCEPT { - return 12; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t noChunksEncodingOffset() SBE_NOEXCEPT + { + return 12; + } - static SBE_CONSTEXPR std::uint32_t noChunksNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t noChunksNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t noChunksMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t noChunksMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t noChunksMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t noChunksMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t noChunksEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t noChunksEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t noChunks() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t noChunks() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - SnapshotFullRefreshOrderBook44 & - noChunks(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint32_t)); - return *this; - } + SnapshotFullRefreshOrderBook44 &noChunks(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - CurrentChunkMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *CurrentChunkMetaAttribute(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 currentChunkId() SBE_NOEXCEPT { - return 37710; - } + static SBE_CONSTEXPR std::uint16_t currentChunkId() SBE_NOEXCEPT + { + return 37710; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - currentChunkSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t currentChunkSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool currentChunkInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool currentChunkInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= currentChunkSinceVersion(); + return m_actingVersion >= currentChunkSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - currentChunkEncodingOffset() SBE_NOEXCEPT { - return 16; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t currentChunkEncodingOffset() SBE_NOEXCEPT + { + return 16; + } - static SBE_CONSTEXPR std::uint32_t currentChunkNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t currentChunkNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t currentChunkMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t currentChunkMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t currentChunkMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t currentChunkMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t currentChunkEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t currentChunkEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t currentChunk() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t currentChunk() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - SnapshotFullRefreshOrderBook44 & - currentChunk(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); - return *this; - } + SnapshotFullRefreshOrderBook44 ¤tChunk(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 20; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 20; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - SnapshotFullRefreshOrderBook44 & - transactTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint64_t)); - return *this; - } + SnapshotFullRefreshOrderBook44 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint64_t)); + return *this; + } - class NoMDEntries { + class NoMDEntries + { 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; + 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; - } + 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 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) { + 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(29)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 29; + 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 29; + } + + 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 NoMDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *OrderIDMetaAttribute(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 orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoMDEntries &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *MDOrderPriorityMetaAttribute(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 mDOrderPriorityId() SBE_NOEXCEPT + { + return 37707; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDOrderPrioritySinceVersion() SBE_NOEXCEPT + { + return 7; + } + + SBE_NODISCARD bool mDOrderPriorityInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDOrderPrioritySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDOrderPriorityEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityNullValue() SBE_NOEXCEPT + { + return UINT64_C(0xffffffffffffffff); + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t mDOrderPriorityEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t mDOrderPriority() const SBE_NOEXCEPT + { + if (m_actingVersion < 7) + { + return UINT64_C(0xffffffffffffffff); + } + + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoMDEntries &mDOrderPriority(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT + { + return 270; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryPxSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryPxEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + +private: + PRICE m_mDEntryPx; + +public: + SBE_NODISCARD PRICE &mDEntryPx() + { + m_mDEntryPx.wrap(m_buffer, m_offset + 16, m_actingVersion, m_bufferLength); + return m_mDEntryPx; + } + + SBE_NODISCARD static const char *MDDisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDDisplayQtyId() SBE_NOEXCEPT + { + return 37706; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDDisplayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDDisplayQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDDisplayQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDDisplayQtyEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t mDDisplayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t mDDisplayQty() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &mDDisplayQty(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDEntryTypeBook::Value mDEntryType() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(char)); + return MDEntryTypeBook::get((val)); + } + + NoMDEntries &mDEntryType(const MDEntryTypeBook::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(char)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("MDOrderPriority": )"; + builder << +writer.mDOrderPriority(); + + builder << ", "; + builder << R"("MDEntryPx": )"; + builder << writer.mDEntryPx(); + + builder << ", "; + builder << R"("MDDisplayQty": )"; + builder << +writer.mDDisplayQty(); + + builder << ", "; + builder << R"("MDEntryType": )"; + builder << '"' << writer.mDEntryType() << '"'; + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)29); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 29; - 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; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 29; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - OrderIDMetaAttribute(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 orderIDId() SBE_NOEXCEPT { return 37; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - orderIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= orderIDSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - orderIDEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } - - static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoMDEntries &orderID(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); - return *this; - } - - SBE_NODISCARD static const char *MDOrderPriorityMetaAttribute( - 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 mDOrderPriorityId() SBE_NOEXCEPT { - return 37707; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDOrderPrioritySinceVersion() SBE_NOEXCEPT { - return 7; - } - - SBE_NODISCARD bool mDOrderPriorityInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDOrderPrioritySinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDOrderPriorityEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityNullValue() SBE_NOEXCEPT { - return 0xffffffffffffffffL; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t - mDOrderPriorityEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t mDOrderPriority() const SBE_NOEXCEPT { - if (m_actingVersion < 7) { - return 0xffffffffffffffffL; - } - - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoMDEntries &mDOrderPriority(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT { - return 270; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryPxSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryPxSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryPxEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - private: - PRICE m_mDEntryPx; - - public: - SBE_NODISCARD PRICE &mDEntryPx() { - m_mDEntryPx.wrap( - m_buffer, m_offset + 16, m_actingVersion, m_bufferLength); - return m_mDEntryPx; - } - - SBE_NODISCARD static const char *MDDisplayQtyMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDDisplayQtyId() SBE_NOEXCEPT { - return 37706; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDDisplayQtySinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDDisplayQtyInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDDisplayQtySinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDDisplayQtyEncodingOffset() SBE_NOEXCEPT { - return 24; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - mDDisplayQtyEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t mDDisplayQty() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &mDDisplayQty(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 28; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDEntryTypeBook::Value mDEntryType() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 28, sizeof(char)); - return MDEntryTypeBook::get((val)); - } - - NoMDEntries & - mDEntryType(const MDEntryTypeBook::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 28, &val, sizeof(char)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("OrderID": )"; - builder << +writer.orderID(); - - builder << ", "; - builder << R"("MDOrderPriority": )"; - builder << +writer.mDOrderPriority(); - - builder << ", "; - builder << R"("MDEntryPx": )"; - builder << writer.mDEntryPx(); - - builder << ", "; - builder << R"("MDDisplayQty": )"; - builder << +writer.mDDisplayQty(); - - builder << ", "; - builder << R"("MDEntryType": )"; - builder << '"' << writer.mDEntryType() << '"'; - - builder << '}'; - - return builder; - } - }; - - private: - NoMDEntries m_noMDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } - - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - SnapshotFullRefreshOrderBook44 _writer) { - SnapshotFullRefreshOrderBook44 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "SnapshotFullRefreshOrderBook44", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("LastMsgSeqNumProcessed": )"; - builder << +writer.lastMsgSeqNumProcessed(); - - builder << ", "; - builder << R"("TotNumReports": )"; - builder << +writer.totNumReports(); - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("NoChunks": )"; - builder << +writer.noChunks(); - - builder << ", "; - builder << R"("CurrentChunk": )"; - builder << +writer.currentChunk(); - - builder << ", "; - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, SnapshotFullRefreshOrderBook44 _writer) +{ + SnapshotFullRefreshOrderBook44 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "SnapshotFullRefreshOrderBook44", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("LastMsgSeqNumProcessed": )"; + builder << +writer.lastMsgSeqNumProcessed(); + + builder << ", "; + builder << R"("TotNumReports": )"; + builder << +writer.totNumReports(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("NoChunks": )"; + builder << +writer.noChunks(); + + builder << ", "; + builder << R"("CurrentChunk": )"; + builder << +writer.currentChunk(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noMDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/market_data/gen/src/SnapshotFullRefreshOrderBook53.h b/src/server/sparkd/cmds/spartan/market_data/gen/src/SnapshotFullRefreshOrderBook53.h index cc47cfabb..99a2df9fa 100644 --- a/src/server/sparkd/cmds/spartan/market_data/gen/src/SnapshotFullRefreshOrderBook53.h +++ b/src/server/sparkd/cmds/spartan/market_data/gen/src/SnapshotFullRefreshOrderBook53.h @@ -4,80 +4,77 @@ #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() +# 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 +# include +# define SBE_FLOAT_NAN NAN +# define SBE_DOUBLE_NAN NAN #endif #if __cplusplus >= 201103L -#include -#include -#include -#endif - -#if __cplusplus >= 201103L -#define SBE_CONSTEXPR constexpr -#define SBE_NOEXCEPT noexcept +# define SBE_CONSTEXPR constexpr +# define SBE_NOEXCEPT noexcept #else -#define SBE_CONSTEXPR -#define SBE_NOEXCEPT +# define SBE_CONSTEXPR +# define SBE_NOEXCEPT #endif #if __cplusplus >= 201703L -#define SBE_NODISCARD [[nodiscard]] +# include +# define SBE_NODISCARD [[nodiscard]] #else -#define SBE_NODISCARD +# define SBE_NODISCARD #endif #if !defined(__STDC_LIMIT_MACROS) -#define __STDC_LIMIT_MACROS 1 +# define __STDC_LIMIT_MACROS 1 #endif + #include #include -#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) +# 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) +# 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) +# 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." +# 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) +# 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)() @@ -89,1137 +86,1312 @@ #define SBE_NULLVALUE_UINT32 (std::numeric_limits::max)() #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -#include "AggressorSide.h" -#include "Decimal9.h" -#include "Decimal9NULL.h" -#include "DecimalQty.h" -#include "EventType.h" -#include "FLOAT.h" -#include "GroupSize.h" -#include "GroupSize8Byte.h" -#include "HaltReason.h" -#include "InstAttribValue.h" -#include "LegSide.h" -#include "MDEntryType.h" + #include "MDEntryTypeBook.h" -#include "MDEntryTypeDailyStatistics.h" -#include "MDEntryTypeStatistics.h" -#include "MDUpdateAction.h" +#include "OpenCloseSettlFlag.h" #include "MatchEventIndicator.h" #include "MaturityMonthYear.h" -#include "MessageHeader.h" -#include "OpenCloseSettlFlag.h" -#include "OrderUpdateAction.h" -#include "PRICE.h" -#include "PRICE9.h" -#include "PRICENULL.h" +#include "FLOAT.h" +#include "MDEntryTypeDailyStatistics.h" +#include "EventType.h" +#include "DecimalQty.h" +#include "MDUpdateAction.h" #include "PRICENULL9.h" -#include "PutOrCall.h" -#include "SecurityTradingEvent.h" +#include "GroupSize8Byte.h" +#include "HaltReason.h" +#include "PRICE9.h" +#include "MDEntryType.h" +#include "PRICENULL.h" #include "SecurityTradingStatus.h" +#include "LegSide.h" +#include "MessageHeader.h" +#include "PRICE.h" +#include "OrderUpdateAction.h" +#include "PutOrCall.h" #include "SecurityUpdateAction.h" +#include "SecurityTradingEvent.h" +#include "Decimal9.h" +#include "MDEntryTypeStatistics.h" +#include "InstAttribValue.h" +#include "AggressorSide.h" +#include "GroupSize.h" #include "SettlPriceType.h" +#include "Decimal9NULL.h" namespace mdp3 { -class SnapshotFullRefreshOrderBook53 { - private: - char *m_buffer = nullptr; - std::uint64_t m_bufferLength = 0; - std::uint64_t m_offset = 0; - std::uint64_t m_position = 0; - std::uint64_t m_actingVersion = 0; +class SnapshotFullRefreshOrderBook53 +{ +private: + char *m_buffer = nullptr; + std::uint64_t m_bufferLength = 0; + std::uint64_t m_offset = 0; + std::uint64_t m_position = 0; + std::uint64_t m_actingVersion = 0; - inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT { return &m_position; } + inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT + { + return &m_position; + } - public: - enum MetaAttribute { EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE }; +public: + static const std::uint16_t SBE_BLOCK_LENGTH = static_cast(28); + static const std::uint16_t SBE_TEMPLATE_ID = static_cast(53); + static const std::uint16_t SBE_SCHEMA_ID = static_cast(1); + static const std::uint16_t SBE_SCHEMA_VERSION = static_cast(9); - union sbe_float_as_uint_u { - float fp_value; - std::uint32_t uint_value; - }; + enum MetaAttribute + { + EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE + }; - union sbe_double_as_uint_u { - double fp_value; - std::uint64_t uint_value; - }; + union sbe_float_as_uint_u + { + float fp_value; + std::uint32_t uint_value; + }; - SnapshotFullRefreshOrderBook53() = default; + union sbe_double_as_uint_u + { + double fp_value; + std::uint64_t uint_value; + }; - SnapshotFullRefreshOrderBook53( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : m_buffer(buffer), m_bufferLength(bufferLength), m_offset(offset), - m_position(sbeCheckPosition(offset + actingBlockLength)), - m_actingVersion(actingVersion) {} + using messageHeader = MessageHeader; - SnapshotFullRefreshOrderBook53( - char *buffer, const std::uint64_t bufferLength) - : SnapshotFullRefreshOrderBook53( - buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) {} + SnapshotFullRefreshOrderBook53() = default; - SnapshotFullRefreshOrderBook53( - char *buffer, - const std::uint64_t bufferLength, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion) - : SnapshotFullRefreshOrderBook53( - buffer, 0, bufferLength, actingBlockLength, actingVersion) {} + SnapshotFullRefreshOrderBook53( + char *buffer, + const std::uint64_t offset, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + m_buffer(buffer), + m_bufferLength(bufferLength), + m_offset(offset), + m_position(sbeCheckPosition(offset + actingBlockLength)), + m_actingVersion(actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeBlockLength() SBE_NOEXCEPT { - return (std::uint16_t)28; - } + SnapshotFullRefreshOrderBook53(char *buffer, const std::uint64_t bufferLength) : + SnapshotFullRefreshOrderBook53(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion()) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeTemplateId() SBE_NOEXCEPT { - return (std::uint16_t)53; - } + SnapshotFullRefreshOrderBook53( + char *buffer, + const std::uint64_t bufferLength, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion) : + SnapshotFullRefreshOrderBook53(buffer, 0, bufferLength, actingBlockLength, actingVersion) + { + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT { - return (std::uint16_t)1; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT + { + return static_cast(28); + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - sbeSchemaVersion() SBE_NOEXCEPT { - return (std::uint16_t)9; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT + { + return messageHeader::encodedLength() + sbeBlockLength(); + } - SBE_NODISCARD static SBE_CONSTEXPR const char * - sbeSemanticType() SBE_NOEXCEPT { - return "W"; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT + { + return static_cast(53); + } - SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT { return m_offset; } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT + { + return static_cast(1); + } - SnapshotFullRefreshOrderBook53 &wrapForEncode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - return *this = SnapshotFullRefreshOrderBook53( - buffer, offset, bufferLength, sbeBlockLength(), - sbeSchemaVersion()); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT + { + return static_cast(9); + } - SnapshotFullRefreshOrderBook53 &wrapAndApplyHeader( - char *buffer, - const std::uint64_t offset, - const std::uint64_t bufferLength) { - MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); + SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT + { + return "W"; + } - hdr.blockLength(sbeBlockLength()) - .templateId(sbeTemplateId()) - .schemaId(sbeSchemaId()) - .version(sbeSchemaVersion()); + SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT + { + return m_offset; + } - return *this = SnapshotFullRefreshOrderBook53( - buffer, offset + MessageHeader::encodedLength(), bufferLength, - sbeBlockLength(), sbeSchemaVersion()); - } + SnapshotFullRefreshOrderBook53 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + return *this = SnapshotFullRefreshOrderBook53(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion()); + } - SnapshotFullRefreshOrderBook53 &wrapForDecode( - char *buffer, - const std::uint64_t offset, - const std::uint64_t actingBlockLength, - const std::uint64_t actingVersion, - const std::uint64_t bufferLength) { - return *this = SnapshotFullRefreshOrderBook53( - buffer, offset, bufferLength, actingBlockLength, - actingVersion); - } + SnapshotFullRefreshOrderBook53 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength) + { + messageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion()); - SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT { - return m_position; - } + hdr + .blockLength(sbeBlockLength()) + .templateId(sbeTemplateId()) + .schemaId(sbeSchemaId()) + .version(sbeSchemaVersion()); - 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; - } + return *this = SnapshotFullRefreshOrderBook53( + buffer, + offset + messageHeader::encodedLength(), + bufferLength, + sbeBlockLength(), + sbeSchemaVersion()); + } - void sbePosition(const std::uint64_t position) { - m_position = sbeCheckPosition(position); - } + SnapshotFullRefreshOrderBook53 &wrapForDecode( + char *buffer, + const std::uint64_t offset, + const std::uint64_t actingBlockLength, + const std::uint64_t actingVersion, + const std::uint64_t bufferLength) + { + return *this = SnapshotFullRefreshOrderBook53(buffer, offset, bufferLength, actingBlockLength, actingVersion); + } - SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT { - return sbePosition() - m_offset; - } + SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT + { + return m_position; + } - SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT { return m_buffer; } + // 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; + } - SBE_NODISCARD char *buffer() SBE_NOEXCEPT { return m_buffer; } + void sbePosition(const std::uint64_t position) + { + m_position = sbeCheckPosition(position); + } - SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT { - return m_bufferLength; - } + SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT + { + return sbePosition() - m_offset; + } - SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT { - return m_actingVersion; - } + SBE_NODISCARD std::uint64_t decodeLength() const + { + SnapshotFullRefreshOrderBook53 skipper(m_buffer, m_offset, m_bufferLength, sbeBlockLength(), m_actingVersion); + skipper.skip(); + return skipper.encodedLength(); + } - SBE_NODISCARD static const char *LastMsgSeqNumProcessedMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "SeqNum"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD const char *buffer() const SBE_NOEXCEPT + { + return m_buffer; + } - static SBE_CONSTEXPR std::uint16_t lastMsgSeqNumProcessedId() SBE_NOEXCEPT { - return 369; - } + SBE_NODISCARD char *buffer() SBE_NOEXCEPT + { + return m_buffer; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - lastMsgSeqNumProcessedSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT + { + return m_bufferLength; + } - SBE_NODISCARD bool lastMsgSeqNumProcessedInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT + { + return m_actingVersion; + } + + SBE_NODISCARD static const char *LastMsgSeqNumProcessedMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "SeqNum"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t lastMsgSeqNumProcessedId() SBE_NOEXCEPT + { + return 369; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t lastMsgSeqNumProcessedSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool lastMsgSeqNumProcessedInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= lastMsgSeqNumProcessedSinceVersion(); + return m_actingVersion >= lastMsgSeqNumProcessedSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - lastMsgSeqNumProcessedEncodingOffset() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t lastMsgSeqNumProcessedEncodingOffset() SBE_NOEXCEPT + { + return 0; + } - static SBE_CONSTEXPR std::uint32_t - lastMsgSeqNumProcessedNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t lastMsgSeqNumProcessedNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t - lastMsgSeqNumProcessedMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t lastMsgSeqNumProcessedMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t - lastMsgSeqNumProcessedMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t lastMsgSeqNumProcessedMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t - lastMsgSeqNumProcessedEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t lastMsgSeqNumProcessedEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t lastMsgSeqNumProcessed() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t lastMsgSeqNumProcessed() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - SnapshotFullRefreshOrderBook53 & - lastMsgSeqNumProcessed(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); - return *this; - } + SnapshotFullRefreshOrderBook53 &lastMsgSeqNumProcessed(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - TotNumReportsMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TotNumReportsMetaAttribute(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 totNumReportsId() SBE_NOEXCEPT { - return 911; - } + static SBE_CONSTEXPR std::uint16_t totNumReportsId() SBE_NOEXCEPT + { + return 911; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - totNumReportsSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t totNumReportsSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool totNumReportsInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= totNumReportsSinceVersion(); + return m_actingVersion >= totNumReportsSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - totNumReportsEncodingOffset() SBE_NOEXCEPT { - return 4; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t totNumReportsEncodingOffset() SBE_NOEXCEPT + { + return 4; + } - static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t totNumReportsMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t totNumReportsEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t totNumReports() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 4, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - SnapshotFullRefreshOrderBook53 & - totNumReports(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint32_t)); - return *this; - } + SnapshotFullRefreshOrderBook53 &totNumReports(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 4, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *SecurityIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "int"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT { return 48; } + static SBE_CONSTEXPR std::uint16_t securityIDId() SBE_NOEXCEPT + { + return 48; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - securityIDSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= securityIDSinceVersion(); + return m_actingVersion >= securityIDSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - securityIDEncodingOffset() SBE_NOEXCEPT { - return 8; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT + { + return 8; + } - static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } + static SBE_CONSTEXPR std::int32_t securityIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } - static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT { - return -2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } - static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT { - return 2147483647; - } + static SBE_CONSTEXPR std::int32_t securityIDMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } - static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::int32_t securityID() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::int32_t securityID() 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); + } - SnapshotFullRefreshOrderBook53 & - securityID(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; - } + SnapshotFullRefreshOrderBook53 &securityID(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 * - NoChunksMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *NoChunksMetaAttribute(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 noChunksId() SBE_NOEXCEPT { - return 37709; - } + static SBE_CONSTEXPR std::uint16_t noChunksId() SBE_NOEXCEPT + { + return 37709; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noChunksSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noChunksSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool noChunksInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noChunksInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= noChunksSinceVersion(); + return m_actingVersion >= noChunksSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - noChunksEncodingOffset() SBE_NOEXCEPT { - return 12; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t noChunksEncodingOffset() SBE_NOEXCEPT + { + return 12; + } - static SBE_CONSTEXPR std::uint32_t noChunksNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t noChunksNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t noChunksMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t noChunksMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t noChunksMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t noChunksMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t noChunksEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t noChunksEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t noChunks() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t noChunks() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - SnapshotFullRefreshOrderBook53 & - noChunks(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint32_t)); - return *this; - } + SnapshotFullRefreshOrderBook53 &noChunks(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - CurrentChunkMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "int"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *CurrentChunkMetaAttribute(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 currentChunkId() SBE_NOEXCEPT { - return 37710; - } + static SBE_CONSTEXPR std::uint16_t currentChunkId() SBE_NOEXCEPT + { + return 37710; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - currentChunkSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t currentChunkSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool currentChunkInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool currentChunkInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= currentChunkSinceVersion(); + return m_actingVersion >= currentChunkSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - currentChunkEncodingOffset() SBE_NOEXCEPT { - return 16; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t currentChunkEncodingOffset() SBE_NOEXCEPT + { + return 16; + } - static SBE_CONSTEXPR std::uint32_t currentChunkNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT32; - } + static SBE_CONSTEXPR std::uint32_t currentChunkNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT32; + } - static SBE_CONSTEXPR std::uint32_t currentChunkMinValue() SBE_NOEXCEPT { - return 0; - } + static SBE_CONSTEXPR std::uint32_t currentChunkMinValue() SBE_NOEXCEPT + { + return UINT32_C(0x0); + } - static SBE_CONSTEXPR std::uint32_t currentChunkMaxValue() SBE_NOEXCEPT { - return 4294967294; - } + static SBE_CONSTEXPR std::uint32_t currentChunkMaxValue() SBE_NOEXCEPT + { + return UINT32_C(0xfffffffe); + } - static SBE_CONSTEXPR std::size_t currentChunkEncodingLength() SBE_NOEXCEPT { - return 4; - } + static SBE_CONSTEXPR std::size_t currentChunkEncodingLength() SBE_NOEXCEPT + { + return 4; + } - SBE_NODISCARD std::uint32_t currentChunk() const SBE_NOEXCEPT { - std::uint32_t val; - std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } + SBE_NODISCARD std::uint32_t currentChunk() const SBE_NOEXCEPT + { + std::uint32_t val; + std::memcpy(&val, m_buffer + m_offset + 16, sizeof(std::uint32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } - SnapshotFullRefreshOrderBook53 & - currentChunk(const std::uint32_t value) SBE_NOEXCEPT { - std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); - return *this; - } + SnapshotFullRefreshOrderBook53 ¤tChunk(const std::uint32_t value) SBE_NOEXCEPT + { + std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 16, &val, sizeof(std::uint32_t)); + return *this; + } - SBE_NODISCARD static const char * - TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "UTCTimestamp"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } + SBE_NODISCARD static const char *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } - static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT { - return 60; - } + static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT + { + return 60; + } - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - transactTimeSinceVersion() SBE_NOEXCEPT { - return 0; - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT + { + return 0; + } - SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= transactTimeSinceVersion(); + return m_actingVersion >= transactTimeSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } + } - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - transactTimeEncodingOffset() SBE_NOEXCEPT { - return 20; - } + SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT + { + return 20; + } - static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } + static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } - static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT { - return 0x0L; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } - static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } + static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } - static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT { - return 8; - } + static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT + { + return 8; + } - SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } + SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 20, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } - SnapshotFullRefreshOrderBook53 & - transactTime(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint64_t)); - return *this; - } + SnapshotFullRefreshOrderBook53 &transactTime(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 20, &val, sizeof(std::uint64_t)); + return *this; + } - class NoMDEntries { + class NoMDEntries + { 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; + 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; - } + 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 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) { + 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(29)); + dimensions.numInGroup(static_cast(count)); + m_index = 0; + m_count = count; + m_blockLength = 29; + 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 29; + } + + 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 NoMDEntries &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() SBE_NOEXCEPT + { + m_count = m_index; + GroupSize dimensions(m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); + dimensions.numInGroup(static_cast(m_count)); + return m_count; + } + + #if __cplusplus < 201103L + template inline void forEach(Func& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #else + template inline void forEach(Func&& func) + { + while (hasNext()) + { + next(); + func(*this); + } + } + + #endif + + SBE_NODISCARD static const char *OrderIDMetaAttribute(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 orderIDId() SBE_NOEXCEPT + { + return 37; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= orderIDSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT + { + return 0; + } + + static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_UINT64; + } + + static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT + { + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoMDEntries &orderID(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *MDOrderPriorityMetaAttribute(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 mDOrderPriorityId() SBE_NOEXCEPT + { + return 37707; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDOrderPrioritySinceVersion() SBE_NOEXCEPT + { + return 7; + } + + SBE_NODISCARD bool mDOrderPriorityInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDOrderPrioritySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDOrderPriorityEncodingOffset() SBE_NOEXCEPT + { + return 8; + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityNullValue() SBE_NOEXCEPT + { + return UINT64_C(0xffffffffffffffff); + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityMinValue() SBE_NOEXCEPT + { + return UINT64_C(0x0); + } + + static SBE_CONSTEXPR std::uint64_t mDOrderPriorityMaxValue() SBE_NOEXCEPT + { + return UINT64_C(0xfffffffffffffffe); + } + + static SBE_CONSTEXPR std::size_t mDOrderPriorityEncodingLength() SBE_NOEXCEPT + { + return 8; + } + + SBE_NODISCARD std::uint64_t mDOrderPriority() const SBE_NOEXCEPT + { + if (m_actingVersion < 7) + { + return UINT64_C(0xffffffffffffffff); + } + + std::uint64_t val; + std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); + return SBE_LITTLE_ENDIAN_ENCODE_64(val); + } + + NoMDEntries &mDOrderPriority(const std::uint64_t value) SBE_NOEXCEPT + { + std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); + std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); + return *this; + } + + SBE_NODISCARD static const char *MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT + { + return 270; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryPxSinceVersion() SBE_NOEXCEPT + { + return 9; + } + + SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryPxSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryPxEncodingOffset() SBE_NOEXCEPT + { + return 16; + } + +private: + PRICE9 m_mDEntryPx; + +public: + SBE_NODISCARD PRICE9 &mDEntryPx() + { + m_mDEntryPx.wrap(m_buffer, m_offset + 16, m_actingVersion, m_bufferLength); + return m_mDEntryPx; + } + + SBE_NODISCARD static const char *MDDisplayQtyMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "Qty"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDDisplayQtyId() SBE_NOEXCEPT + { + return 37706; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDDisplayQtySinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDDisplayQtyInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDDisplayQtySinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDDisplayQtyEncodingOffset() SBE_NOEXCEPT + { + return 24; + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyNullValue() SBE_NOEXCEPT + { + return SBE_NULLVALUE_INT32; + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyMinValue() SBE_NOEXCEPT + { + return INT32_C(-2147483647); + } + + static SBE_CONSTEXPR std::int32_t mDDisplayQtyMaxValue() SBE_NOEXCEPT + { + return INT32_C(2147483647); + } + + static SBE_CONSTEXPR std::size_t mDDisplayQtyEncodingLength() SBE_NOEXCEPT + { + return 4; + } + + SBE_NODISCARD std::int32_t mDDisplayQty() const SBE_NOEXCEPT + { + std::int32_t val; + std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::int32_t)); + return SBE_LITTLE_ENDIAN_ENCODE_32(val); + } + + NoMDEntries &mDDisplayQty(const std::int32_t value) SBE_NOEXCEPT + { + std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); + std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::int32_t)); + return *this; + } + + SBE_NODISCARD static const char *MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT + { + switch (metaAttribute) + { + case MetaAttribute::SEMANTIC_TYPE: return "char"; + case MetaAttribute::PRESENCE: return "required"; + default: return ""; + } + } + + static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT + { + return 269; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t mDEntryTypeSinceVersion() SBE_NOEXCEPT + { + return 0; + } + + SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT + { + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wtautological-compare" + #endif + return m_actingVersion >= mDEntryTypeSinceVersion(); + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingOffset() SBE_NOEXCEPT + { + return 28; + } + + SBE_NODISCARD static SBE_CONSTEXPR std::size_t mDEntryTypeEncodingLength() SBE_NOEXCEPT + { + return 1; + } + + SBE_NODISCARD MDEntryTypeBook::Value mDEntryType() const + { + char val; + std::memcpy(&val, m_buffer + m_offset + 28, sizeof(char)); + return MDEntryTypeBook::get((val)); + } + + NoMDEntries &mDEntryType(const MDEntryTypeBook::Value value) SBE_NOEXCEPT + { + char val = (value); + std::memcpy(m_buffer + m_offset + 28, &val, sizeof(char)); + return *this; + } + + template + friend std::basic_ostream& operator << ( + std::basic_ostream& builder, NoMDEntries writer) + { + builder << '{'; + builder << R"("OrderID": )"; + builder << +writer.orderID(); + + builder << ", "; + builder << R"("MDOrderPriority": )"; + builder << +writer.mDOrderPriority(); + + builder << ", "; + builder << R"("MDEntryPx": )"; + builder << writer.mDEntryPx(); + + builder << ", "; + builder << R"("MDDisplayQty": )"; + builder << +writer.mDDisplayQty(); + + builder << ", "; + builder << R"("MDEntryType": )"; + builder << '"' << writer.mDEntryType() << '"'; + + 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 - if (count > 254) { - throw std::runtime_error("count outside of allowed range [E110]"); - } + std::size_t length = sbeBlockLength(); + + return length; #if defined(__GNUG__) && !defined(__clang__) #pragma GCC diagnostic pop #endif - m_buffer = buffer; - m_bufferLength = bufferLength; - GroupSize dimensions(buffer, *pos, bufferLength, actingVersion); - dimensions.blockLength((std::uint16_t)29); - dimensions.numInGroup((std::uint8_t)count); - m_index = 0; - m_count = count; - m_blockLength = 29; - 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; - } +private: + NoMDEntries m_noMDEntries; - static SBE_CONSTEXPR std::uint64_t sbeBlockLength() SBE_NOEXCEPT { - return 29; - } +public: + SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t NoMDEntriesId() SBE_NOEXCEPT + { + return 268; + } - SBE_NODISCARD std::uint64_t sbePosition() const { return *m_positionPtr; } + SBE_NODISCARD inline NoMDEntries &noMDEntries() + { + m_noMDEntries.wrapForDecode(m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - 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; - } + NoMDEntries &noMDEntriesCount(const std::uint8_t count) + { + m_noMDEntries.wrapForEncode(m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); + return m_noMDEntries; + } - void sbePosition(const std::uint64_t position) { - *m_positionPtr = sbeCheckPosition(position); - } + SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t noMDEntriesSinceVersion() SBE_NOEXCEPT + { + return 0; + } - 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 NoMDEntries &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() SBE_NOEXCEPT { - m_count = m_index; - GroupSize dimensions( - m_buffer, m_initialPosition, m_bufferLength, m_actingVersion); - dimensions.numInGroup((std::uint8_t)m_count); - return m_count; - } - -#if __cplusplus < 201103L - template inline void forEach(Func &func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#else - template inline void forEach(Func &&func) { - while (hasNext()) { - next(); - func(*this); - } - } - -#endif - - SBE_NODISCARD static const char * - OrderIDMetaAttribute(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 orderIDId() SBE_NOEXCEPT { return 37; } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - orderIDSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT { + SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT + { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" #endif - return m_actingVersion >= orderIDSinceVersion(); + return m_actingVersion >= noMDEntriesSinceVersion(); #if defined(__clang__) #pragma clang diagnostic pop #endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - orderIDEncodingOffset() SBE_NOEXCEPT { - return 0; - } - - static SBE_CONSTEXPR std::uint64_t orderIDNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_UINT64; - } - - static SBE_CONSTEXPR std::uint64_t orderIDMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t orderIDMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t orderID() const SBE_NOEXCEPT { - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoMDEntries &orderID(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t)); - return *this; - } - - SBE_NODISCARD static const char *MDOrderPriorityMetaAttribute( - 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 mDOrderPriorityId() SBE_NOEXCEPT { - return 37707; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDOrderPrioritySinceVersion() SBE_NOEXCEPT { - return 7; - } - - SBE_NODISCARD bool mDOrderPriorityInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDOrderPrioritySinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDOrderPriorityEncodingOffset() SBE_NOEXCEPT { - return 8; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityNullValue() SBE_NOEXCEPT { - return 0xffffffffffffffffL; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityMinValue() SBE_NOEXCEPT { - return 0x0L; - } - - static SBE_CONSTEXPR std::uint64_t - mDOrderPriorityMaxValue() SBE_NOEXCEPT { - return 0xfffffffffffffffeL; - } - - static SBE_CONSTEXPR std::size_t - mDOrderPriorityEncodingLength() SBE_NOEXCEPT { - return 8; - } - - SBE_NODISCARD std::uint64_t mDOrderPriority() const SBE_NOEXCEPT { - if (m_actingVersion < 7) { - return 0xffffffffffffffffL; - } - - std::uint64_t val; - std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint64_t)); - return SBE_LITTLE_ENDIAN_ENCODE_64(val); - } - - NoMDEntries &mDOrderPriority(const std::uint64_t value) SBE_NOEXCEPT { - std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value); - std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint64_t)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntryPxMetaAttribute(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 mDEntryPxId() SBE_NOEXCEPT { - return 270; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryPxSinceVersion() SBE_NOEXCEPT { - return 9; - } - - SBE_NODISCARD bool mDEntryPxInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryPxSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryPxEncodingOffset() SBE_NOEXCEPT { - return 16; - } - - private: - PRICE9 m_mDEntryPx; - - public: - SBE_NODISCARD PRICE9 &mDEntryPx() { - m_mDEntryPx.wrap( - m_buffer, m_offset + 16, m_actingVersion, m_bufferLength); - return m_mDEntryPx; - } - - SBE_NODISCARD static const char *MDDisplayQtyMetaAttribute( - const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "Qty"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDDisplayQtyId() SBE_NOEXCEPT { - return 37706; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDDisplayQtySinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDDisplayQtyInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDDisplayQtySinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDDisplayQtyEncodingOffset() SBE_NOEXCEPT { - return 24; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyNullValue() SBE_NOEXCEPT { - return SBE_NULLVALUE_INT32; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyMinValue() SBE_NOEXCEPT { - return -2147483647; - } - - static SBE_CONSTEXPR std::int32_t mDDisplayQtyMaxValue() SBE_NOEXCEPT { - return 2147483647; - } - - static SBE_CONSTEXPR std::size_t - mDDisplayQtyEncodingLength() SBE_NOEXCEPT { - return 4; - } - - SBE_NODISCARD std::int32_t mDDisplayQty() const SBE_NOEXCEPT { - std::int32_t val; - std::memcpy(&val, m_buffer + m_offset + 24, sizeof(std::int32_t)); - return SBE_LITTLE_ENDIAN_ENCODE_32(val); - } - - NoMDEntries &mDDisplayQty(const std::int32_t value) SBE_NOEXCEPT { - std::int32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value); - std::memcpy(m_buffer + m_offset + 24, &val, sizeof(std::int32_t)); - return *this; - } - - SBE_NODISCARD static const char * - MDEntryTypeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT { - switch (metaAttribute) { - case MetaAttribute::SEMANTIC_TYPE: - return "char"; - case MetaAttribute::PRESENCE: - return "required"; - default: - return ""; - } - } - - static SBE_CONSTEXPR std::uint16_t mDEntryTypeId() SBE_NOEXCEPT { - return 269; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - mDEntryTypeSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool mDEntryTypeInActingVersion() SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= mDEntryTypeSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingOffset() SBE_NOEXCEPT { - return 28; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::size_t - mDEntryTypeEncodingLength() SBE_NOEXCEPT { - return 1; - } - - SBE_NODISCARD MDEntryTypeBook::Value mDEntryType() const SBE_NOEXCEPT { - char val; - std::memcpy(&val, m_buffer + m_offset + 28, sizeof(char)); - return MDEntryTypeBook::get((val)); - } - - NoMDEntries & - mDEntryType(const MDEntryTypeBook::Value value) SBE_NOEXCEPT { - char val = (value); - std::memcpy(m_buffer + m_offset + 28, &val, sizeof(char)); - return *this; - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, NoMDEntries writer) { - builder << '{'; - builder << R"("OrderID": )"; - builder << +writer.orderID(); - - builder << ", "; - builder << R"("MDOrderPriority": )"; - builder << +writer.mDOrderPriority(); - - builder << ", "; - builder << R"("MDEntryPx": )"; - builder << writer.mDEntryPx(); - - builder << ", "; - builder << R"("MDDisplayQty": )"; - builder << +writer.mDDisplayQty(); - - builder << ", "; - builder << R"("MDEntryType": )"; - builder << '"' << writer.mDEntryType() << '"'; - - builder << '}'; - - return builder; - } - }; - - private: - NoMDEntries m_noMDEntries; - - public: - SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t - NoMDEntriesId() SBE_NOEXCEPT { - return 268; - } - - SBE_NODISCARD inline NoMDEntries &noMDEntries() { - m_noMDEntries.wrapForDecode( - m_buffer, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - NoMDEntries &noMDEntriesCount(const std::uint8_t count) { - m_noMDEntries.wrapForEncode( - m_buffer, count, sbePositionPtr(), m_actingVersion, m_bufferLength); - return m_noMDEntries; - } - - SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t - noMDEntriesSinceVersion() SBE_NOEXCEPT { - return 0; - } - - SBE_NODISCARD bool noMDEntriesInActingVersion() const SBE_NOEXCEPT { -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" -#endif - return m_actingVersion >= noMDEntriesSinceVersion(); -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - } - - template - friend std::basic_ostream &operator<<( - std::basic_ostream &builder, - SnapshotFullRefreshOrderBook53 _writer) { - SnapshotFullRefreshOrderBook53 writer( - _writer.m_buffer, _writer.m_offset, _writer.m_bufferLength, - _writer.sbeBlockLength(), _writer.m_actingVersion); - builder << '{'; - builder << R"("Name": "SnapshotFullRefreshOrderBook53", )"; - builder << R"("sbeTemplateId": )"; - builder << writer.sbeTemplateId(); - builder << ", "; - - builder << R"("LastMsgSeqNumProcessed": )"; - builder << +writer.lastMsgSeqNumProcessed(); - - builder << ", "; - builder << R"("TotNumReports": )"; - builder << +writer.totNumReports(); - - builder << ", "; - builder << R"("SecurityID": )"; - builder << +writer.securityID(); - - builder << ", "; - builder << R"("NoChunks": )"; - builder << +writer.noChunks(); - - builder << ", "; - builder << R"("CurrentChunk": )"; - builder << +writer.currentChunk(); - - builder << ", "; - builder << R"("TransactTime": )"; - builder << +writer.transactTime(); - - builder << ", "; - { - bool atLeastOne = false; - builder << R"("NoMDEntries": [)"; - writer.noMDEntries().forEach([&](NoMDEntries &noMDEntries) { - if (atLeastOne) { - builder << ", "; + } + +template +friend std::basic_ostream& operator << ( + std::basic_ostream& builder, SnapshotFullRefreshOrderBook53 _writer) +{ + SnapshotFullRefreshOrderBook53 writer(_writer.m_buffer, _writer.m_offset, + _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion); + builder << '{'; + builder << R"("Name": "SnapshotFullRefreshOrderBook53", )"; + builder << R"("sbeTemplateId": )"; + builder << writer.sbeTemplateId(); + builder << ", "; + + builder << R"("LastMsgSeqNumProcessed": )"; + builder << +writer.lastMsgSeqNumProcessed(); + + builder << ", "; + builder << R"("TotNumReports": )"; + builder << +writer.totNumReports(); + + builder << ", "; + builder << R"("SecurityID": )"; + builder << +writer.securityID(); + + builder << ", "; + builder << R"("NoChunks": )"; + builder << +writer.noChunks(); + + builder << ", "; + builder << R"("CurrentChunk": )"; + builder << +writer.currentChunk(); + + builder << ", "; + builder << R"("TransactTime": )"; + builder << +writer.transactTime(); + + builder << ", "; + { + bool atLeastOne = false; + builder << R"("NoMDEntries": [)"; + writer.noMDEntries().forEach([&](NoMDEntries& noMDEntries) + { + if (atLeastOne) + { + builder << ", "; } atLeastOne = true; builder << noMDEntries; - }); - builder << ']'; - } + }); + builder << ']'; + } - builder << '}'; + builder << '}'; - return builder; - } + return builder; +} + +void skip() +{ + noMDEntries().forEach([](NoMDEntries e) + { + e.skip(); + }); +} + +SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT +{ + return false; +} + +SBE_NODISCARD static std::size_t computeLength(std::size_t noMDEntriesLength = 0) +{ +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + std::size_t length = sbeBlockLength(); + + length += NoMDEntries::sbeHeaderSize(); + if (noMDEntriesLength > 254LL) + { + throw std::runtime_error("noMDEntriesLength outside of allowed range [E110]"); + } + length += noMDEntriesLength *NoMDEntries::sbeBlockLength(); + + return length; +#if defined(__GNUG__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif +} }; -} // namespace mdp3 +} #endif diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/generate.sh b/src/server/sparkd/cmds/spartan/order_execution/gen/generate.sh index 969efb075..120487bdd 100755 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/generate.sh +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/generate.sh @@ -4,21 +4,22 @@ # To update ilinkbinary.xml: # --------------------------- # The dissemination scheme is described here: -# https://cmegroup.com/confluence/display/EPICSANDBOX/iLink+3+-+Simple+Binary+Encoding#iLink3SimpleBinaryEncoding-SchemaDistribution +# https://cmegroup.com/confluence/display/EPICSANDBOX/iLink+3+-+Simple+Binary+Encoding#iLink3SimpleBinaryEncoding-SchemaDistribution # The actual files are stored here: -# sftp cmeconfig@sftpng.cmegroup.com -# password: G3t(0nnect3d -# get /MSGW/NRCert/Templates/ilinkbinary.xml +# sftp cmeconfig@sftpng.cmegroup.com +# password: G3t(0nnect3d +# Get one of: +# /MSGW/NRCert/Templates/ilinkbinary.xml +# /MSGW/Cert/Templates/ilinkbinary.xml +# /MSGW/Production/Templates/ilinkbinary.xml +# And update the corresponding nrcert, cert or prod directories # --------------------------- - # To generate CPP # --------------------------- -# Download sbe-all-[version].jar from sbe-logic github. -# Pre-built packages are available at https://search.maven.org/search?q=g:uk.co.real-logic%20sbe -# Run the docker command below which will download a jave acontainer -# and execute the jar. - +# Obtain sbe-all-[version].jar from sbe-logic github. +# Pre-built packages are available at https://search.maven.org/search?q=g:uk.co.real-logic%20sbe +# Run the docker command below which will execute the jar in a java docker container RELEASE_TYPE=${1:-prod} SBE_VERSION=1.20.4 @@ -29,18 +30,6 @@ cd $MY_DIR rm -rf src mkdir -p src -# docker run --rm -it -w $PWD \ -# -v $PWD \ -# -v /etc/group:/etc/group \ -# -v /etc/passwd:/etc/passwd \ -# -u $UID \ -# java \ -# java -Dsbe.output.dir=src \ -# -Dsbe.generate.ir="false" \ -# -Dsbe.target.language=cpp \ -# -jar ./sbe-all-$SBE_VERSION.jar \ -# $RELEASE_TYPE/ilinkbinary.xml - docker run --rm -it -w $PWD \ -v /home:/home \ -v /etc/group:/etc/group \ @@ -49,9 +38,10 @@ docker run --rm -it -w $PWD \ java \ java -Dsbe.output.dir=src \ -Dsbe.generate.ir="false" \ + -Dsbe.target.namespace="il3" \ -Dsbe.target.language=cpp \ -jar ./sbe-all-$SBE_VERSION.jar \ $RELEASE_TYPE/ilinkbinary.xml -mv src/iLinkBinary/* src/ -rmdir src/iLinkBinary/ +mv src/il3/* src/ +rmdir src/il3/ diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/AvgPxInd.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/AvgPxInd.h index c93ac57d4..6a9d1ab5d 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/AvgPxInd.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/AvgPxInd.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_AVGPXIND_H_ -#define _ILINKBINARY_AVGPXIND_H_ +#ifndef _IL3_AVGPXIND_H_ +#define _IL3_AVGPXIND_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class AvgPxInd { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/BooleanFlag.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/BooleanFlag.h index 1faff88e8..6c75da725 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/BooleanFlag.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/BooleanFlag.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_BOOLEANFLAG_H_ -#define _ILINKBINARY_BOOLEANFLAG_H_ +#ifndef _IL3_BOOLEANFLAG_H_ +#define _IL3_BOOLEANFLAG_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class BooleanFlag { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/BooleanNULL.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/BooleanNULL.h index 866ed6b42..f5c46cef7 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/BooleanNULL.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/BooleanNULL.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_BOOLEANNULL_H_ -#define _ILINKBINARY_BOOLEANNULL_H_ +#ifndef _IL3_BOOLEANNULL_H_ +#define _IL3_BOOLEANNULL_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class BooleanNULL { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/BusinessReject521.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/BusinessReject521.h index 7c1d9b6e1..64e7bf09a 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/BusinessReject521.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/BusinessReject521.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_BUSINESSREJECT521_H_ -#define _ILINKBINARY_BUSINESSREJECT521_H_ +#ifndef _IL3_BUSINESSREJECT521_H_ +#define _IL3_BUSINESSREJECT521_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class BusinessReject521 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ClearingAcctType.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ClearingAcctType.h index 0b145a7b2..beac55bf6 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ClearingAcctType.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ClearingAcctType.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_CLEARINGACCTTYPE_H_ -#define _ILINKBINARY_CLEARINGACCTTYPE_H_ +#ifndef _IL3_CLEARINGACCTTYPE_H_ +#define _IL3_CLEARINGACCTTYPE_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class ClearingAcctType { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/CmtaGiveUpCD.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/CmtaGiveUpCD.h index 79f25bf02..7c41e98c5 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/CmtaGiveUpCD.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/CmtaGiveUpCD.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_CMTAGIVEUPCD_H_ -#define _ILINKBINARY_CMTAGIVEUPCD_H_ +#ifndef _IL3_CMTAGIVEUPCD_H_ +#define _IL3_CMTAGIVEUPCD_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class CmtaGiveUpCD { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/CustOrdHandlInst.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/CustOrdHandlInst.h index 1ce5ed826..adbe8c2af 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/CustOrdHandlInst.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/CustOrdHandlInst.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_CUSTORDHANDLINST_H_ -#define _ILINKBINARY_CUSTORDHANDLINST_H_ +#ifndef _IL3_CUSTORDHANDLINST_H_ +#define _IL3_CUSTORDHANDLINST_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class CustOrdHandlInst { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/CustOrderCapacity.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/CustOrderCapacity.h index cfdc79846..acc71464e 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/CustOrderCapacity.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/CustOrderCapacity.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_CUSTORDERCAPACITY_H_ -#define _ILINKBINARY_CUSTORDERCAPACITY_H_ +#ifndef _IL3_CUSTORDERCAPACITY_H_ +#define _IL3_CUSTORDERCAPACITY_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class CustOrderCapacity { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/DATA.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/DATA.h index 84c57236e..5ff42507b 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/DATA.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/DATA.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_DATA_H_ -#define _ILINKBINARY_DATA_H_ +#ifndef _IL3_DATA_H_ +#define _IL3_DATA_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class DATA { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/DKReason.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/DKReason.h index 53d9e7bce..edc427c0c 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/DKReason.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/DKReason.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_DKREASON_H_ -#define _ILINKBINARY_DKREASON_H_ +#ifndef _IL3_DKREASON_H_ +#define _IL3_DKREASON_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class DKReason { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/Decimal32NULL.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/Decimal32NULL.h index 178540e01..a48948f48 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/Decimal32NULL.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/Decimal32NULL.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_DECIMAL32NULL_H_ -#define _ILINKBINARY_DECIMAL32NULL_H_ +#ifndef _IL3_DECIMAL32NULL_H_ +#define _IL3_DECIMAL32NULL_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class Decimal32NULL { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/Decimal64NULL.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/Decimal64NULL.h index 7c9bc6c17..a049d4ef6 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/Decimal64NULL.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/Decimal64NULL.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_DECIMAL64NULL_H_ -#define _ILINKBINARY_DECIMAL64NULL_H_ +#ifndef _IL3_DECIMAL64NULL_H_ +#define _IL3_DECIMAL64NULL_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class Decimal64NULL { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/Establish503.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/Establish503.h index c94ca0a56..7828a3948 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/Establish503.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/Establish503.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_ESTABLISH503_H_ -#define _ILINKBINARY_ESTABLISH503_H_ +#ifndef _IL3_ESTABLISH503_H_ +#define _IL3_ESTABLISH503_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class Establish503 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/EstablishmentAck504.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/EstablishmentAck504.h index 195fdccd8..f5f65b50e 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/EstablishmentAck504.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/EstablishmentAck504.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_ESTABLISHMENTACK504_H_ -#define _ILINKBINARY_ESTABLISHMENTACK504_H_ +#ifndef _IL3_ESTABLISHMENTACK504_H_ +#define _IL3_ESTABLISHMENTACK504_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class EstablishmentAck504 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/EstablishmentReject505.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/EstablishmentReject505.h index 0611e7fc2..e205fdfae 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/EstablishmentReject505.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/EstablishmentReject505.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_ESTABLISHMENTREJECT505_H_ -#define _ILINKBINARY_ESTABLISHMENTREJECT505_H_ +#ifndef _IL3_ESTABLISHMENTREJECT505_H_ +#define _IL3_ESTABLISHMENTREJECT505_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class EstablishmentReject505 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecAckStatus.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecAckStatus.h index ac884cb70..b1941d735 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecAckStatus.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecAckStatus.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECACKSTATUS_H_ -#define _ILINKBINARY_EXECACKSTATUS_H_ +#ifndef _IL3_EXECACKSTATUS_H_ +#define _IL3_EXECACKSTATUS_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class ExecAckStatus { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecInst.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecInst.h index 66d1d6c45..61237a4bb 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecInst.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecInst.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECINST_H_ -#define _ILINKBINARY_EXECINST_H_ +#ifndef _IL3_EXECINST_H_ +#define _IL3_EXECINST_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class ExecInst { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecMode.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecMode.h index 6cb430f84..b3a7eb717 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecMode.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecMode.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECMODE_H_ -#define _ILINKBINARY_EXECMODE_H_ +#ifndef _IL3_EXECMODE_H_ +#define _IL3_EXECMODE_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class ExecMode { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecReason.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecReason.h index 749be985a..7b41c62a5 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecReason.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecReason.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECREASON_H_ -#define _ILINKBINARY_EXECREASON_H_ +#ifndef _IL3_EXECREASON_H_ +#define _IL3_EXECREASON_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class ExecReason { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecTypTrdCxl.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecTypTrdCxl.h index 753cdd221..8e0c7657f 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecTypTrdCxl.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecTypTrdCxl.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECTYPTRDCXL_H_ -#define _ILINKBINARY_EXECTYPTRDCXL_H_ +#ifndef _IL3_EXECTYPTRDCXL_H_ +#define _IL3_EXECTYPTRDCXL_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class ExecTypTrdCxl { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionAck539.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionAck539.h index 379388617..9843ba385 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionAck539.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionAck539.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECUTIONACK539_H_ -#define _ILINKBINARY_EXECUTIONACK539_H_ +#ifndef _IL3_EXECUTIONACK539_H_ +#define _IL3_EXECUTIONACK539_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class ExecutionAck539 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportCancel534.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportCancel534.h index d716a73c3..27eddfb68 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportCancel534.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportCancel534.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECUTIONREPORTCANCEL534_H_ -#define _ILINKBINARY_EXECUTIONREPORTCANCEL534_H_ +#ifndef _IL3_EXECUTIONREPORTCANCEL534_H_ +#define _IL3_EXECUTIONREPORTCANCEL534_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class ExecutionReportCancel534 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportElimination524.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportElimination524.h index 48f8c1895..27af6d072 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportElimination524.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportElimination524.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECUTIONREPORTELIMINATION524_H_ -#define _ILINKBINARY_EXECUTIONREPORTELIMINATION524_H_ +#ifndef _IL3_EXECUTIONREPORTELIMINATION524_H_ +#define _IL3_EXECUTIONREPORTELIMINATION524_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class ExecutionReportElimination524 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportModify531.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportModify531.h index e37ba092b..de2fdd25d 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportModify531.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportModify531.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECUTIONREPORTMODIFY531_H_ -#define _ILINKBINARY_EXECUTIONREPORTMODIFY531_H_ +#ifndef _IL3_EXECUTIONREPORTMODIFY531_H_ +#define _IL3_EXECUTIONREPORTMODIFY531_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class ExecutionReportModify531 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportNew522.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportNew522.h index 2754ab67c..1b48a1fe1 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportNew522.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportNew522.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECUTIONREPORTNEW522_H_ -#define _ILINKBINARY_EXECUTIONREPORTNEW522_H_ +#ifndef _IL3_EXECUTIONREPORTNEW522_H_ +#define _IL3_EXECUTIONREPORTNEW522_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class ExecutionReportNew522 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportReject523.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportReject523.h index 4fa94ef16..48be7644c 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportReject523.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportReject523.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECUTIONREPORTREJECT523_H_ -#define _ILINKBINARY_EXECUTIONREPORTREJECT523_H_ +#ifndef _IL3_EXECUTIONREPORTREJECT523_H_ +#define _IL3_EXECUTIONREPORTREJECT523_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class ExecutionReportReject523 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportStatus532.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportStatus532.h index 384dccd1f..87148158a 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportStatus532.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportStatus532.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECUTIONREPORTSTATUS532_H_ -#define _ILINKBINARY_EXECUTIONREPORTSTATUS532_H_ +#ifndef _IL3_EXECUTIONREPORTSTATUS532_H_ +#define _IL3_EXECUTIONREPORTSTATUS532_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class ExecutionReportStatus532 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeAddendumOutright548.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeAddendumOutright548.h index 5efb371ed..3912e3a89 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeAddendumOutright548.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeAddendumOutright548.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMOUTRIGHT548_H_ -#define _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMOUTRIGHT548_H_ +#ifndef _IL3_EXECUTIONREPORTTRADEADDENDUMOUTRIGHT548_H_ +#define _IL3_EXECUTIONREPORTTRADEADDENDUMOUTRIGHT548_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class ExecutionReportTradeAddendumOutright548 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeAddendumSpread549.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeAddendumSpread549.h index 3a7fbffcf..632efab0d 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeAddendumSpread549.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeAddendumSpread549.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMSPREAD549_H_ -#define _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMSPREAD549_H_ +#ifndef _IL3_EXECUTIONREPORTTRADEADDENDUMSPREAD549_H_ +#define _IL3_EXECUTIONREPORTTRADEADDENDUMSPREAD549_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class ExecutionReportTradeAddendumSpread549 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeAddendumSpreadLeg550.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeAddendumSpreadLeg550.h index a9eb90880..2162fabb5 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeAddendumSpreadLeg550.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeAddendumSpreadLeg550.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMSPREADLEG550_H_ -#define _ILINKBINARY_EXECUTIONREPORTTRADEADDENDUMSPREADLEG550_H_ +#ifndef _IL3_EXECUTIONREPORTTRADEADDENDUMSPREADLEG550_H_ +#define _IL3_EXECUTIONREPORTTRADEADDENDUMSPREADLEG550_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class ExecutionReportTradeAddendumSpreadLeg550 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeOutright525.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeOutright525.h index 963f00744..35398176c 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeOutright525.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeOutright525.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECUTIONREPORTTRADEOUTRIGHT525_H_ -#define _ILINKBINARY_EXECUTIONREPORTTRADEOUTRIGHT525_H_ +#ifndef _IL3_EXECUTIONREPORTTRADEOUTRIGHT525_H_ +#define _IL3_EXECUTIONREPORTTRADEOUTRIGHT525_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class ExecutionReportTradeOutright525 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeSpread526.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeSpread526.h index 282001814..1f557c030 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeSpread526.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeSpread526.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECUTIONREPORTTRADESPREAD526_H_ -#define _ILINKBINARY_EXECUTIONREPORTTRADESPREAD526_H_ +#ifndef _IL3_EXECUTIONREPORTTRADESPREAD526_H_ +#define _IL3_EXECUTIONREPORTTRADESPREAD526_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class ExecutionReportTradeSpread526 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeSpreadLeg527.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeSpreadLeg527.h index 1701b3581..7e999b756 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeSpreadLeg527.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExecutionReportTradeSpreadLeg527.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXECUTIONREPORTTRADESPREADLEG527_H_ -#define _ILINKBINARY_EXECUTIONREPORTTRADESPREADLEG527_H_ +#ifndef _IL3_EXECUTIONREPORTTRADESPREADLEG527_H_ +#define _IL3_EXECUTIONREPORTTRADESPREADLEG527_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class ExecutionReportTradeSpreadLeg527 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExpCycle.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExpCycle.h index 9b4ed2940..418e22c48 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExpCycle.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ExpCycle.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_EXPCYCLE_H_ -#define _ILINKBINARY_EXPCYCLE_H_ +#ifndef _IL3_EXPCYCLE_H_ +#define _IL3_EXPCYCLE_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class ExpCycle { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/FTI.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/FTI.h index ebdb932e8..4b0b03ce8 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/FTI.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/FTI.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_FTI_H_ -#define _ILINKBINARY_FTI_H_ +#ifndef _IL3_FTI_H_ +#define _IL3_FTI_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class FTI { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/GroupSize.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/GroupSize.h index 77804e1a2..88a80234b 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/GroupSize.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/GroupSize.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_GROUPSIZE_H_ -#define _ILINKBINARY_GROUPSIZE_H_ +#ifndef _IL3_GROUPSIZE_H_ +#define _IL3_GROUPSIZE_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class GroupSize { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/KeepAliveLapsed.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/KeepAliveLapsed.h index 56721e9b3..37e776900 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/KeepAliveLapsed.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/KeepAliveLapsed.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_KEEPALIVELAPSED_H_ -#define _ILINKBINARY_KEEPALIVELAPSED_H_ +#ifndef _IL3_KEEPALIVELAPSED_H_ +#define _IL3_KEEPALIVELAPSED_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class KeepAliveLapsed { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ListUpdAct.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ListUpdAct.h index 3dea9d8fd..93ef8f637 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ListUpdAct.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ListUpdAct.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_LISTUPDACT_H_ -#define _ILINKBINARY_LISTUPDACT_H_ +#ifndef _IL3_LISTUPDACT_H_ +#define _IL3_LISTUPDACT_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class ListUpdAct { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ManualOrdInd.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ManualOrdInd.h index b859bfb97..bf347a666 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ManualOrdInd.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ManualOrdInd.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_MANUALORDIND_H_ -#define _ILINKBINARY_MANUALORDIND_H_ +#ifndef _IL3_MANUALORDIND_H_ +#define _IL3_MANUALORDIND_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class ManualOrdInd { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ManualOrdIndReq.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ManualOrdIndReq.h index 6c8ab4930..d8c48334d 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ManualOrdIndReq.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ManualOrdIndReq.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_MANUALORDINDREQ_H_ -#define _ILINKBINARY_MANUALORDINDREQ_H_ +#ifndef _IL3_MANUALORDINDREQ_H_ +#define _IL3_MANUALORDINDREQ_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class ManualOrdIndReq { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassActionOrdTyp.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassActionOrdTyp.h index df87d4dc4..6e1b371d1 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassActionOrdTyp.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassActionOrdTyp.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_MASSACTIONORDTYP_H_ -#define _ILINKBINARY_MASSACTIONORDTYP_H_ +#ifndef _IL3_MASSACTIONORDTYP_H_ +#define _IL3_MASSACTIONORDTYP_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class MassActionOrdTyp { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassActionResponse.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassActionResponse.h index eca52b837..c9141a406 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassActionResponse.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassActionResponse.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_MASSACTIONRESPONSE_H_ -#define _ILINKBINARY_MASSACTIONRESPONSE_H_ +#ifndef _IL3_MASSACTIONRESPONSE_H_ +#define _IL3_MASSACTIONRESPONSE_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class MassActionResponse { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassActionScope.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassActionScope.h index d99de58fc..53d0f9cb3 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassActionScope.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassActionScope.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_MASSACTIONSCOPE_H_ -#define _ILINKBINARY_MASSACTIONSCOPE_H_ +#ifndef _IL3_MASSACTIONSCOPE_H_ +#define _IL3_MASSACTIONSCOPE_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class MassActionScope { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassCancelTIF.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassCancelTIF.h index 19df73e07..52817d1cd 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassCancelTIF.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassCancelTIF.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_MASSCANCELTIF_H_ -#define _ILINKBINARY_MASSCANCELTIF_H_ +#ifndef _IL3_MASSCANCELTIF_H_ +#define _IL3_MASSCANCELTIF_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class MassCancelTIF { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassCxlReqTyp.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassCxlReqTyp.h index b3ca9ba15..bac464634 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassCxlReqTyp.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassCxlReqTyp.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_MASSCXLREQTYP_H_ -#define _ILINKBINARY_MASSCXLREQTYP_H_ +#ifndef _IL3_MASSCXLREQTYP_H_ +#define _IL3_MASSCXLREQTYP_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class MassCxlReqTyp { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassQuote517.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassQuote517.h index ba0be5743..6cea82999 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassQuote517.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassQuote517.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_MASSQUOTE517_H_ -#define _ILINKBINARY_MASSQUOTE517_H_ +#ifndef _IL3_MASSQUOTE517_H_ +#define _IL3_MASSQUOTE517_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class MassQuote517 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassQuoteAck545.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassQuoteAck545.h index cf21dba33..3c016a3b0 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassQuoteAck545.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassQuoteAck545.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_MASSQUOTEACK545_H_ -#define _ILINKBINARY_MASSQUOTEACK545_H_ +#ifndef _IL3_MASSQUOTEACK545_H_ +#define _IL3_MASSQUOTEACK545_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class MassQuoteAck545 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassStatusOrdTyp.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassStatusOrdTyp.h index 98f9b359c..ca7bdf2b6 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassStatusOrdTyp.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassStatusOrdTyp.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_MASSSTATUSORDTYP_H_ -#define _ILINKBINARY_MASSSTATUSORDTYP_H_ +#ifndef _IL3_MASSSTATUSORDTYP_H_ +#define _IL3_MASSSTATUSORDTYP_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class MassStatusOrdTyp { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassStatusReqTyp.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassStatusReqTyp.h index cd041aca2..ff7a023a2 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassStatusReqTyp.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassStatusReqTyp.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_MASSSTATUSREQTYP_H_ -#define _ILINKBINARY_MASSSTATUSREQTYP_H_ +#ifndef _IL3_MASSSTATUSREQTYP_H_ +#define _IL3_MASSSTATUSREQTYP_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class MassStatusReqTyp { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassStatusTIF.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassStatusTIF.h index e12b81bf0..9d90163c3 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassStatusTIF.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MassStatusTIF.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_MASSSTATUSTIF_H_ -#define _ILINKBINARY_MASSSTATUSTIF_H_ +#ifndef _IL3_MASSSTATUSTIF_H_ +#define _IL3_MASSSTATUSTIF_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class MassStatusTIF { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MaturityMonthYear.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MaturityMonthYear.h index 6accd6257..a8d738b75 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MaturityMonthYear.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MaturityMonthYear.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_MATURITYMONTHYEAR_H_ -#define _ILINKBINARY_MATURITYMONTHYEAR_H_ +#ifndef _IL3_MATURITYMONTHYEAR_H_ +#define _IL3_MATURITYMONTHYEAR_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class MaturityMonthYear { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MessageHeader.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MessageHeader.h index c514b0dd0..ebc5dca6c 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/MessageHeader.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/MessageHeader.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_MESSAGEHEADER_H_ -#define _ILINKBINARY_MESSAGEHEADER_H_ +#ifndef _IL3_MESSAGEHEADER_H_ +#define _IL3_MESSAGEHEADER_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class MessageHeader { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/Negotiate500.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/Negotiate500.h index ebfa0d682..6dbc0bff5 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/Negotiate500.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/Negotiate500.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_NEGOTIATE500_H_ -#define _ILINKBINARY_NEGOTIATE500_H_ +#ifndef _IL3_NEGOTIATE500_H_ +#define _IL3_NEGOTIATE500_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class Negotiate500 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/NegotiationReject502.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/NegotiationReject502.h index 17ec6ee3d..5fa62ccb5 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/NegotiationReject502.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/NegotiationReject502.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_NEGOTIATIONREJECT502_H_ -#define _ILINKBINARY_NEGOTIATIONREJECT502_H_ +#ifndef _IL3_NEGOTIATIONREJECT502_H_ +#define _IL3_NEGOTIATIONREJECT502_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class NegotiationReject502 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/NegotiationResponse501.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/NegotiationResponse501.h index 6670a07e3..32a57f4c7 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/NegotiationResponse501.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/NegotiationResponse501.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_NEGOTIATIONRESPONSE501_H_ -#define _ILINKBINARY_NEGOTIATIONRESPONSE501_H_ +#ifndef _IL3_NEGOTIATIONRESPONSE501_H_ +#define _IL3_NEGOTIATIONRESPONSE501_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class NegotiationResponse501 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/NewOrderCross544.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/NewOrderCross544.h index ca52a39ff..d8b3ee21d 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/NewOrderCross544.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/NewOrderCross544.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_NEWORDERCROSS544_H_ -#define _ILINKBINARY_NEWORDERCROSS544_H_ +#ifndef _IL3_NEWORDERCROSS544_H_ +#define _IL3_NEWORDERCROSS544_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class NewOrderCross544 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/NewOrderSingle514.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/NewOrderSingle514.h index 076dab256..76b5c1dad 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/NewOrderSingle514.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/NewOrderSingle514.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_NEWORDERSINGLE514_H_ -#define _ILINKBINARY_NEWORDERSINGLE514_H_ +#ifndef _IL3_NEWORDERSINGLE514_H_ +#define _IL3_NEWORDERSINGLE514_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class NewOrderSingle514 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/NotApplied513.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/NotApplied513.h index d96c0f959..8e3bf50c1 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/NotApplied513.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/NotApplied513.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_NOTAPPLIED513_H_ -#define _ILINKBINARY_NOTAPPLIED513_H_ +#ifndef _IL3_NOTAPPLIED513_H_ +#define _IL3_NOTAPPLIED513_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class NotApplied513 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OFMOverrideReq.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OFMOverrideReq.h index 23c00f3d6..441ad2671 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OFMOverrideReq.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OFMOverrideReq.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_OFMOVERRIDEREQ_H_ -#define _ILINKBINARY_OFMOVERRIDEREQ_H_ +#ifndef _IL3_OFMOVERRIDEREQ_H_ +#define _IL3_OFMOVERRIDEREQ_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class OFMOverrideReq { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrdStatusTrd.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrdStatusTrd.h index 9b33f4e87..d0db9f556 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrdStatusTrd.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrdStatusTrd.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_ORDSTATUSTRD_H_ -#define _ILINKBINARY_ORDSTATUSTRD_H_ +#ifndef _IL3_ORDSTATUSTRD_H_ +#define _IL3_ORDSTATUSTRD_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class OrdStatusTrd { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrdStatusTrdCxl.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrdStatusTrdCxl.h index a165ef92d..d9c6e0f85 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrdStatusTrdCxl.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrdStatusTrdCxl.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_ORDSTATUSTRDCXL_H_ -#define _ILINKBINARY_ORDSTATUSTRDCXL_H_ +#ifndef _IL3_ORDSTATUSTRDCXL_H_ +#define _IL3_ORDSTATUSTRDCXL_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class OrdStatusTrdCxl { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderCancelReject535.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderCancelReject535.h index a2566333f..781a680f8 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderCancelReject535.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderCancelReject535.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_ORDERCANCELREJECT535_H_ -#define _ILINKBINARY_ORDERCANCELREJECT535_H_ +#ifndef _IL3_ORDERCANCELREJECT535_H_ +#define _IL3_ORDERCANCELREJECT535_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class OrderCancelReject535 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderCancelReplaceReject536.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderCancelReplaceReject536.h index 1dbdf47d0..aa43b08a5 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderCancelReplaceReject536.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderCancelReplaceReject536.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_ORDERCANCELREPLACEREJECT536_H_ -#define _ILINKBINARY_ORDERCANCELREPLACEREJECT536_H_ +#ifndef _IL3_ORDERCANCELREPLACEREJECT536_H_ +#define _IL3_ORDERCANCELREPLACEREJECT536_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class OrderCancelReplaceReject536 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderCancelReplaceRequest515.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderCancelReplaceRequest515.h index 063f6ad8d..e81eb514d 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderCancelReplaceRequest515.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderCancelReplaceRequest515.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_ORDERCANCELREPLACEREQUEST515_H_ -#define _ILINKBINARY_ORDERCANCELREPLACEREQUEST515_H_ +#ifndef _IL3_ORDERCANCELREPLACEREQUEST515_H_ +#define _IL3_ORDERCANCELREPLACEREQUEST515_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class OrderCancelReplaceRequest515 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderCancelRequest516.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderCancelRequest516.h index 6d87f3189..6935a5fcd 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderCancelRequest516.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderCancelRequest516.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_ORDERCANCELREQUEST516_H_ -#define _ILINKBINARY_ORDERCANCELREQUEST516_H_ +#ifndef _IL3_ORDERCANCELREQUEST516_H_ +#define _IL3_ORDERCANCELREQUEST516_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class OrderCancelRequest516 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderEventType.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderEventType.h index 07ffe031b..8b0e10e0d 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderEventType.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderEventType.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_ORDEREVENTTYPE_H_ -#define _ILINKBINARY_ORDEREVENTTYPE_H_ +#ifndef _IL3_ORDEREVENTTYPE_H_ +#define _IL3_ORDEREVENTTYPE_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class OrderEventType { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderMassActionReport562.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderMassActionReport562.h index 7530f9546..91dc75ae1 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderMassActionReport562.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderMassActionReport562.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_ORDERMASSACTIONREPORT562_H_ -#define _ILINKBINARY_ORDERMASSACTIONREPORT562_H_ +#ifndef _IL3_ORDERMASSACTIONREPORT562_H_ +#define _IL3_ORDERMASSACTIONREPORT562_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class OrderMassActionReport562 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderMassActionRequest529.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderMassActionRequest529.h index 6fd335e29..f1df40429 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderMassActionRequest529.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderMassActionRequest529.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_ORDERMASSACTIONREQUEST529_H_ -#define _ILINKBINARY_ORDERMASSACTIONREQUEST529_H_ +#ifndef _IL3_ORDERMASSACTIONREQUEST529_H_ +#define _IL3_ORDERMASSACTIONREQUEST529_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class OrderMassActionRequest529 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderMassStatusRequest530.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderMassStatusRequest530.h index 33b265043..408ff4e78 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderMassStatusRequest530.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderMassStatusRequest530.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_ORDERMASSSTATUSREQUEST530_H_ -#define _ILINKBINARY_ORDERMASSSTATUSREQUEST530_H_ +#ifndef _IL3_ORDERMASSSTATUSREQUEST530_H_ +#define _IL3_ORDERMASSSTATUSREQUEST530_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class OrderMassStatusRequest530 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderStatus.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderStatus.h index 0477468db..ad30524d1 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderStatus.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderStatus.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_ORDERSTATUS_H_ -#define _ILINKBINARY_ORDERSTATUS_H_ +#ifndef _IL3_ORDERSTATUS_H_ +#define _IL3_ORDERSTATUS_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class OrderStatus { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderStatusRequest533.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderStatusRequest533.h index 95a0fc051..a63e0d478 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderStatusRequest533.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderStatusRequest533.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_ORDERSTATUSREQUEST533_H_ -#define _ILINKBINARY_ORDERSTATUSREQUEST533_H_ +#ifndef _IL3_ORDERSTATUSREQUEST533_H_ +#define _IL3_ORDERSTATUSREQUEST533_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class OrderStatusRequest533 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderType.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderType.h index d61b150ea..cd41084bc 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderType.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderType.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_ORDERTYPE_H_ -#define _ILINKBINARY_ORDERTYPE_H_ +#ifndef _IL3_ORDERTYPE_H_ +#define _IL3_ORDERTYPE_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class OrderType { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderTypeReq.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderTypeReq.h index d643c2c10..6bde962e6 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderTypeReq.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/OrderTypeReq.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_ORDERTYPEREQ_H_ -#define _ILINKBINARY_ORDERTYPEREQ_H_ +#ifndef _IL3_ORDERTYPEREQ_H_ +#define _IL3_ORDERTYPEREQ_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class OrderTypeReq { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/PRICE9.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/PRICE9.h index 3e0cbf6df..57fbf7c08 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/PRICE9.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/PRICE9.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_PRICE9_H_ -#define _ILINKBINARY_PRICE9_H_ +#ifndef _IL3_PRICE9_H_ +#define _IL3_PRICE9_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class PRICE9 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/PRICENULL9.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/PRICENULL9.h index 115c54e69..3a6b27c0f 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/PRICENULL9.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/PRICENULL9.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_PRICENULL9_H_ -#define _ILINKBINARY_PRICENULL9_H_ +#ifndef _IL3_PRICENULL9_H_ +#define _IL3_PRICENULL9_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class PRICENULL9 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailRole.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailRole.h index 518e56625..cddedee25 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailRole.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailRole.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_PARTYDETAILROLE_H_ -#define _ILINKBINARY_PARTYDETAILROLE_H_ +#ifndef _IL3_PARTYDETAILROLE_H_ +#define _IL3_PARTYDETAILROLE_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class PartyDetailRole { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailsDefinitionRequest518.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailsDefinitionRequest518.h index 14d240cb4..c3d3c1087 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailsDefinitionRequest518.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailsDefinitionRequest518.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_PARTYDETAILSDEFINITIONREQUEST518_H_ -#define _ILINKBINARY_PARTYDETAILSDEFINITIONREQUEST518_H_ +#ifndef _IL3_PARTYDETAILSDEFINITIONREQUEST518_H_ +#define _IL3_PARTYDETAILSDEFINITIONREQUEST518_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class PartyDetailsDefinitionRequest518 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailsDefinitionRequestAck519.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailsDefinitionRequestAck519.h index 0425b6feb..38db918cc 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailsDefinitionRequestAck519.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailsDefinitionRequestAck519.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_PARTYDETAILSDEFINITIONREQUESTACK519_H_ -#define _ILINKBINARY_PARTYDETAILSDEFINITIONREQUESTACK519_H_ +#ifndef _IL3_PARTYDETAILSDEFINITIONREQUESTACK519_H_ +#define _IL3_PARTYDETAILSDEFINITIONREQUESTACK519_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class PartyDetailsDefinitionRequestAck519 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailsListReport538.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailsListReport538.h index 02dda69a6..3d9d817fd 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailsListReport538.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailsListReport538.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_PARTYDETAILSLISTREPORT538_H_ -#define _ILINKBINARY_PARTYDETAILSLISTREPORT538_H_ +#ifndef _IL3_PARTYDETAILSLISTREPORT538_H_ +#define _IL3_PARTYDETAILSLISTREPORT538_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class PartyDetailsListReport538 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailsListRequest537.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailsListRequest537.h index 61173a95a..e645cfc1a 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailsListRequest537.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/PartyDetailsListRequest537.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_PARTYDETAILSLISTREQUEST537_H_ -#define _ILINKBINARY_PARTYDETAILSLISTREQUEST537_H_ +#ifndef _IL3_PARTYDETAILSLISTREQUEST537_H_ +#define _IL3_PARTYDETAILSLISTREQUEST537_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class PartyDetailsListRequest537 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteAckStatus.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteAckStatus.h index e07194619..c2aa20cc9 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteAckStatus.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteAckStatus.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_QUOTEACKSTATUS_H_ -#define _ILINKBINARY_QUOTEACKSTATUS_H_ +#ifndef _IL3_QUOTEACKSTATUS_H_ +#define _IL3_QUOTEACKSTATUS_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class QuoteAckStatus { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteCancel528.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteCancel528.h index da0d77f21..07ff77aec 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteCancel528.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteCancel528.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_QUOTECANCEL528_H_ -#define _ILINKBINARY_QUOTECANCEL528_H_ +#ifndef _IL3_QUOTECANCEL528_H_ +#define _IL3_QUOTECANCEL528_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class QuoteCancel528 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteCancelAck563.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteCancelAck563.h index 76d9143fe..d833038b4 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteCancelAck563.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteCancelAck563.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_QUOTECANCELACK563_H_ -#define _ILINKBINARY_QUOTECANCELACK563_H_ +#ifndef _IL3_QUOTECANCELACK563_H_ +#define _IL3_QUOTECANCELACK563_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class QuoteCancelAck563 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteCxlStatus.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteCxlStatus.h index c2331d096..09eede5c6 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteCxlStatus.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteCxlStatus.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_QUOTECXLSTATUS_H_ -#define _ILINKBINARY_QUOTECXLSTATUS_H_ +#ifndef _IL3_QUOTECXLSTATUS_H_ +#define _IL3_QUOTECXLSTATUS_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class QuoteCxlStatus { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteCxlTyp.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteCxlTyp.h index 043614966..5601eb404 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteCxlTyp.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteCxlTyp.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_QUOTECXLTYP_H_ -#define _ILINKBINARY_QUOTECXLTYP_H_ +#ifndef _IL3_QUOTECXLTYP_H_ +#define _IL3_QUOTECXLTYP_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class QuoteCxlTyp { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteTyp.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteTyp.h index dd478bb15..8e14f5f14 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteTyp.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/QuoteTyp.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_QUOTETYP_H_ -#define _ILINKBINARY_QUOTETYP_H_ +#ifndef _IL3_QUOTETYP_H_ +#define _IL3_QUOTETYP_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class QuoteTyp { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/RFQSide.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/RFQSide.h index 04bffac67..54347d473 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/RFQSide.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/RFQSide.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_RFQSIDE_H_ -#define _ILINKBINARY_RFQSIDE_H_ +#ifndef _IL3_RFQSIDE_H_ +#define _IL3_RFQSIDE_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class RFQSide { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ReqResult.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ReqResult.h index 237b59e0f..26e557fa5 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ReqResult.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ReqResult.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_REQRESULT_H_ -#define _ILINKBINARY_REQRESULT_H_ +#ifndef _IL3_REQRESULT_H_ +#define _IL3_REQRESULT_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class ReqResult { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/RequestForQuote543.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/RequestForQuote543.h index 857379c90..42d1e37ab 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/RequestForQuote543.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/RequestForQuote543.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_REQUESTFORQUOTE543_H_ -#define _ILINKBINARY_REQUESTFORQUOTE543_H_ +#ifndef _IL3_REQUESTFORQUOTE543_H_ +#define _IL3_REQUESTFORQUOTE543_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class RequestForQuote543 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/RequestForQuoteAck546.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/RequestForQuoteAck546.h index 85d267f0d..68d36ad0f 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/RequestForQuoteAck546.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/RequestForQuoteAck546.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_REQUESTFORQUOTEACK546_H_ -#define _ILINKBINARY_REQUESTFORQUOTEACK546_H_ +#ifndef _IL3_REQUESTFORQUOTEACK546_H_ +#define _IL3_REQUESTFORQUOTEACK546_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class RequestForQuoteAck546 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/Retransmission509.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/Retransmission509.h index cd408599d..b42a19f59 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/Retransmission509.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/Retransmission509.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_RETRANSMISSION509_H_ -#define _ILINKBINARY_RETRANSMISSION509_H_ +#ifndef _IL3_RETRANSMISSION509_H_ +#define _IL3_RETRANSMISSION509_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class Retransmission509 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/RetransmitReject510.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/RetransmitReject510.h index f5c6097c3..cb1d17f25 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/RetransmitReject510.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/RetransmitReject510.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_RETRANSMITREJECT510_H_ -#define _ILINKBINARY_RETRANSMITREJECT510_H_ +#ifndef _IL3_RETRANSMITREJECT510_H_ +#define _IL3_RETRANSMITREJECT510_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class RetransmitReject510 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/RetransmitRequest508.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/RetransmitRequest508.h index 6543ade71..6fba09768 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/RetransmitRequest508.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/RetransmitRequest508.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_RETRANSMITREQUEST508_H_ -#define _ILINKBINARY_RETRANSMITREQUEST508_H_ +#ifndef _IL3_RETRANSMITREQUEST508_H_ +#define _IL3_RETRANSMITREQUEST508_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class RetransmitRequest508 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SLEDS.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SLEDS.h index 5553e6491..45f0be73c 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SLEDS.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SLEDS.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_SLEDS_H_ -#define _ILINKBINARY_SLEDS_H_ +#ifndef _IL3_SLEDS_H_ +#define _IL3_SLEDS_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class SLEDS { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SMPI.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SMPI.h index dd2875d39..75ec73e60 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SMPI.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SMPI.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_SMPI_H_ -#define _ILINKBINARY_SMPI_H_ +#ifndef _IL3_SMPI_H_ +#define _IL3_SMPI_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class SMPI { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SecRspTyp.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SecRspTyp.h index fab0c684e..443c0037f 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SecRspTyp.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SecRspTyp.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_SECRSPTYP_H_ -#define _ILINKBINARY_SECRSPTYP_H_ +#ifndef _IL3_SECRSPTYP_H_ +#define _IL3_SECRSPTYP_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class SecRspTyp { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SecurityDefinitionRequest560.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SecurityDefinitionRequest560.h index a63e4895a..61d2bf17a 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SecurityDefinitionRequest560.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SecurityDefinitionRequest560.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_SECURITYDEFINITIONREQUEST560_H_ -#define _ILINKBINARY_SECURITYDEFINITIONREQUEST560_H_ +#ifndef _IL3_SECURITYDEFINITIONREQUEST560_H_ +#define _IL3_SECURITYDEFINITIONREQUEST560_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class SecurityDefinitionRequest560 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SecurityDefinitionResponse561.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SecurityDefinitionResponse561.h index bfd1bf3cd..c75f3b475 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SecurityDefinitionResponse561.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SecurityDefinitionResponse561.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_SECURITYDEFINITIONRESPONSE561_H_ -#define _ILINKBINARY_SECURITYDEFINITIONRESPONSE561_H_ +#ifndef _IL3_SECURITYDEFINITIONRESPONSE561_H_ +#define _IL3_SECURITYDEFINITIONRESPONSE561_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class SecurityDefinitionResponse561 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/Sequence506.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/Sequence506.h index 4f20864c2..7b45c1d71 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/Sequence506.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/Sequence506.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_SEQUENCE506_H_ -#define _ILINKBINARY_SEQUENCE506_H_ +#ifndef _IL3_SEQUENCE506_H_ +#define _IL3_SEQUENCE506_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class Sequence506 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ShortSaleType.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ShortSaleType.h index 1f1c0c543..0856a2356 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/ShortSaleType.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/ShortSaleType.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_SHORTSALETYPE_H_ -#define _ILINKBINARY_SHORTSALETYPE_H_ +#ifndef _IL3_SHORTSALETYPE_H_ +#define _IL3_SHORTSALETYPE_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class ShortSaleType { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SideNULL.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SideNULL.h index 71dc4b3e2..f3614ec09 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SideNULL.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SideNULL.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_SIDENULL_H_ -#define _ILINKBINARY_SIDENULL_H_ +#ifndef _IL3_SIDENULL_H_ +#define _IL3_SIDENULL_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class SideNULL { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SideReq.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SideReq.h index cd3cd8b01..c52792aa1 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SideReq.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SideReq.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_SIDEREQ_H_ -#define _ILINKBINARY_SIDEREQ_H_ +#ifndef _IL3_SIDEREQ_H_ +#define _IL3_SIDEREQ_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class SideReq { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SideTimeInForce.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SideTimeInForce.h index 28bf22930..aa7c5100c 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SideTimeInForce.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SideTimeInForce.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_SIDETIMEINFORCE_H_ -#define _ILINKBINARY_SIDETIMEINFORCE_H_ +#ifndef _IL3_SIDETIMEINFORCE_H_ +#define _IL3_SIDETIMEINFORCE_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class SideTimeInForce { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SplitMsg.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SplitMsg.h index e071df893..7c8ba41fc 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/SplitMsg.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/SplitMsg.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_SPLITMSG_H_ -#define _ILINKBINARY_SPLITMSG_H_ +#ifndef _IL3_SPLITMSG_H_ +#define _IL3_SPLITMSG_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class SplitMsg { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/Terminate507.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/Terminate507.h index 56e6f79b9..3daf500cc 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/Terminate507.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/Terminate507.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_TERMINATE507_H_ -#define _ILINKBINARY_TERMINATE507_H_ +#ifndef _IL3_TERMINATE507_H_ +#define _IL3_TERMINATE507_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -147,7 +147,7 @@ #include "ExecMode.h" #include "QuoteTyp.h" -namespace iLinkBinary { +namespace il3 { class Terminate507 { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/TimeInForce.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/TimeInForce.h index 10454a9ef..9d07ea759 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/TimeInForce.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/TimeInForce.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_TIMEINFORCE_H_ -#define _ILINKBINARY_TIMEINFORCE_H_ +#ifndef _IL3_TIMEINFORCE_H_ +#define _IL3_TIMEINFORCE_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class TimeInForce { diff --git a/src/server/sparkd/cmds/spartan/order_execution/gen/src/TradeAddendum.h b/src/server/sparkd/cmds/spartan/order_execution/gen/src/TradeAddendum.h index 9adb02444..5e7507cab 100644 --- a/src/server/sparkd/cmds/spartan/order_execution/gen/src/TradeAddendum.h +++ b/src/server/sparkd/cmds/spartan/order_execution/gen/src/TradeAddendum.h @@ -1,6 +1,6 @@ /* Generated SBE (Simple Binary Encoding) message codec */ -#ifndef _ILINKBINARY_TRADEADDENDUM_H_ -#define _ILINKBINARY_TRADEADDENDUM_H_ +#ifndef _IL3_TRADEADDENDUM_H_ +#define _IL3_TRADEADDENDUM_H_ #if defined(SBE_HAVE_CMATH) /* cmath needed for std::numeric_limits::quiet_NaN() */ @@ -87,7 +87,7 @@ #define SBE_NULLVALUE_UINT64 (std::numeric_limits::max)() -namespace iLinkBinary { +namespace il3 { class TradeAddendum {