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